Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* StimCodeCircuit class StimCodeCircuit takes a stim circuit and converts it into a CodeCircuit class with the usual methods and attributes like circuit, d, n, string2nodes(), _make_syndrome_graph() * Update css_code.py New methods to remove the redundancy between the former stim_circuit_with_detectors method and string2nodes: - stim_detectors: constructs detector information for CSS codes too be used by (i) the stim circuit, (ii) the new string2nodes method - string2nodes: converts measurement outcome strings into DecodingGraphNode-s (as before), but now using the abstract detector information from stim_detectors. * Update stim_tools.py Updates to previously existing functions and adding string2nodes_with_detectors get_stim_circuits: - takes a qiskit circuit or a list thereof (formerly a dictionary) - uses abstract detector information to create the detectors of the stim circuit (before this function did not add any detectors, it has been done by a CSSCodeCircuit method) detector_error_model_to_rx_graph: - uses the iter_flatten_model function to handle stim RepeatBlocks (needed in the new StimCodeCircuit class) - uses more info for the annotations os DecodingGraphNode-s string2nodes_with_detectors: - uses the same abstract detector info as the get_stim_circuit to convert output strings into DecodingGraphNode-s noisify_circuit: - handles costum "idle_#" gates which can be used to add idling errors into the circuit, e.g., during measurements * Update test_css_codes_with_stim.py Updating the test according to the new stim circuit construction, i.e., get detectors and logicals and use the get_stim_circuits function from utils * Update test_css_codes_with_stim.py * Update stim_tools.py black... * Black (#3) * black * Add files via upload * black * Update stim_tools.py Adding string2rawlogicals_with_detectors to be used by the CSS and Stim CodeCircuit classes. * Update stim_tools.py string2logical_meas converts an output string into raw logical outcomes using the stim-style logicals (list of dictionaries) and the clbit list of the QuantumCircuit. * Update css_code.py Adding the method string2raw_logicals to be used by the qiskit-qec decoders. * Update stim_code_circuit.py Adding the method string2raw_logicals to be used by the qiskit-qec decoders. * Update css_code.py linting * Update stim_code_circuit.py linting * Update css_code.py typo, tab was missing... * Update css_code.py linting, new part * Update stim_tools.py Merging manually the PR from James (into my 404 branch). It contained linting and simplification of the get_stim_circuits() arguments, i.e., detectors/logicals can only be a list of dictionaries from now * Update stim_tools.py linting, new parts * Update stim_code_circuit.py string in the beginning of the file made the lint test fail: ' lint: commands[1]> black --check --diff src/qiskit_qec intern test setup.py error: cannot format src/qiskit_qec/circuits/stim_code_circuit.py: Cannot parse: 17:0: """Generates code circuits classes for Stim circuits.""" ' * Update stim_code_circuit.py linting... * 404 stim compatibility (#5) * Update stim_code_circuit.py * Update stim_tools.py * Update stim_tools.py * more linting * remove decoder dependence on css_logical * final linting (hopefully) * fix docs (#6) * Update stim_code_circuit.py * Update stim_tools.py * Update stim_tools.py * more linting * remove decoder dependence on css_logical * final linting (hopefully) * fix docs * last docs issue? --------- Co-authored-by: James Wootton <[email protected]> Co-authored-by: James Wootton <[email protected]> Co-authored-by: grace-harper <[email protected]>
- Loading branch information