[taken from wikipedia - needs major work)
Classical error correction employs redundancy: The simplest way is to store the information multiple times, and—if these copies are later found to disagree—just take a majority vote; i.e. if, say, one copy says, the bit is a 0, and two others claim it to be a 1, then probably all three were a 1 and the first bit got corrupted.
However, this is not possible with quantum information, as it cannot be copied: see no-cloning theorem.
Therefore it was a relief when Peter Shor realized that, even if the information cannot be copied, the information of one qubit (now called a logical qubit) can be spread onto several (physical) qubits by using a quantum error correcting code. Now, if noise or decoherence corrupts one qubit, the information is not lost.
This is because a quantum error correcting code is designed such that a certain operation, called syndrome measurement can determine whether a qubit has been corrupted, and if so, which one. What is more, the outcome of this operation (the syndrome) tells us not only which physical qubit was affected, but also, in which of several possible ways it was affected.
The latter is counter-intuitive at first sight: Since noise is arbitrary, how can the effect of noise be one of only few distinct possibilities? In most codes, the effect is either a bit flip, or a sign (of the phase) flip, or both (corresponding to the Pauli matrices X, Z, and Y). The reason is that the measurement of the syndrome has the projective effect of a quantum measurement. So even if the error due to the noise was arbitrary, it can be expressed as a superposition of basis operations—the error basis (which is here given by the Pauli matrices and the identity).
So, the syndrome measurement "forces" the qubit to "decide" for a certain specific "Pauli error" to "have happened", and the syndrome tells us which, so that we can let the same Pauli operator act again on the corrupted qubit to revert the effect of the error.
The crucial point is that the syndrome measurement tells us as much as possible about the error that has happened, but nothing at all about the value that is stored in the logical qubit—as otherwise the measurement would destroy any quantum superposition of this logical qubit with other qubits in the quantum computer.
Over time, researchers have come up with several codes:
- Peter Shor's 9-qubit-code, a.k.a. the Shor code, encodes 1 logical qubit in 9 physical qubits and can correct for one bit flip and one phase flip error.
- Andrew Steane found a code which does the same with 7 instead of 9 qubits, see Steane code.
- A generalisation of this concept are the CSS codes, named for their inventors: A. R. Calderbank, Peter Shor and Andrew Steane. A more general class of codes (encompassing the former) are the stabilizer codes of Daniel Gottesman.
- A newer idea is Alexei Kitaev's topological quantum codes.
That these codes allow indeed for quantum computations of arbitrary length is the content of the threshold theorem, found by Michael Ben-Or and Dorit Aharonov, which asserts that you can correct for all errors if you concatenate quantum codes such as the CSS codes—i.e. re-encode each logical qubit by the same code again, and so on, on logarithmically many levels—provided the error rate of individual quantum gates is below a certain threshold; as otherwise, the attempts to measure the syndrome and correct the errors would introduce more new errors than they correct for.