Curriculum / Noise & Error Correction / Surface Codes
Surface Codes
Topological quantum error correction, the leading approach for real hardware.
Surface Codes: The Path to Fault-Tolerant Quantum Computing
Surface codes are the leading candidate for fault-tolerant quantum computing on real hardware. They achieve high error thresholds (~1%), require only nearest-neighbor interactions on a 2D grid, and scale gracefully: making them compatible with near-term superconducting quantum processors.
Why surface codes win in practice:
| Code | Physical qubits per logical | Error threshold | Connectivity needed |
|---|---|---|---|
| Steane [[7,1,3]] (concatenated) | 7 | ~10⁻⁴ to 10⁻³ | All-to-all |
| Surface code (d=3) | 9 (data) + 8 (syndrome) | ~1% | 2D nearest-neighbor |
| Surface code (d=5) | 25 (data) + 24 (syndrome) | ~1% | 2D nearest-neighbor |
Two advantages stand out. First, the surface code threshold (~1%) is one to two orders of magnitude higher than the ~10⁻⁴ to 10⁻³ thresholds of concatenated codes like Steane: physical hardware only needs to be "pretty good," not extraordinary. Second, surface codes only require qubits to interact with their immediate neighbors on a 2D lattice, which matches the physical layout of superconducting chip architectures.
The 2D lattice structure:
A d×d surface code uses:
- •d² data qubits (circles in the lattice)
- •(d²-1)/2 X-type syndrome qubits (squares detecting phase flip (Z) errors)
- •(d²-1)/2 Z-type syndrome qubits (squares detecting bit flip (X) errors)
For the d=3 surface code: 9 data qubits, 4 X stabilizers, 4 Z stabilizers = 17 physical qubits total. In the rotated layout used below, X-type and Z-type plaquettes alternate across the faces of the grid in a checkerboard pattern.
The fault-tolerance threshold theorem states: if the physical error rate is below a threshold , then quantum computation can proceed indefinitely by using larger error correcting codes. For surface codes, the threshold is ~1%. Modern superconducting hardware achieves gate error rates of 0.1-0.5%, below the threshold. As the code distance d increases (more physical qubits), the logical error rate decreases exponentially: . This is why Google's Willow chip saw the logical error rate suppressed by a factor of Λ ≈ 2.14 with each code distance step from d=3 to d=5 to d=7, roughly halving at every step.
This is the opening of the lesson. The full walkthrough, the interactive circuit, and the graded challenge continue inside myqubit.
How this lesson works
A guided reading lesson with interactive knowledge checks. Concepts are explained step by step with circuit diagrams and runnable examples, and you confirm understanding before moving on.
Part of: Noise & Error Correction
Understand quantum noise and build error correction codes to protect quantum information.
This lesson is part of Pro
Unlock Noise & Error Correction and all 10 tracks with Pro: $12.99/month, $79/year, or $97 lifetime. Start with the free track first if you are new.