11.8 Quantum error correction

In order to protect a qubit against bit-flips (incoherent X rotations), we rely on the same repetition code, but both encoding and error correction is now done by quantum operations. We take a qubit in some unknown pure state \alpha|0\rangle + \beta|1\rangle, introduce two auxiliary qubits, and encode it into three qubits as

Suppose that at most one qubit is then flipped (say, the second one). The encoded state then becomes \alpha|010\rangle + \beta|101\rangle. Decoding requires some care: if we measure the three qubits directly it would destroy the superposition of states that we are working so hard to protect. Instead we introduce another two additional qubits, both in state |0\rangle, and apply the following network:

We measure the two auxiliary qubits, also known as ancilla bits, and the result of the measurement, known as the error syndrome, tells us how to reset the three qubits of the code. The theory behind this network runs as follows.

If qubits one and two (counting from the top) are the same, then the first ancilla is in the |0\rangle state. Similarly, if qubits two and three are the same, then the second ancilla is in the |0\rangle state. However, if they are different, then the corresponding ancilla is in the |1\rangle state. Hence, the four possible error syndromes — |00\rangle, |01\rangle, |10\rangle, and |11\rangle — each indicate a different possibility: no errors, an error in the third, first, or second qubits (respectively). In our example, we would measure |11\rangle, revealing that both qubits 1 and 2, and qubits 2 and 3, are different. Thus it is qubit 2 that has an error. Knowing the error, we can go back and fix it, simply by applying X to qubit 2. The net result is the state \alpha|000\rangle + \beta|111\rangle, which is then turned into (\alpha|0\rangle + \beta|1\rangle)|0\rangle|0\rangle by running the mirror image of the encoding network.