⚛️ Quantum Institute

Quantum Error Correction

The bridge between today's noisy qubits and tomorrow's fault-tolerant quantum computers. From bit-flip codes to surface codes and the path to useful quantum computing.

Why Quantum Error Correction Is Needed

Quantum computers are inherently noisy. Every gate, every measurement, every idle moment introduces errors. Without error correction, errors accumulate exponentially with circuit depth, limiting quantum computers to shallow, simple computations.

The error budget problem

Typical error rates (2024): Single-qubit gate: ~0.1% (1 in 1,000) Two-qubit gate: ~0.5% (1 in 200) Measurement: ~1% (1 in 100) Idle (per μs): ~0.01% For a useful algorithm like Shor's (RSA-2048): ~10⁸-10¹⁰ two-qubit gates needed At 0.5% error rate: P(no errors) = (0.995)^(10⁸) ≈ 0 The circuit would produce pure noise. Required logical error rate: < 10⁻¹⁰ per gate → must reduce errors by factor of 10⁸ from raw hardware → this is what quantum error correction does

Sources of error

Classical vs Quantum Error Correction

Classical error correction is well-understood and underlies all digital communication (DRAM, SSDs, fiber optics, 5G). Quantum error correction is fundamentally harder due to three constraints unique to quantum mechanics.

Three quantum obstacles

ObstacleClassicalQuantum
No-cloningCopy bits freely for redundancyCannot copy unknown quantum states (no-cloning theorem). Must use entanglement instead of copying.
Measurement destroysRead data non-destructively to detect errorsMeasuring a qubit collapses its superposition. Must extract error information without learning the encoded data.
Continuous errorsBit either flips or doesn't (discrete)Errors are continuous rotations in Hilbert space. An infinite variety of errors can occur.

Key insight: syndrome measurement

The solution to all three obstacles is syndrome measurement: measure correlations between qubits (parity checks) rather than individual qubits. This reveals error information (the "syndrome") without disturbing the encoded quantum information.

Example: 3-qubit bit-flip code Encode: |0⟩ → |000⟩, |1⟩ → |111⟩ Syndrome operators: Z₁Z₂ and Z₂Z₃ These measure PARITY between adjacent qubits: Z₁Z₂ = +1 if qubits 1,2 agree, -1 if they differ Z₂Z₃ = +1 if qubits 2,3 agree, -1 if they differ No error: Z₁Z₂ = +1, Z₂Z₃ = +1 → syndrome (0,0) Qubit 1 flip: Z₁Z₂ = -1, Z₂Z₃ = +1 → syndrome (1,0) → fix qubit 1 Qubit 2 flip: Z₁Z₂ = -1, Z₂Z₃ = -1 → syndrome (1,1) → fix qubit 2 Qubit 3 flip: Z₁Z₂ = +1, Z₂Z₃ = -1 → syndrome (0,1) → fix qubit 3 The syndrome tells us WHICH qubit flipped without revealing WHETHER the encoded state is |000⟩ or |111⟩ (i.e., |0⟩_L or |1⟩_L).

Digitization of errors

A seemingly fatal problem: quantum errors are continuous. A qubit can be slightly rotated by any angle, not just flipped. The remarkable solution: any error can be decomposed into Pauli errors (I, X, Y, Z), and syndrome measurement projects the error onto one of these discrete types. This "digitizes" continuous errors, making quantum error correction possible with finite resources.

General single-qubit error: E = aI + bX + cY + dZ After syndrome measurement, the state collapses to one of: no error (I), bit-flip (X), phase-flip (Z), or both (Y). Each has a known correction. The continuous coefficients a, b, c, d determine the PROBABILITY of each discrete error, not an intermediate error that we can't fix.

Bit-Flip Code [[3,1,1]]

The simplest quantum error-correcting code. It protects against single X (bit-flip) errors by encoding one logical qubit into three physical qubits using repetition.

Encoding

|0⟩_L = |000⟩ |1⟩_L = |111⟩ General state: α|0⟩_L + β|1⟩_L = α|000⟩ + β|111⟩ Encoding circuit: |ψ⟩|00⟩ → CNOT(1,2) → CNOT(1,3) |ψ⟩ = α|0⟩ + β|1⟩ After CNOT(1,2): α|00⟩ + β|11⟩ (on qubits 1,2) After CNOT(1,3): α|000⟩ + β|111⟩ ✓

Error detection and correction

