surface_sim.circuit_blocks.repetition_code.qec_round#
- qec_round(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 follows two schedules, depending on the layout’s interaction order:
https://doi.org/10.1103/PhysRevApplied.8.034021
or
shallowest interaction order for the rotated surface code where ancillas interact with the data qubit on the left and right in just two two-qubit-gate layers.
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.