## 13.7 Correcting bit-flips

In order to protect a qubit against bit-flips (thought of as incoherent ^{268}
Let’s return to the example of the three-qubit code that we introduced in Section 13.1.
We take a qubit in some unknown pure state

Mathematically, this is an isometric^{269} embedding of a two-dimensional space into an eight-dimensional one.
It is important to note that this is *not* just the classical repetition code “but with qubits instead of bits” — this would be *impossible* to construct, since the no-cloning theorem tells us that we can never build a circuit that enacts
*entangled* state

Now suppose that one qubit is flipped, say, the second one.
The encoded state then becomes ^{270} requires some care: measuring the three qubits directly would destroy the superposition that we are working so hard to protect.
So instead we introduce two ancilla qubits, both in state

This decoding circuit is exactly the same as the ones for measuring the Pauli stabilisers

Measuring the two ancilla qubits gives us what is known as the **error syndrome** (or sometimes just **syndrome**, for short), which tells us how to correct the three qubits (known as the **data qubits**) of the code.
The theory behind this works as follows:

- if the first and second (counting from the top) data qubits are in the same state then the first ancilla will be in the
|0\rangle state; otherwise the first ancilla will be in the|1\rangle state - if the second and third data qubits are in the same state then the second ancilla will be in the
|0\rangle state; otherwise the second ancilla will be in the|1\rangle state.

So the four possible error syndromes each indicate a different scenario:^{271}

|00\rangle : no error|01\rangle : bit-flip in the first data qubit|10\rangle : bit-flip in the second data qubit|11\rangle : bit-flip in the third data qubit.

In our example, the error syndrome is

It is also important to note that the actual error correction can be implemented by a single unitary operation **??**, writing out this

It is useful to represent syndrome measurements in terms of stabilisers.
For example, a computational basis measurement is represented by the Pauli *all* pairs of qubits in the code; in the case of the three-qubit repetition code, we use the operators

We can compile all the error syndromes (in the case of a single bit-flip) into a table:

Error |
|||
---|---|---|---|

Here the rows are labelled by bit-flip errors, and the columns by the parity-check observables; we write

All the codes we will study have encoding circuits that can be constructed out of controlled-

\texttt{NOT} and Hadamard gates: we are dealing with*Clifford circuits*(Section 7.7).↩︎Recall that an isometry is the generalisation of a unitary but where we are also allowed to bring in additional qubits.↩︎

There is a subtle difference between

**decoding**and**unencoding**: the latter consists of simply reversing the encoding process; the former consists of using the results of measurements (the**error syndrome**) to perform a more adapted “unencoding”.↩︎Again, for now we are assuming that

*at most one*bit-flip error occurs.↩︎