# Why do we use ancilla qubits for error syndrome measurements?

Consider the measurement of the syndrome for the standard 3-qubit code to correct bit flips: $$\def\place#1#2#3{\smash{\rlap{\hskip{#1px}\raise{#2px}{#3}}}} \def\hline#1#2#3{\place{#1}{#2}{\rule{#3px}{1px}}} \def\vline#1#2#3{\place{#1}{#2}{\rule{1px}{#3px}}} % \hline{30}{30}{210} \hline{30}{60}{210} \hline{30}{150}{210} \hline{30}{180}{210} \hline{30}{210}{210} % \vline{60}{60}{150} \vline{90}{60}{120} \vline{120}{30}{150} \vline{150}{30}{120} % \place{46}{51}{\huge{\oplus}} \place{76}{51}{\huge{\oplus}} \place{106}{21}{\huge{\oplus}} \place{136}{21}{\huge{\oplus}} % \place{30}{205}{\llap{Z_1}} \place{30}{175}{\llap{Z_2}} \place{30}{145}{\llap{Z_3}} % \place{241}{41}{\left. \rule{0px}{22.5px} \right\} M} % \phantom{\rule{280px}{225px}}_{\Large{.}}$$

Here $M$ is a measurement in the computational basis. This circuit measures $Z_1Z_2$ and $Z_2Z_3$ of the encoded block (i.e. the top three). My question is why measure these using ancilla qubits - why not just measure the 3 encoded qubits directly? Such a setup would mean you would not have to use c-not gates which from what I have heard are hard to implement.

(Note I have only given this 3-qubit code as an example I am interested in general syndrome measurements on general codes).

The key point of quantum error correction is precisely to correct the errors without collapsing the qubits, right? If we measure the encoded qubits we project the qubits to $\left|0\right>$ or $\left|1\right>$ and lose all the information in the coefficients $\alpha \left|0\right> + \beta \left|1\right>$. By measuring ancilla qubits we can know what has happened to the qubits without actually knowing the values of the qubits: this enables us to correct errors in a non-destructive way, and carry on with our quantum operation.

When you say "why not just measure the 3 encoded qubits directly", are you thinking that you could measure $Z_1$, $Z_2$ and $Z_3$, and that, from there, you can calculate the values $Z_1Z_2$ and $Z_2Z_3$?

This is sort of true: if your only goal is to obtain the observables $Z_1Z_2$ and $Z_2Z_3$, you could do this.

But that is not your end goal, which is, instead, to preserve the information encoded in the logical state. The only way you can do this is to learn nothing about the state that is encoded. Effectively, measuring in this way gives you too much information: it gives you 3 bits of information (1 bit from each measurement that you perform) when you only need 2 bits. Where does this extra bit come from? It is one bit of information about the state that you have encoded. In other words, you have measured the encoded state, destroying any superposition that you are specifically trying to use the error correcting code to protect.