Stabilizer generators: S₁ = Z₁Z₂, S₂ = Z₂Z₃ Syndrome table: Error | S₁ S₂ | Correction ------+--------+----------- None | +1 +1 | None X₁ | -1 +1 | Apply X₁ X₂ | -1 -1 | Apply X₂ X₃ | +1 -1 | Apply X₃

Limitations

Phase-Flip Code [[3,1,1]]

The phase-flip code protects against Z (phase-flip) errors. It is the Hadamard-conjugate of the bit-flip code: apply H to every qubit in the bit-flip code to get the phase-flip code.

Encoding

|0⟩_L = |+++⟩ = (|0⟩+|1⟩)⊗³/2√2 |1⟩_L = |---⟩ = (|0⟩-|1⟩)⊗³/2√2 Stabilizer generators: S₁ = X₁X₂, S₂ = X₂X₃ Syndrome measurement in the X basis: Phase-flip on qubit k changes |+⟩ → |-⟩ on that qubit X₁X₂ and X₂X₃ detect which qubit was affected

Relationship to bit-flip code

Phase-flip code = H⊗³ (Bit-flip code) H⊗³ This duality is fundamental: Bit-flip (X) errors in the Z-basis = Phase-flip (Z) errors in the X-basis The Hadamard gate swaps the two error types.

Shor's 9-Qubit Code [[9,1,3]]

The first quantum error-correcting code, discovered by Peter Shor in 1995. It corrects any single-qubit error (X, Z, or Y) by concatenating the bit-flip and phase-flip codes.

Construction: concatenation

Step 1: Encode against phase-flips (outer code) |0⟩_L = (|000⟩ + |111⟩)(|000⟩ + |111⟩)(|000⟩ + |111⟩) / 2√2 |1⟩_L = (|000⟩ - |111⟩)(|000⟩ - |111⟩)(|000⟩ - |111⟩) / 2√2 Each of the three "blocks" of 3 qubits is a phase-flip codeword. Within each block, the bit-flip code protects against X errors. Total: 9 physical qubits encode 1 logical qubit. Stabilizer generators (8 generators for 9 qubits): Block 1: Z₁Z₂, Z₂Z₃ (bit-flip detection) Block 2: Z₄Z₅, Z₅Z₆ Block 3: Z₇Z₈, Z₈Z₉ Between blocks: X₁X₂X₃X₄X₅X₆ (phase-flip detection) X₄X₅X₆X₇X₈X₉

What it corrects

Code parameters: [[n, k, d]]

[[9, 1, 3]] means: n = 9 physical qubits k = 1 logical qubit d = 3 distance (can correct ⌊(d-1)/2⌋ = 1 error) Encoding rate: k/n = 1/9 ≈ 11% (89% overhead for error correction)
Shor's code is historically important but not practical. Its encoding rate is low (1:9) and it doesn't scale well. Modern codes like the surface code achieve much better performance with comparable or lower overhead per logical operation.

Stabilizer Formalism

The stabilizer formalism (Gottesman, 1997) is the mathematical framework underlying nearly all practical quantum error-correcting codes. It provides a compact way to describe code states, error detection, and correction using the Pauli group.

Key concepts

Pauli group on n qubits: G_n = {±1, ±i} × {I, X, Y, Z}⊗n Example (2 qubits): XI, IX, XY, ZZ, -YX, iXZ, ... Stabilizer group S: An abelian subgroup of G_n with -I ∉ S Generated by independent stabilizer generators g₁, ..., g_r where r = n - k (n physical qubits, k logical qubits) Code space C(S): The simultaneous +1 eigenspace of all generators g_i |ψ⟩ = +1 |ψ⟩ for all i, for all |ψ⟩ ∈ C(S)

Error detection

Given error E ∈ G_n: Case 1: E ∈ S (error is itself a stabilizer) → E has no effect on code space. No correction needed. Case 2: E anticommutes with some generator g_i → g_i|E|ψ⟩ = -E|g_i|ψ⟩ = -E|ψ⟩ → Syndrome bit = -1 for generator g_i → Error detected! Syndrome identifies the error. Case 3: E commutes with all generators but E ∉ S → E is a logical operator (acts on encoded information) → Undetectable! This is the worst case. The code distance d is the minimum weight of any undetectable error (logical operator outside S).

Important stabilizer codes

