Noise & Error Correction
Fighting decoherence: how fragile qubits become reliable computers.
Today's best qubits forget what they were told within a fraction of a millisecond, and a typical two-qubit operation fails somewhere between once in a hundred and once in a thousand tries. Large quantum algorithms need billions of operations. This lesson shows how that gap gets closed: not with perfect hardware, but by catching errors you are not even allowed to look at.
What you’ll learn
- Explain what decoherence does to a qubit, and what the times and measure.
- Describe noise as a Bloch vector shrinking into the ball, with a loss of purity.
- Show how the three-qubit repetition code fixes a bit flip without learning the encoded state.
- Explain why quantum codes must also catch phase flips, and what the surface code and the threshold promise.
- Name the five Excited State subtopics and the question each one answers.
Why qubits are fragile
A classical bit is robust because it is big. A bit in your laptop's memory is stored in the charge of many thousands of electrons, and no stray disturbance can flip all of them at once. A qubit cannot be protected that way. Its power lies in superposition and in the relative phase between and , and both are wiped out whenever the outside world gains information about the qubit.
Any stray interaction (an emitted photon, a fluctuating magnetic field, a vibration of the chip) that lets the environment "notice" whether the qubit is or acts like an unintended measurement. This is decoherence: the qubit's quantum information leaks into its surroundings, where you can never get it back.
Three more facts make the problem look hopeless at first:
- No copying. The no-cloning theorem forbids making backup copies of an unknown qubit.
- No peeking. Measuring a qubit to check it for errors collapses its superposition.
- Errors are continuous. A qubit can be rotated by , not just flipped, so there seem to be infinitely many different errors to fix.
By the end of this lesson you will have seen how all three obstacles are overcome.
Think first If quantum states are so fragile, why not simply isolate the qubit perfectly from everything?
Because you must also control it. The wires, lasers and couplings that apply gates and read out the qubit inevitably connect it to the outside world. A perfectly isolated qubit would be a perfect memory that you could never use. Every hardware platform balances isolation against control.
Two clocks: T₁ and T₂
Noise is characterized by two standard experiments. Both use the Bloch sphere, where a pure state is an arrow of length 1.
- Energy relaxation (). A qubit prepared in the excited state eventually hands its energy to the environment and falls to . The probability of still finding decays as .
- Dephasing (). A qubit prepared in has a definite phase. Random jitter of the qubit's frequency scrambles that phase, so the horizontal part of the arrow shrinks as , even if the chances of and never change.
A qubit with is prepared in . After , what is the probability (in %) that it is still in ?
Show the answer
37 %
. After one about 37% of the excitation remains; after only about 5%.
How bad is that? As of the mid-2020s, good superconducting qubits have and of tens to hundreds of microseconds, while a gate takes tens of nanoseconds: room for roughly a thousand to ten thousand operations before the qubit forgets, and imperfect control adds errors on top. Trapped ions keep their phase for seconds or longer but run gates more slowly. What matters is the error per operation, and every platform is still far from the billions of reliable operations that large algorithms need.
Noise makes states mixed
What does a partly dephased qubit look like? Suppose that with probability 10% a random phase flip hit the qubit, turning into , and you don't know whether it happened. The honest description is a mixed state: with probability and with probability , written as a density matrix .
Mixed states live inside the sphere, in the Bloch ball. The shorter the arrow, the less you know about the qubit, and the lower its purity . Purity runs from 1 (pure, on the surface) down to ½ (the center: a perfectly random qubit).
A qubit starts in and is completely dephased, so its Bloch vector reaches the center. What do you now get when you measure it?
- every time in the basis
- 50/50 in the basis, but every time in the basis
- 50/50 in the basis and 50/50 in the basis
- every time in the basis
Show the answer
C. 50/50 in the basis and 50/50 in the basis
At the center of the ball : a fair coin in every basis. In the basis was already 50/50, so nothing changed there. The damage shows only in the basis, where used to give with certainty.
Redundancy without copying
Classical engineers beat noise with redundancy: send as and as , then take a majority vote. A single flipped bit is outvoted.
The quantum version cannot copy three times. Instead it spreads the state over three qubits:
These are not three copies (that would be ). It is one logical qubit stored in the correlations of three physical qubits: an entangled state made with two CNOT gates.
To find a flip without looking at and , measure only parities: is qubit 1 equal to qubit 2? Is qubit 2 equal to qubit 3? These checks, written and , give the same answer for and . So they reveal where a flip happened while revealing nothing about the encoded state. The pattern of answers is the syndrome.
| Flipped qubit | Correction | ||
|---|---|---|---|
| none | nothing | ||
| 1 | flip qubit 1 | ||
| 2 | flip qubit 2 | ||
| 3 | flip qubit 3 |
Each qubit flips independently with probability . The code fails only when two or three qubits flip. What is the logical failure rate, in %?
Show the answer
2.8 %
: about 2.8%, versus 10% unprotected. Because , the code helps whenever and helps enormously for small : at , .
Phase flips, and why quantum codes work at all
The repetition code has a blind spot. A phase flip on any one qubit turns into . Both parity checks still read , and the logical state is silently damaged. Real qubits suffer phase errors at least as often as bit flips; that is what measures.
The fix is a neat symmetry: a Hadamard turns phase flips into bit flips, . So a code that repeats in the basis catches phase flips. In 1995 Peter Shor nested the two ideas into a 9-qubit code that corrects any error on any single qubit: the first quantum error-correcting code.
Think first Why not simply measure each of the three qubits to see which one flipped?
Measuring qubit 1 in the basis would collapse to or , destroying the very superposition you wanted to protect. A parity measurement asks only "same or different?", which has the same answer in both branches, so the superposition survives.
The surface code
Today's leading design is the surface code: data qubits on a 2D grid, with parity checks on small groups of neighbors. Some checks are -type (they catch errors) and some are -type (they catch errors). Each check involves at most four nearby qubits, which suits chips where qubits only talk to their neighbors.
Below is the smallest interesting patch: 9 data qubits and 8 checks, enough to correct any single error.
That experiment shows what a code's distance means: the smallest number of errors that can fool it. This patch has distance 3. A larger patch has a larger distance, so it fails only when a long chain of errors happens to line up. That becomes exponentially unlikely as the patch grows, provided each qubit's error rate is below a threshold, roughly 1% for the surface code.
Fault tolerance and the road ahead
There is a catch: the checks themselves are carried out by noisy gates and measurements. Fault-tolerant design arranges every step so that a single fault cannot spread into many errors. The threshold theorem (proved in the late 1990s) then guarantees that below the threshold error rate, arbitrarily long quantum computations can be made reliable, with an overhead that grows only polylogarithmically with the size of the computation.
The price is steep: at today's error rates, each logical qubit may need hundreds to thousands of physical qubits. Until such machines exist, NISQ devices rely on error mitigation: run noisy circuits cleverly and post-process the results to estimate what a noiseless device would have produced. Mitigation reduces bias, but its cost grows exponentially with circuit size, so it complements error correction rather than replacing it.
| Excited State lesson | The question it answers |
|---|---|
| Decoherence: T₁, T₂ and Noise | How do relaxation and dephasing act on density matrices? Kraus operators, the Bloch equations and a proof that . |
| Quantum Error Correction Basics | How do the bit-flip, phase-flip and Shor codes work, and why does fixing and fix every error? |
| Stabilizer Codes & the Surface Code | How do you describe a code by the Pauli checks that fix it, and how are surface-code syndromes decoded? |
| Fault Tolerance & the Threshold Theorem | How can a computer built from faulty parts compute reliably, and where do non-Clifford gates come from? |
| Error Mitigation for Near-Term Devices | How can you get better answers from noisy hardware without full error correction, and at what cost? |
Key takeaways
- Decoherence is the environment acquiring information about a qubit; it erases superposition and phase.
- measures energy relaxation () and the loss of phase coherence; always .
- Noise shrinks the Bloch vector into the ball: states become mixed and their purity drops below 1.
- Quantum codes spread one logical qubit over many physical qubits and measure only parities (syndromes), which locate errors without revealing the encoded state.
- Syndrome measurement digitizes errors. Codes such as Shor's and the surface code catch both bit and phase flips, and below threshold bigger codes give exponentially fewer logical errors.
Check yourself
In the interactive lesson these are scored with your confidence, and what you miss comes back for review.
Which experiment measures ?
- Prepare and record how fast the population of decays
- Prepare and record how fast the phase coherence decays
- Prepare and record how often it is read out as
- Apply many gates in a row and count the failures
Show the answer
A. Prepare and record how fast the population of decays
is the energy-relaxation time: an excited qubit decays toward with .
A device reports . Which value of is physically impossible?
Show the answer
C.
, because relaxation by itself already destroys coherence. is exactly the limit, reached when there is no extra dephasing.
Why does the three-qubit code measure the parities and instead of each qubit individually?
- Parity measurements are faster on real hardware
- Parities locate a bit flip without revealing (or disturbing) and
- Measuring individual qubits would copy the state and violate no-cloning
- Individual measurements cannot detect bit flips
Show the answer
B. Parities locate a bit flip without revealing (or disturbing) and
and have the same parities, so the checks cannot tell the two branches of the superposition apart and leave it intact. Measuring single qubits would collapse it.
A phase flip hits one qubit of the three-qubit bit-flip code. What happens?
- The syndrome points to the right qubit and the error is fixed
- The syndrome points to the wrong qubit
- Both checks read
- Both checks read , and the logical state is silently corrupted
Show the answer
D. Both checks read , and the logical state is silently corrupted
flips no bit, so the parities are unchanged and the syndrome is trivial, yet . That is why real codes, like Shor's or the surface code, also check in the basis.
What does it mean for physical error rates to be "below threshold"?
- Physical errors no longer happen
- Making the code bigger makes logical errors rarer, without limit
- The logical error rate equals the physical error rate
- Error mitigation becomes unnecessary for every circuit
Show the answer
B. Making the code bigger makes logical errors rarer, without limit
Below threshold, each increase in code distance suppresses the logical error rate further, so it can be made as small as an algorithm needs. Above threshold, bigger codes just add more places for errors to occur and make things worse.
Go deeper
- Decoherence: T₁, T₂ and Noise · How the environment steals quantum information.
- Quantum Error Correction Basics · Protecting information you are not allowed to look at.
- Stabilizer Codes & the Surface Code · The leading blueprint for fault-tolerant quantum computers.
- Fault Tolerance & the Threshold Theorem · Computing reliably with unreliable parts.
- Error Mitigation for Near-Term Devices · Extracting better answers from noisy hardware without full QEC.
Further reading
- M. A. Nielsen & I. L. Chuang, Quantum Computation and Quantum Information, Ch. 8 (quantum noise) and Ch. 10 (quantum error correction) (Cambridge, 10th anniv. ed., 2010).
- D. Gottesman, "An introduction to quantum error correction and fault-tolerant quantum computation", arXiv:0904.2557 (2009).