surface_sim.log_gates.rot_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 rotated 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 1 from:
Claes, Jahan. “Lower-depth local encoding circuits for the surface code.” arXiv preprint arXiv:2509.09779 (2025).
The information about the encoding circuit is stored in the layout as the parameter
"encoding_{log_qubit_label}"for each of the data qubits.