Shor \([[9,1,3]]\) code[1]


Nine-qubit CSS code that is the smallest such code to correct a single-qubit error. The logical state is encoded using \begin{align} \begin{split} |\overline{0}\rangle&=\frac{1}{2\sqrt{2}}\left(|000\rangle+|111\rangle\right)^{\otimes3}\\ |\overline{1}\rangle&=\frac{1}{2\sqrt{2}}\left(|000\rangle-|111\rangle\right)^{\otimes3}~. \end{split} \end{align} The code works by concatenating each qubit of a phase-flip with a bit-flip repetition code. Therefore, the code can correct both type of errors simultaneously.

Specifically, a state is phase-flip error-corrected by a three-qubit phase-flip repetition code, with stabilizer generators \(X_0 X_1I_2\) and \(X_0I_1X_2\) in \(X\) basis, where the subscript represents the qubit index. Each logical qubit is encoded using \begin{align} \label{eq:phase-flip} \begin{split} |\overline{0}\rangle &= |+_0+_1+_2\rangle \\ |\overline{1}\rangle &= |-_0-_1-_2\rangle . \end{split} \end{align} Then, each physical qubit used in \eqref{eq:phase-flip} is further encoded in the three-qubit bit-flip repetition code, \begin{align} |\pm _j \rangle = \frac{1}{\sqrt{2}}( |0_{j0}0_{j1}0_{j2}\rangle \pm |1_{j0}1_{j1}1_{j2}\rangle), \end{align} each with bit-flip error stabilizer generators \(Z_{j0}Z_{j1}I_{j2}\) and \(Z_{j0}I_{j1}Z_{j2} \) with \(j=0,1,2\). Notice now the phase-flip error stabilizer generator is extended as \(X_j = X_{j0}X_{j1}X_{j2}\). As a result, the stabilizer generators with the qubit index flattened are \begin{align} \begin{split} Z_{j0}Z_{j1}I_{j2} &\rightarrow \{Z_0Z_1, Z_3Z_4, Z_6Z_7\} \\ Z_{j0}I_{j1}Z_{j2} &\rightarrow \{Z_0Z_2, Z_3Z_5, Z_6Z_8\} \\ X_0 X_1I_2 &\rightarrow \{X_0X_1X_2X_3X_4X_5\}\\ X_0 I_1X_2 &\rightarrow \{X_0X_1X_2X_6X_7X_8\}. \end{split} \end{align}


The code detects two-qubit errors or corrects an arbitrary single-qubit error.


Trapped-ion qubits: state preparation with 98.8(1)% and 98.5(1)% fidelity for state \(|\overline{0}\rangle\) and \(|\overline{1}\rangle\), respectively, by N. Linke group [2]. Variants of the code to handle coherent noise studied and realized by K. Brown and C. Monroe groups [3].All-photonic quantum repeater architecture [4].


Shor's code is the first known quantum error correction code.



Zoo code information

Internal code ID: shor_nine

Your contribution is welcome!

on (edit & pull request)

edit on this site

Zoo Code ID: shor_nine

Cite as:
“Shor \([[9,1,3]]\) code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022.
@incollection{eczoo_shor_nine, title={Shor \([[9,1,3]]\) code}, booktitle={The Error Correction Zoo}, year={2022}, editor={Albert, Victor V. and Faist, Philippe}, url={} }
Permanent link:


P. W. Shor, “Scheme for reducing decoherence in quantum computer memory”, Physical Review A 52, R2493 (1995). DOI
N. H. Nguyen et al., “Demonstration of Shor Encoding on a Trapped-Ion Quantum Computer”, Physical Review Applied 16, (2021). DOI; 2104.01205
D. M. Debroy et al., “Optimizing Stabilizer Parities for Improved Logical Qubit Memories”, Physical Review Letters 127, (2021). DOI; 2105.05068
R. Zhang et al., “Loss-tolerant all-photonic quantum repeater with generalized Shor code”, Optica 9, 152 (2022). DOI; 2203.07979
Michael H. Freedman and David A. Meyer, “Projective plane and planar quantum codes”. quant-ph/9810055

Cite as:

“Shor \([[9,1,3]]\) code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022.