Code[[n,k,d]]Stabilizer generatorsNotes
3-qubit bit-flip[[3,1,1]]ZZI, IZZCorrects 1 X error only
Steane code[[7,1,3]]6 generators (CSS)Transversal CNOT and H
Shor code[[9,1,3]]8 generatorsFirst QEC code (1995)
5-qubit perfect[[5,1,3]]4 generatorsSmallest code correcting 1 error
Surface code (d)[[2d²-1, 1, d]]~2d² generatorsMost practical code (see below)
Color codevariesFace operatorsTransversal Clifford gates
Bacon-Shor[[d²,1,d]]Gauge operatorsSubsystem code, simpler syndromes

CSS codes

Calderbank-Shor-Steane (CSS) codes are a major subclass where X and Z stabilizers are independent. This simplifies syndrome extraction and allows transversal CNOT gates between logical qubits. The surface code is a CSS code.

Surface Codes

The surface code is the most promising quantum error-correcting code for near-term hardware. It requires only nearest-neighbor interactions on a 2D grid, has the highest known error threshold (~1%), and is compatible with superconducting and other planar architectures.

Layout

Data qubits sit on the vertices of a square lattice. Ancilla qubits (for syndrome measurement) sit on the faces. Two types of checks:

D
Z
D
Z
D
X
D
X
D
X
D
Z
D
Z
D
X
D
X
D
X
D
Z
D
Z
D

Distance-3 surface code. D = data qubit, X = X-stabilizer (detects Z errors), Z = Z-stabilizer (detects X errors).

How it works

Z-stabilizers: Z⊗⁴ on four data qubits around each Z-face Detect X (bit-flip) errors on data qubits X-stabilizers: X⊗⁴ on four data qubits around each X-face Detect Z (phase-flip) errors on data qubits Distance d surface code: Grid size: d × d data qubits (roughly) Total qubits: ~2d² (data + ancilla) Corrects ⌊(d-1)/2⌋ errors Logical operators: X_L: chain of X operators spanning left → right Z_L: chain of Z operators spanning top → bottom Minimum chain length = d (the distance)

Syndrome decoding

When errors occur, some stabilizer measurements flip from +1 to -1. These flipped stabilizers are called defects. The decoder must pair up defects and infer the most likely error chain connecting each pair. The standard algorithm is minimum-weight perfect matching (MWPM), which runs in polynomial time.

The threshold theorem

