surface_sim.circuit_blocks.unrot_surface_code_css.qec_round_cnots#
- qec_round_cnots(model, layout, detectors, anc_reset=True, anc_detectors=None)[source]#
Returns stim circuit corresponding to a QEC round of the given model.
- Parameters:
- model
Noise model for the gates.
- layout
Code layout.
- detectors
Detector object to use for their definition.
- anc_reset
If
True, ancillas are reset at the beginning of the QEC round. By defaultTrue.- anc_detectors
List of ancilla qubits for which to define the detectors. If
None, adds all detectors. By defaultNone.
Notes
This implementation uses the following instructions: CNOT, RZ, RX, MZ, MX. Note that if
anc_reset = False, then the ancillas are not reset in the first round and stim assumes that, if not specified, they are reset in the Z-basis, which is the incorrect basis for the X-type ancillas. See the initialization iterators from the dodecahedron code.It activates all the ancillas in
detectorsto always build the detectors. As this function should not be used when building encoded circuits with the iterating functions, it does not matter if the detectors are activated or not.