# How are quantum error-correction conditions in Nielsen and Chuang implemented in practice?

Quantum error-correction conditions in Nielsen and Chuang, 10th-anniversary edition (Theorem 10.1) state that the error operation $$\mathcal{E}$$ with operation elements $$\{E_i\}$$ is correctable if and only if $$PE^\dagger_iE_jP=\alpha_{ij}P$$, where $$P$$ is a projector onto the code space $$C$$ and $$\alpha$$ is a Hermitian matrix. Here $$C$$ is understood as a subspace of the full Hilbert space that contains the states that need to be protected against noise. The proof of the theorem relies on properties of the projection operator $$P$$ among other things.

The basic example that illustrates how error correction works uses either the repetition code or the Shor code.In the repetition code, the original 1 qubit state (that needs to be protected) $$|\psi\rangle=a|0\rangle+b|1\rangle$$ is mapped into $$a|000\rangle+b|111\rangle$$. Then bit-flip error occurs on one of the 3 qubits and it is demonstrated how this bit-flip can be corrected. If the bit-flip operation is $$\mathcal{E}$$, then encoding of the original state must be $$P$$, ie projection of the full Hilbert space onto the code space, but neither repetition code, nor Shor code is a projection operator, they're just combinations of standard unitary gates.

I'm trying to understand how theorem 10.1 is related to the actual error-correction codes, and how is projection operators required by Theorem 10.1 implemented in practice.

A quantum error correcting code always defines a codespace, that is a subspace of the Hilbert space on $$n$$ qubits. For example the 3-qubit bitflip code's codespace is that spanned by the vectors $$|000\rangle$$ and $$|111\rangle$$.
Given a QEC with a set of basis vectors $$|c_i\rangle$$ its projector is just given by $$P = \sum_i |c_i\rangle\langle c_i|$$ So $$P = |000\rangle\langle 000| + |111\rangle\langle 111|$$ for the bitflip code.
An error $$E$$ has the effect of transforming the codespace within the larger Hilbert space. All theorem 10.1 is saying is that for a set of errors $$E_i$$ to be correctable, the corresponding transformed codespaces must not overlap. If they did overlap, then it would not be possible to tell which error had moved a codeword out of the original codespace, and therefore not possible to correct it.
• Thank you, it does make sense to me, but if you look at the implementation of the 3-qubit bit flip example, the encoding of the original state (=projection onto the codespace?) is just a repetition of the state of the original qubit (i.e. CNOT(q0,q1)CNOT(q0,q2)) which if I am not mistaken can be expressed as $C = |0\rangle\langle 0|\otimes I\otimes I + |1\rangle\langle 1|\otimes X\otimes X$, and as such $C$ is not a projection operator $P$. That's what I'm trying to understand how does the implementation of the bit flip error correction correspond to the condition of Theorem 10.1. Apr 21 at 14:33
• The theorem doesn't say anything about implementations, it's just a mathematical condition for a code to be able to correct a set of errors. For the 3-bit repetition code it will tell you the set of all single-qubit bitflip errors is correctable. Or that the set of all two-qubit bitflip errors is correctable. But a set containing both $X_1$ and $X_2 X_3$ is not. Once you know a set of errors is correctable, you can then figure out how to actually correct them. Apr 21 at 19:13
• It doesn't say about implementation, but the sufficiency of the condition is proved by constructing explicit error-correction operation $\mathcal{R}(\sigma)=\sum_kU^\dagger_kP_k\sigma P_kU_k$. It's my understanding that as any other quantum operation $\mathcal{R}$ has some corresponding system-environment interaction model and that model can be implemented as a quantum circuit. Is this assumption incorrect? Apr 22 at 12:44