## 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 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.

Now suppose that one qubit is flipped, say, the second one.
The encoded state then becomes

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**, 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:^{270}

|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

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 (recall Section 7.7).↩︎Recall that an isometry is the generalisation of a unitary but where we are also allowed to bring in additional qubits.↩︎

Again, for now we are assuming that

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