Computing Library › Quantum Error Correction
Quantum Error Correction

Lattice Surgery

Lattice surgery performs logical two-qubit operations on surface-code patches by merging and splitting them, using only local operations.

Gates by merging patches

In the surface code a logical qubit is a patch of lattice, and logical gates must be enacted without long-range interactions. Lattice surgery achieves this by temporarily merging two patches along a shared boundary and then splitting them again. The merge measures a joint logical operator of the two patches; the split restores two independent qubits. From these joint measurements, combined with single-patch operations, one builds a logical CNOT and the rest of the Clifford group.

Merge and split

Kronos motion — error correction

To merge two patches along an edge, the stabilizers straddling the new boundary are turned on and measured for several cycles. The product of these new checks yields the value of the joint logical operator, for example Z_L on one patch times Z_L on the other, without ever measuring either qubit alone. Splitting turns the boundary checks back off; the measurement outcomes determine a Pauli correction. A logical CNOT uses one such merge-split between data patches and an ancilla patch.

Why it is the standard

Lattice surgery keeps everything two-dimensional and local, matching planar hardware, which is why it is the leading way to compute with surface-code logical qubits. It is more qubit-efficient and hardware-friendly than the earlier braided-defect approach. Combined with magic state distillation to supply the non-Clifford T gate, lattice surgery gives a complete universal, fault-tolerant gate set.

It is a form of code deformation: changing the stabilizer group over time to move, grow, or combine logical qubits. Resource estimates for real algorithms are usually expressed in terms of lattice-surgery operations and the space-time volume they consume.