Quantum error correction turns many noisy physical qubits into fewer logical qubits with a lower error rate. No code removes noise by itself. Each code trades qubit overhead, gate requirements, measurement cost, decoder complexity, and hardware compatibility.
The right comparison starts with the workload and hardware, not a single threshold number.
What a code must protect
A qubit has two main error channels. Bit-flip errors change |0⟩ into |1⟩. Phase-flip errors change the relative phase between |0⟩ and |1⟩. Real devices produce both, plus leakage, correlated faults, measurement errors, and faulty operations during syndrome extraction.
A code spreads one logical state across several physical qubits. Ancilla qubits measure parity checks without directly measuring the logical state. A decoder reads the syndrome and selects a correction or tracks a Pauli frame in software.
Useful comparison metrics include:
- Physical qubits per logical qubit.
- Logical error rate per correction cycle.
- Threshold under a stated noise model.
- Check weight and measurement depth.
- Connectivity required by the stabilizer checks.
- Decoder latency and memory use.
- Support for leakage and erasure errors.
A high threshold under an idealized noise model does not guarantee low overhead on a real processor.
Repetition codes
A repetition code stores one bit across repeated physical qubits and uses majority voting to correct bit flips. A phase-flip version applies the same idea in another basis.
Repetition codes are easy to explain, prepare, measure, and decode. They do not protect arbitrary quantum states by themselves. A full quantum memory needs protection against both bit and phase errors, plus a fault-tolerant gate set.
Their main value is diagnostic and architectural. Repetition experiments show whether adding redundancy reduces a chosen error channel. They also appear inside larger code constructions and biased-noise schemes.
Surface codes
Surface codes place data and measurement qubits on a two-dimensional grid. Local checks detect errors without revealing the encoded state. A larger code distance supplies more protection, assuming physical error rates sit below threshold.
Surface codes became a leading baseline because they use local interactions, tolerate several error types, and support mature decoders. Superconducting processors map naturally onto their grid structure. Trapped-ion and neutral-atom systems also study surface-code layouts, though their native connectivity differs.
The cost is high overhead. A useful logical qubit often needs hundreds or thousands of physical qubits after code distance, ancillas, routing, factories, and control margins enter the estimate. Surface-code computation also needs a way to produce non-Clifford resources, usually called magic states.
Color codes
Color codes use colored lattice structures with stabilizer checks arranged around faces. Some versions offer transversal implementations for useful gate families, reducing certain fault-tolerant circuit costs. Their layouts and decoders differ from surface codes, so hardware connectivity and measurement schedules decide whether the theoretical gate benefit survives implementation.
Color codes remain a useful comparison whenever a workload needs many logical gates from a compatible non-Clifford or Clifford operation set. Lower qubit overhead in one part of a design does not guarantee lower total system cost.
Bacon-Shor and subsystem codes
Bacon-Shor codes split full stabilizer checks into lower-weight gauge measurements. Hardware measures the gauge operators, then combines results into stabilizer information.
Lower-weight measurements help when long parity checks are expensive or unreliable. The layout also supports protection against biased noise in selected designs. The trade-off includes extra measurements, directional structure, and code performance tied closely to the noise model.
Subsystem codes are attractive when measurement hardware matters as much as qubit count. They deserve comparison against surface codes using the same circuit-level noise model.
qLDPC codes
Quantum low-density parity-check codes use sparse checks and often provide a nonzero encoding rate. In principle, a growing number of logical qubits needs fewer physical qubits per logical qubit than a surface-code architecture.
The main challenge moves into implementation. Sparse checks often require long-range connectivity, hypergraph product layouts, ancilla movement, or complex measurement circuits. A code with excellent asymptotic rate still needs a practical decoder, fault-tolerant gates, leakage handling, and a hardware layout.
qLDPC research now includes codes designed for local architectures, modular systems, erasure-biased devices, and specific gate sets. Compare the complete architecture, not the rate alone.
Bosonic and cat codes
Bosonic codes store information in the state of an oscillator rather than in a two-level system. A microwave cavity, resonator, or optical mode supplies a larger state space. Cat codes use superpositions of coherent states. GKP codes use a grid structure in phase space.
One oscillator often provides protection against a favored error channel before an outer code enters. This reduces some error-correction work, but hardware must control the oscillator, detect faults, stabilize the state, and add a full logical layer when required.
Bosonic codes fit platforms with strong oscillator control. They do not offer a free replacement for every qubit code.
Erasure codes
An erasure error comes with a known location. Photon loss in a photonic system and atom loss in some neutral-atom experiments provide examples. Known locations give a decoder more information than an unknown Pauli error, so erasure-biased codes often reach useful protection with different overheads.
The architecture must detect loss quickly and preserve the remaining state. A code optimized for erasures performs poorly if the hardware hides loss as an unknown error.
Which code should a team choose?
Use this short rule set:
- Local two-dimensional hardware and a mature baseline: start with surface codes.
- Sparse long-range connectivity and a strong decoder team: evaluate qLDPC codes.
- Strongly biased noise or low-weight measurement needs: evaluate repetition, Bacon-Shor, or biased-noise codes.
- Controlled cavities or oscillators: evaluate bosonic codes.
- Frequent known loss events: evaluate erasure-aware codes.
- A need for a particular transversal gate set: compare color codes and related lattice designs.
Every serious estimate should report physical error rates, leakage assumptions, measurement errors, decoder latency, code distance, and logical error targets. Without those inputs, a physical-to-logical qubit ratio is only a headline.
For the wider context, see our guides to logical qubits and fault tolerance, real-time quantum error decoding, and quantum benchmarking.