Shor Code
Last updated Jun 24, 2022
Chapter 4 - Multiple Quantum Bits > Shor Code
# Shor Code
- Shor code combines the phase-flip code and bit-flip code to correct both kinds of errors.
- We start off with the phase-flip code, i.e. $$\begin{aligned}
\ket{0_L} &= \ket{+++} \
&= \frac{1}{\sqrt2}(\ket{0} + \ket{1}) \frac{1}{\sqrt2}(\ket{0} + \ket{1}) \frac{1}{\sqrt2}(\ket{0} + \ket{1}) \
&= \frac{1}{2^{3/2}}(\ket{0} + \ket{1})(\ket{0} + \ket{1})(\ket{0} + \ket{1}).
\end{aligned}$$ Next, to correct the bit-flip error, we use bit-flip encoding to replace each of the three qubits, i.e., $\ket{0} \rightarrow \ket{000}$ and $\ket{1} \rightarrow \ket{111}$, so that each logical qubit is encoded using nine physical qubits: $$\ket{0_L} = \frac{1}{2^{3/2}}(\ket{000} + \ket{111})(\ket{000} + \ket{111})(\ket{000} + \ket{111}).$$
Same goes for the $\ket{1_L} = \ket{—}$, i.e. $$\ket{1_L} = \frac{1}{2^{3/2}}(\ket{000} - \ket{111})(\ket{000} - \ket{111})(\ket{000} - \ket{111}).$$ - Following that, the state of a general logical qubit is $$\begin{aligned}\alpha\ket{0_L} + \beta \ket{1_L} &= \frac{\alpha}{2^{3/2}}\frac{1}{2^{3/2}}(\ket{000} + \ket{111})(\ket{000} + \ket{111})(\ket{000} + \ket{111}) \newline &+ \frac{\beta}{2^{3/2}} \frac{1}{2^{3/2}}(\ket{000} - \ket{111})(\ket{000} - \ket{111})(\ket{000} - \ket{111}).\end{aligned}$$
- This encoding is called the Shor Code, named after its inventor, Peter Shor.