I am very confused about the error correction condition in the 3-qubit repetition code when considering phase flip ($Z_i$) errors.

It is well known that this code fails to protect from phase flip errors. I want to check this using the general error correction condition: \begin{equation} \Pi E_{i}^{\dagger}E_{j}\Pi=c_{ij}\Pi \end{equation} with $\Pi=|000\rangle\langle000|+|111\rangle\langle111|$ the projector on the code space. The error is said correctable if $c_{ij}$ are elements of an Hermitian matrix. When taking $E_{i}=Z_{i}$ with $i=1,2,3$, one sees immediately that \begin{equation} \Pi E_{i}^{\dagger}E_{j}\Pi=\Pi\Longrightarrow c_{ij}=1\;\;\;\;\;\textrm{for all}\;i,j \end{equation} from which one concludes that these error should be correctable. This result is also consistent with the fact that this is a stabilizer code with stabilizer group $S=\{Z_{1}Z_{2},Z_{2}Z_{3},Z_{1}Z_{3},I\}$.

However is this not in contraddiction to the fact that the repetition code does not protect from phase flip errors?

  • $\begingroup$ Adam thank you very much for your answer, very complete and clear! $\endgroup$
    – user25295
    May 15, 2023 at 14:27

1 Answer 1


TL;DR: One mustn't forget to include identity among the error operators. Excluding it is equivalent to us somehow knowing when a phase flip occurred. The satisfied error correction conditions just tell us the obvious: that armed with the knowledge when a phase flip error occurred, we can easily fix it: just apply another phase flip. However, it is not realistic to assume we have that knowledge. Including identity in the set of error operators immediately breaks the error correction conditions, as expected.

Quantum error correction conditions

Suppose that the quantum channel $\mathcal{E}(\rho)=\sum_iE_i\rho E_i^\dagger$ where $\sum_iE_i^\dagger E_i=I$ describes the noise affecting a quantum processor running a quantum error correcting code with projector $\Pi$. The quantum error correction conditions say that $$ \Pi E_i^\dagger E_j \Pi=c_{ij}\Pi\tag1 $$ with $c_{ij}$ Hermitian if and only if there exists a recovery channel $\mathcal{R}$ such that $$ \mathcal{R}(\mathcal{E}(\rho))\propto\rho\tag2 $$ for any state $\rho$ in the code subspace. The proof of the above theorem (see e.g. $10.1$ on page $436$ in Nielsen & Chuang) explains how to construct $\mathcal{R}$. Actually going through the construction step by step would be one way to clear the misunderstanding.

Recovery channel

However, in this case, we can construct $\mathcal{R}$ easily without opening the book. Here it is: $$ \mathcal{R}(\rho)=Z_1\rho Z_1.\tag3 $$ Why does this work? Well, because the question makes the (unrealistic) assumption that the set of errors $E_i=Z_i$ with $i=1,2,3$ consists of $Z$ errors and nothing else. This assumption is essentially a promise that a single $Z$ error occurred! If we know that a single $Z$ error occurred in the repetition code, then even without knowing the affected qubit, we can correct it by flipping the phase of one of the qubits.

Realistic set of errors

A more realistic set of errors consists of $E_0=I$ and $E_i=Z_i$ with $i=1,2,3$. In this case we find $$ \Pi E_0^\dagger E_1\Pi=|000\rangle\langle 000|-|111\rangle\langle 111|\tag4 $$ which cannot be a scalar multiple of $\Pi$ since it has both a positive and a negative eigenvalue. This time the quantum error correction conditions fail for phase flip errors in agreement with the well-known fact that these errors are not correctable by the code.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.