| CPC G06N 10/70 (2022.01) [G06N 10/20 (2022.01); G06N 10/40 (2022.01)] | 20 Claims |

|
1. A method implemented by a quantum computer for encoding a magic state in a surface code patch of physical qubits with a target distance, the method comprising:
performing a first surface code cycle on a surface code patch of physical qubits with an initial distance to encode the magic state into the surface code patch of physical qubits, wherein
performing the first surface code cycle introduces a hook error associated with a four-body stabilizer on a qubit included in the surface code patch, wherein the hook error rotates a logical observable of the surface code patch, and
performing the first surface code cycle comprises initializing the qubit in the magic state;
performing one or more rounds of error detection on the surface code patch of physical qubits that encodes the magic state; and
expanding the surface code patch of physical qubits to the target distance based on results of the one or more rounds of error detection.
|