surface_sim.circuit_blocks.unrot_surface_code_css.encoding_qubits_iterator#
- encoding_qubits_iterator(model, layout, physical_reset_op, primitive_gates, single_layer_resets=False)[source]#
Yields stim circuit blocks which as a whole correspond to an encoding circuit to an unrotated surface code of the given model without the detectors. Note that this encoding circuit is not fault tolerant.
- Parameters:
- model
Noise model for the gates.
- layout
Code layout.
- physical_reset_op
Reset operation to be applied to the physical qubit that will grow to a unrotated surface code.
- primitive_gates
Set of primitive gates to use. The available options are: (1)
"cnot", which uses RZ, RX, and CNOT gates, and (2)"cz", which uses RZ, H, and CZ gates. Note that thephysical_reset_opwill not be decomposed into primitive gates.- single_layer_resets
Flag to put all resets in a single operation layer at the beginning of the encoding circuit. By default
False.
Notes
The implementation follows Figures 2 and 9 from:
Higgott, Oscar. “Optimal local unitary encoding circuits for the surface code.” Quantum 5, 517 (2021).