Surface Code
The leading quantum error correction code, using a 2D grid of qubits with local measurements.
The surface code is the most promising error correction code for near-term fault-tolerant quantum computers. It has high error thresholds and requires only nearest-neighbor interactions.
Structure
Qubits arranged in a 2D grid:
●───○───●───○───●
│ │ │ │ │
○───●───○───●───○
│ │ │ │ │
●───○───●───○───●
│ │ │ │ │
○───●───○───●───○
● = Data qubit
○ = Ancilla (measurement) qubit
Two types of measurements:
- X stabilizers: Detect Z errors (measure X on 4 neighbors)
- Z stabilizers: Detect X errors (measure Z on 4 neighbors)
Logical Qubit
A surface code “patch” encodes one logical qubit:
- Size: data qubits ( = code distance)
- Logical , : Defined by boundary conditions
- Logical X, Z: Chains of operators across the patch
Error Correction
Errors create pairs of “defects” in syndrome measurements:
0 0 0 0 0 0 0 0
0 0 0 0 → 1 0 0 0 (error here)
0 0 0 0 0 1 0 0
Decoder matches defects to identify errors. Most likely error pattern is corrected.
Code Distance
Distance = minimum number of errors to cause logical error.
| Distance | Data Qubits | Total Qubits |
|---|---|---|
| 3 | 9 | 17 |
| 5 | 25 | 49 |
| 7 | 49 | 97 |
| d | ~ | ~ |
Higher distance → better protection (but more qubits).
Error Threshold
The surface code has threshold .
If physical error rate :
Logical error rate decreases exponentially with distance!
Logical Operations
| Operation | Implementation |
|---|---|
| Logical X | Chain of X across patch |
| Logical Z | Chain of Z across patch |
| Logical H | Code deformation |
| Logical S | Magic state injection |
| Logical T | Magic state distillation |
| Logical CNOT | Lattice surgery |
Non-Clifford gates (T) are expensive and require “magic states.”
Lattice Surgery
Merge and split surface code patches to perform logical operations:
Patch A ──[merge]── Patch B
──[measure]──
──[split]──
This implements logical CNOT between patches.
Advantages
| Advantage | Details |
|---|---|
| High threshold | ~1%, achievable with current technology |
| Local operations | Only nearest-neighbor interactions |
| 2D layout | Matches chip architecture |
| Flexible | Can change code size dynamically |
Challenges
| Challenge | Issue |
|---|---|
| Qubit overhead | ~1000 physical per logical |
| Classical decoding | Must be fast enough |
| Magic states | T gates require distillation |
| Physical footprint | Large chips needed |
Current Status
- Google, IBM, Quantinuum demonstrating surface code
- Error rates approaching threshold
- Full fault-tolerant computation still requires significant scaling
See also: Quantum Error Correction, Logical Qubit, Fault Tolerance