<p>Since I don’t understand what you don’t understand, I will try to give a quite formal description, hoping it will help.</p>

<p>$\newcommand{ket}[1]{\left|#1\right&gt;}$
Let’s suppose the error is the unitary $U$ applied on the $k$th qubit.
We have
$$\begin{align}
U&amp;=aI+bX+cY+dZ\\&amp;=aI+bX+icXZ+dZ,
\end{align}$$
with $a,b,c,d$ being real numbers, $I$ is the identity, $X, Y, Z$ the Pauli operators. $X$ is a bit-flip, and $Z$ is a phase-flip.
$Y=iXZ$ is a combination of phase and bit-flip.</p>

<p>Let’s look at a coherent version of Shor error correction, one where there is no measurement, but a set $A$ of 8 ancilla qubits, initially in the $\ket{0}$ state. Their final state, if measured in the computational basis, contains the code syndrome. The error correction is described by a unitary $V$ acting the 9 qubits of the code ($B$) and the 8 ancilla qubits. Since the code corrects both bit-flips and phase-flips, we have:
$$
\begin{align}
V⋅(I\otimes I)\ket{\psi}_B\ket{0}_A&amp;=\ket{\psi}_B\ket{0}_A\\
V⋅(X_k\otimes I)\ket{\psi}_B\ket{0}_A&amp;=\ket{\psi}_B\ket{\phi_{k,X}}_A\\
V⋅(Z_k\otimes I)\ket{\psi}_B\ket{0}_A&amp;=\ket{\psi}_B\ket{\phi_{k,Z}}_A\\
\end{align}
$$
The action of $Y_k=iX_kZ_k$ is also corrected, since it is a phase-flip followed by a bitflip $^*$ :
$$
\begin{align}
V⋅(I_k\otimes I)\ket{\psi}_b\ket{0}_a&amp;=iV⋅(X_k\otimes I)⋅(Z_k\otimes I)\ket{\psi}_b\ket{0}_a\\
&amp;=\ket{\psi}_b\ket{\phi_{k,Y}}_a\\
\end{align}
$$</p>

<p>If we apply this to an arbitrary error $U_k$ on the $k$th qubit, we have :
$$V⋅(U_k\otimes I)\ket{\psi}_b\ket{0}_a=\ket{\psi}_b\left(a\ket0_a+b\ket{\phi_{k,X}}_A+c\ket{\phi_{k,Y}}_A+d\ket{\phi_{k,Z}}_A\right) $$
and the vector $\ket{\psi}_b$ is recovered.</p>

CC BY-SA 3.0
2015-07-31T12:35:04.827Z
2015-07-31T12:35:04.827Z
Frédéric Grosshans
<p>I know that Shor's 9 bit code can correct phase or bit flip, but I'd like to show that it can correct any type of error on a single qubit. I know that an arbitrary error can be expressed with the error base (phase flipe and bit flip), but I'm lacking the understanding of how does this assist me in deducing that any arbitrary error can be corrected?</p>

<quantum-computing>
Verifying Shor's quantum error correction code
Dan D-man
# Verifying Shor's quantum error correction code

(Asked by: username_0 on 2015-07-31)

I know that Shor's 9 bit code can correct phase or bit flip, but I'd like to show that it can correct any type of error on a single qubit. I know that an arbitrary error can be expressed with the error base (phase flipe and bit flip), but I'm lacking the understanding of how does this assist me in deducing that any arbitrary error can be corrected?

**Tags:** quantum-computing

---

## 1 answers

### Answer by username_1 on 2015-07-31. Score: 1

Since I don’t understand what you don’t understand, I will try to give a quite formal description, hoping it will help.

$\newcommand{ket}[1]{\left|#1\right>}$
Let’s suppose the error is the unitary $U$ applied on the $k$th qubit.
We have
$$\begin{align}
U&=aI+bX+cY+dZ\\&=aI+bX+icXZ+dZ,
\end{align}$$
with $a,b,c,d$ being real numbers, $I$ is the identity, $X, Y, Z$ the Pauli operators. $X$ is a bit-flip, and $Z$ is a phase-flip.
$Y=iXZ$ is a combination of phase and bit-flip.

Let’s look at a coherent version of Shor error correction, one where there is no measurement, but a set $A$ of 8 ancilla qubits, initially in the $\ket{0}$ state. Their final state, if measured in the computational basis, contains the code syndrome. The error correction is described by a unitary $V$ acting the 9 qubits of the code ($B$) and the 8 ancilla qubits. Since the code corrects both bit-flips and phase-flips, we have:
$$
\begin{align}
V⋅(I\otimes I)\ket{\psi}\_B\ket{0}\_A&=\ket{\psi}\_B\ket{0}\_A\\
V⋅(X\_k\otimes I)\ket{\psi}\_B\ket{0}\_A&=\ket{\psi}\_B\ket{\phi\_{k,X}}\_A\\
V⋅(Z\_k\otimes I)\ket{\psi}\_B\ket{0}\_A&=\ket{\psi}\_B\ket{\phi\_{k,Z}}\_A\\
\end{align}
$$
The action of $Y\_k=iX\_kZ\_k$ is also corrected, since it is a phase-flip followed by a bitflip $^\*$ :
$$
\begin{align}
V⋅(I\_k\otimes I)\ket{\psi}\_b\ket{0}\_a&=iV⋅(X\_k\otimes I)⋅(Z\_k\otimes I)\ket{\psi}\_b\ket{0}\_a\\
&=\ket{\psi}\_b\ket{\phi\_{k,Y}}\_a\\
\end{align}
$$

If we apply this to an arbitrary error $U\_k$ on the $k$th qubit, we have :
$$V⋅(U\_k\otimes I)\ket{\psi}\_b\ket{0}\_a=\ket{\psi}\_b\left(a\ket0\_a+b\ket{\phi\_{k,X}}\_A+c\ket{\phi\_{k,Y}}\_A+d\ket{\phi\_{k,Z}}\_A\right) $$
and the vector $\ket{\psi}\_b$ is recovered.


---

