surface_sim.circuit_blocks.repetition_code.log_meas#
- log_meas(model, layout, detectors, rot_basis=False, anc_reset=True, anc_detectors=None)[source]#
Returns stim circuit corresponding to a logical measurement of the given model. It defines the observables for all the logical qubits in the layout.
- Parameters:
- model
Noise model for the gates.
- layout
Code layout.
- detectors
Detector definitions to use.
- rot_basis
If
True, the memory experiment is performed in the X basis. IfFalse, the memory experiment is performed in the Z basis. By deafultFalse.- 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
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.