surface_sim.log_gates.unrot_surface_code_css.set_encoding#
- set_encoding(layout)[source]#
Adds the required attributes (in place) for the layout to run the encoding circuits for the unrotated surface code.
This implementation assumes that the qubits are placed in a square 2D grid, and that the (spatial) separation between qubits is more than
1e-6.- Parameters:
- layout
The (square) layout in which to add the attributes.
Notes
The implementation follows Figure 2 and 9 from:
Higgott, Oscar. “Optimal local unitary encoding circuits for the surface code.” Quantum 5, 517 (2021).
The information about the encoding circuit is stored in the layout as the parameter
"encoding_{log_qubit_label}"for each of the data qubits.