1. Bit
  2. Qubit
  3. Superposition
  4. Measurement
  5. Entanglement
  6. Circuits
  7. Fourier
  8. Shor
  9. Grover
  10. Correction

Chapter 09 · Errors and decoherence

Protecting what cannot be copied

Qubits are fragile: any interaction with the environment degrades their superpositions. For years it seemed impossible to protect them, because they cannot be copied or looked at. Quantum error-correcting codes and the threshold theorem showed how, and in 2024 an experiment crossed the threshold for the first time.

A classical bit in memory can stay intact for years. A superconducting qubit keeps its superposition for, at best, around a millisecond. The culprit is decoherence: the qubit inevitably interacts with its surroundings (stray photons, vibrations, defects in the material), becomes entangled with them and, from our point of view, its pure state turns into a mixture. Building a useful quantum computer is, above all, a fight against decoherence.

Noise as a quantum channel

The most general evolution of an open system is not a unitary on the qubit alone, but a quantum channel: a linear map on density matrices that preserves trace and positivity, even when the system is part of a larger one.

Theorem (Kraus representation; Choi 1975, Kraus 1983)

A map ℰ is a quantum channel if and only if there are matrices K1,…,Km with ∑jKj†Kj=I such that

ℰ(ρ)=∑j=1mKjρKj†.

Three channels capture the essence of noise in a qubit:

  • Dephasing (T2): with probability p a Z is applied. The relative phase is lost: the Bloch vector shrinks towards the z axis, and superpositions become classical mixtures.
  • Amplitude damping (T1): the qubit decays from |1⟩ to |0⟩ by emitting energy, K0=(1001−γ), K1=(0γ00). The whole sphere is pulled towards the north pole.
  • Depolarizing: with probability p the state is replaced by the maximally mixed one. The ball shrinks uniformly towards its centre.
Decoherence on the Bloch sphere. Choose a channel and let time pass: the cloud of initial states (the surface of the sphere) is deformed into an ellipsoid inside it. Every single-qubit channel acts as an affine contraction of the Bloch ball. Purity is lost and, with it, the ability to interfere.

Why it seemed impossible

Classical error correction is based on redundancy: send 000 instead of 0 and decide by majority. With qubits, three obstacles seemed insurmountable:

  1. No copies. The no-cloning theorem forbids triplicating an unknown state.
  2. Measuring destroys. Checking whether a qubit has suffered an error collapses its superposition.
  3. Errors are continuous. A qubit is not just flipped; it can rotate by any small angle, an infinite family of errors.

In 1995 Peter Shor overcame all three with a nine-qubit code. The key ideas can be seen in a simpler code.

The three-qubit code

We encode not copies, but an entangled state, which is allowed:

α|0⟩+β|1⟩⟼α|000⟩+β|111⟩.

If one qubit is flipped by an X error, we do not measure the qubits (that would destroy α and β). We measure the parities Z1Z2 and Z2Z3: whether the first two qubits agree and whether the last two agree. Those two bits, the syndrome, identify which qubit failed (or that none did) and reveal absolutely nothing about α and β, because the two components of the superposition give the same answer. Applying X to the faulty qubit restores the state.

Theorem (discretization of errors)

If a code corrects a set of errors {Ea}, it corrects every error that is a linear combination of them. In particular, a code that corrects X, Z and Y=iXZ on any single qubit corrects any error, even a continuous one, that affects a single qubit.

Measuring the syndrome forces a continuous error to “decide” which discrete error it was. Combining protection against X (bit flips) and Z (phase flips), Shor's code nests a three-qubit code inside another and protects a logical qubit with nine physical ones. Steane (1996) found one with seven, and Laflamme, Miquel, Paz and Zurek (1996) the smallest possible, with five.

Theorem (Knill–Laflamme conditions, 1997)

Let P be the projector onto the code space. The code corrects the set of errors {Ea} if and only if, for all a,b,

PEa†EbP=cabP

for some numbers cab: errors must not distort the code space in a way that depends on the encoded information.

The repetition code with d copies, decoded by majority, against independent errors with probability p per qubit. When p is small, increasing d suppresses the logical error exponentially; when p is large, it makes it worse. The curves cross at the threshold (here p=1/2; for real quantum codes with noisy measurements it is around 1%). Run the simulation to see the votes.

The threshold theorem

Correcting errors requires more gates, and those gates also fail. Could correction introduce more errors than it removes? The answer, found independently by several groups between 1996 and 1998, is the most important result of the field.

Theorem (threshold; Aharonov–Ben-Or, Kitaev, Knill–Laflamme–Zurek)

There is a constant pth>0 such that, if every elementary component fails independently with probability p<pth, any quantum circuit with T gates can be executed with final error at most ε using O(Tpolylog(T/ε)) gates.

The idea is concatenation: encode each qubit in a code, each qubit of the code in another code, and so on. If one level reduces the error rate from p to cp2, L levels reduce it to (cp)2L/c, a doubly exponential decrease, provided cp<1. Below the threshold, noise can be defeated; above it, nothing works.

Surface codes and the present

The stabilizer formalism (Gottesman, 1997) described codes by the Pauli operators they leave invariant, and Alexei Kitaev's topological codes (1997) led to the surface code: qubits on a two-dimensional grid where only neighbouring parities are measured, with a threshold close to 1%. With distance d it uses about 2d2 physical qubits per logical qubit, and below the threshold the logical error falls exponentially with d.

For decades this was theory. In December 2024 Google Quantum AI published the first convincing demonstration of operation below threshold: with its Willow processor, increasing the distance of a surface code from 3 to 5 and from 5 to 7 halved the logical error rate at each step (a suppression factor Λ≈2.1). Around the same time, teams working with neutral atoms and trapped ions reported processors with dozens of logical qubits. The era John Preskill called NISQ in 2018 (noisy intermediate-scale quantum) has begun to give way to the era of fault tolerance.

The whole chain

Bits became vectors; changing the 1-norm for the 2-norm gave the qubit; amplitudes that can cancel gave interference; measurement extracted information; the tensor product gave entanglement; unitary gates gave a programming language; the Fourier transform and amplitude amplification gave algorithms; and error-correcting codes give the hope of running them. Every step is linear algebra. The engineering is just getting started.

Review the full history →Back to the contents

References

  1. P. W. Shor (1995). “Scheme for reducing decoherence in quantum computer memory”. Physical Review A, 52(4).
  2. A. M. Steane (1996). “Error Correcting Codes in Quantum Theory”. Physical Review Letters, 77(5).
  3. E. Knill and R. Laflamme (1997). “Theory of quantum error-correcting codes”. Physical Review A, 55(2).
  4. D. Gottesman (1997). Stabilizer Codes and Quantum Error Correction. PhD thesis, Caltech.
  5. D. Aharonov and M. Ben-Or (1997). “Fault-tolerant quantum computation with constant error”. STOC.
  6. A. Y. Kitaev (2003). “Fault-tolerant quantum computation by anyons”. Annals of Physics, 303 (arXiv 1997).
  7. J. Preskill (2018). “Quantum Computing in the NISQ era and beyond”. Quantum, 2.
  8. Google Quantum AI and collaborators (2025). “Quantum error correction below the surface code threshold”. Nature, 638.