Qubits make mistakes
An ordinary computer stores information as bits, each a 0 or a 1, held by tiny electronic switches. These switches almost never make a mistake on their own.
A quantum computer stores information in qubits. A qubit can hold more than a plain 0 or 1, and that is part of where its power comes from. Holding that in-between state is also what makes qubits fragile. Heat disturbs them. Stray electric and magnetic fields disturb them. Even the operations the machine performs on them add small mistakes. Qubits make mistakes all the time.
Small mistakes add up
A useful quantum calculation needs millions of steps. If each step has even a small chance of going wrong, the chance that every step goes right becomes tiny, and the answer at the end is noise.
Better qubits help, but no qubit is perfect. For a long calculation, the mistakes have to be found and undone while it runs. That is what error correction does. Making it work is one of the main obstacles between the quantum computers we have and useful ones.
The old remedy is a vote
Engineers solved this problem for ordinary signals long ago. To protect one bit, store it several times. If one copy flips, the others outvote it. With five copies and a majority vote, the stored bit survives any two flips. It is lost only when three or more go wrong.
qubit flipped check lit: neighbours disagree
This figure needs JavaScript.
How often the stored bit is lost
Try it. Flip qubits by hand or press Random errors, then press Correct. The figure tells you whether the stored bit survived.
The table asks how often the stored bit is lost when every qubit has the same chance of flipping. When errors are rare, more copies help: with seven qubits the bit is lost far less often than with one. Now move the slider up. Once each qubit is more likely to flip than not, a vote among more copies goes wrong more often, not less.
The turning point, where adding qubits stops helping and starts hurting, is called the threshold. For this simple scheme it sits at an error chance of one half. Real codes have a threshold too, and the qubits must be better than it before adding more of them pays off.
A quantum computer cannot look
There is a catch. A vote needs you to read every copy. Reading a qubit is a measurement, and measuring a qubit destroys the delicate information it holds.
So quantum error correction never asks what a qubit holds. It asks a weaker question about two neighbours: do they agree? The answer says nothing about the stored value, so asking it does no harm. In the figure, the diamonds between the qubits are these checks. A check lights up when its two neighbours disagree.
The lit checks are enough. One flipped qubit in the middle lights the two checks on either side of it. From the pattern of lit checks, Correct works out the smallest set of flips that explains it, and undoes them. That gives the same answer as the vote, without reading a single qubit. The figure shows you which qubits flipped so you can follow along. A real machine sees only the checks.
Real codes work the same way
Qubits can go wrong in more than one way, so real codes check for more than one kind of error. Many, like the surface code, arrange the qubits on a grid with checks between them. A program called a decoder reads which checks lit up and guesses which errors caused them. The idea is the one in the figure: spread one bit over many qubits, check neighbours without looking, and undo the likely mistakes.
Where to go next
- Try it properly. Quantum Error Correction in Practice is a course with live simulations of real codes and decoders. It assumes some background.
- Read a book instead. The Qubit Dialogues is a conversation about quantum computing in two voices. An Unpolarized Life keeps the two voices and leaves the physics out.
- What I work on. I research quantum error correction.