Threshold theorem (Aharonov, Ben-Or, 1997; Knill, Laflamme, 1996): If the physical error rate p is below a threshold p_th, then the logical error rate decreases EXPONENTIALLY with the code distance d: p_L ≈ A · (p/p_th)^(⌊d/2⌋+1) where A is a constant ~0.1. Surface code threshold: p_th ≈ 1% for depolarizing noise (approximately matched by current hardware!) Example with p = 0.1% and p_th = 1%: d=3: p_L ≈ 0.1 × (0.1)² = 10⁻³ d=5: p_L ≈ 0.1 × (0.1)³ = 10⁻⁴ d=7: p_L ≈ 0.1 × (0.1)⁴ = 10⁻⁵ d=17: p_L ≈ 10⁻¹⁰ To reach p_L = 10⁻¹⁰ (needed for Shor's algorithm): d ≈ 17, needing ~580 physical qubits per logical qubit

Logical operations on surface codes

OperationHowCost
Logical X, ZApply X or Z along a boundary-spanning chaind physical gates
Logical CNOTLattice surgery (merge and split patches)d rounds of syndrome measurement
Logical HFold/rotate the code patchCode deformation
Logical SInject S from magic stateMagic state distillation
Logical TInject T from magic state~15:1 distillation ratio
The T gate is the expensive operation. Surface codes cannot implement T transversally (Eastin-Knill theorem). Instead, "magic states" |T⟩ are prepared, distilled (error-corrected separately), and injected. Each logical T gate costs ~15 physical magic states after one round of distillation, or ~225 after two rounds. This is the primary bottleneck for fault-tolerant quantum computing.

Logical Qubits vs Physical Qubits

A physical qubit is a single hardware qubit (one transmon, one trapped ion, etc.). A logical qubit is an error-corrected qubit encoded across many physical qubits. The ratio determines the overhead of quantum error correction.

Overhead scaling

Target p_LDistance dPhysical qubits per logical qubitUse case
10⁻³3~17Proof of concept
10⁻⁶9~160Early fault-tolerant
10⁻¹⁰17~580Shor's algorithm
10⁻¹⁵27~1,460Deep circuits with margin

Note: these assume physical error rate of 0.1%. At 0.01% (10x better hardware), the distances roughly halve.

The overhead problem

Shor's algorithm for RSA-2048: ~4,000 logical qubits needed At d=17: 4,000 × 580 = 2.3 million physical qubits Plus magic state factories: ~10 million more Total: ~10-20 million physical qubits Current state (2025): Largest processor: 1,121 qubits (IBM Condor) Needed: 10,000,000+ qubits Gap: ~10,000x This is why fault-tolerant quantum computing is a decade-plus engineering challenge.

Improving the ratio

Current State of QEC (2024-2025)

Quantum error correction has made remarkable experimental progress in the past two years, crossing several critical milestones.

Google Willow: below-threshold QEC

Google (December 2024): "Quantum error correction below the surface code threshold"

Using the 105-qubit Willow processor, Google demonstrated that increasing the surface code distance from d=3 to d=5 to d=7 reduced the logical error rate at each step — the first time this exponential suppression has been observed. Logical error rate: 10⁻²·⁸ per round at d=7. This proves that surface code error correction works as the theory predicts, and that Google's hardware is below the threshold.

Nature | 105 qubits | Surface code d=3,5,7 | Below threshold

Harvard/MIT: 48 logical qubits on neutral atoms

Bluvstein et al. (December 2023): "Logical quantum processor"

Demonstrated 48 logical qubits on a 280-atom neutral-atom system. Ran entangling gates between logical qubits using transversal CNOT. Used both surface codes and color codes. First demonstration of error-corrected two-logical-qubit operations at scale.

Nature | 280 atoms | 48 logical qubits | Color + surface codes

Quantinuum: real-time QEC with trapped ions

Quantinuum H2 (2024): Steane code and color code experiments

Demonstrated repeated rounds of real-time error correction on the H2 trapped-ion processor with mid-circuit measurement and feed-forward. Achieved logical error rates below physical error rates for the Steane [[7,1,3]] code. The high gate fidelity (99.8% two-qubit) and all-to-all connectivity make trapped ions particularly suited to QEC.

56 qubits | Trapped ion | Mid-circuit measurement | Real-time decoding

IBM: error-mitigated computation at scale

Kim et al. (June 2023): "Evidence for the utility of quantum computing before fault tolerance"

Used a 127-qubit Eagle processor to simulate an Ising model at a depth that exceeded classical exact simulation capabilities. Used error mitigation (not correction) — zero-noise extrapolation and probabilistic error cancellation. Showed that NISQ hardware with error mitigation can produce useful results for some problems, even without full QEC.

Nature | 127 qubits | Error mitigation | Ising model simulation

Timeline to Fault-Tolerant Quantum Computing

The path from today's noisy qubits to a fault-tolerant quantum computer capable of running Shor's algorithm spans multiple stages. Here is a realistic timeline based on published roadmaps and current progress.

The stages

StageTimelineQubitsWhat's possible
NISQ era2019-2025 (now)50-1,000Quantum advantage for specific sampling tasks. VQE/QAOA on small molecules. Error mitigation, not correction.
Early fault-tolerant2026-20291,000-10,000~10-50 logical qubits at d=3-5. Simple error-corrected circuits. Small quantum chemistry simulations beyond classical reach.
Fault-tolerant2029-203510,000-100,000~100-1,000 logical qubits. Practical quantum advantage for optimization, chemistry, materials. Not yet breaking RSA.
Large-scale fault-tolerant2033-2040+1M+~4,000+ logical qubits at d=17+. Shor's algorithm on RSA-2048. Arbitrary quantum computations.

Company roadmaps

Company20252026-20272029-20302033+
IBMFlamingo (modular 156q)Starling (error-corrected)Blue Jay (2,000 logical)100K+ qubits
GoogleWillow improvementsBelow-threshold at higher dUseful error-corrected computation1M+ qubits
MicrosoftFirst topological qubitMulti-qubit topologicalHybrid topo+surface codeTopological advantage
QuantinuumH2 improvementsHelios (multi-trap modular)~1000 physical qubitsFault-tolerant at scale
PsiQuantumChip fabricationFirst photonic QCFault-tolerant photonic1M+ photonic qubits

What must happen

Post-quantum cryptography (PQC) is already being deployed in anticipation of fault-tolerant quantum computers. NIST finalized PQC standards in 2024 (CRYSTALS-Kyber, CRYSTALS-Dilithium, SPHINCS+). The transition from RSA/ECC to PQC should be completed well before large-scale quantum computers arrive. "Harvest now, decrypt later" attacks make this urgent even though breaking RSA is still 10+ years away.