Quantum repetition code[1]


Encodes \(1\) qubit into \(n\) qubits according to \(|0\rangle\to|\phi_0\rangle^{\otimes n}\) and \(|1\rangle\to|\phi_1\rangle^{\otimes n}\). Also known as a bit-flip code when \(|\phi_i\rangle = |i\rangle\), and a phase-flip code when \(|\phi_0\rangle = |+\rangle\) and \(|\phi_1\rangle = |-\rangle\).

The \(\pm\)-basis codewords for the bit-flip code are GHz (a.k.a. cat) states \(|0\rangle^{\otimes n}\pm|1\rangle^{\otimes n}\). These are ground states of the one-dimensional classical Ising model Hamiltonian \(H=\sum_{i} Z_{i}Z_{i+1}\).

The \(\pm\)-basis codewords for the phase-flip code are expanded in the computational basis as \begin{align} \begin{split} |\overline{+}\rangle =\frac{1}{\sqrt{2^{n-1}}}\sum_{\sum_{i}v_{i}=0}|v_{1},\cdots,v_{n}\rangle~{\phantom{,}}\\ |\overline{-}\rangle =\frac{1}{\sqrt{2^{n-1}}}\sum_{\sum_{i}v_{i}=1}|v_{1},\cdots,v_{n}\rangle~, \end{split} \end{align} showing that the phase-flip code stores information in the total parity of the qubits.


Bit-flip code detects bit-flip errors \(X\) on \(\left\lfloor (n-1)/2\right\rfloor\) qubits and does not detect any phase-flip errors \(Z\). Phase-flip code detects phase-flip errors \(Z\) on \(\left\lfloor (n-1)/2\right\rfloor\) qubits and does not detect any bit-flip errors \(X\). Because they protect against only one type of noise, both codes can be thought of as a classical \([n,1,d]\) repetition code with classical distance \(d=\left\lfloor (n-1)/2\right\rfloor\) embedded in a quantum system.


NMR: 3-qubit device [2].Superconducting circuits: IBM 15-qubit device [3], Google Quantum AI Sycamore utilizing from 5 to 21 qubits [4].Semiconductor spin-qubit devices: 3-qubit devices at RIKEN [5] and Delft [6].Nitrogen-vacancy centers in diamond: 3-qubit device [7].Continuous error correction protocols have been implemented on a 3-qubit superconducting circuit device [8].Liquid-state NMR: 3-qubit phase-flip code [2].See Table S6 in Ref. [4] for a history of earlier implementations.Repetition codes can be used to benchmark device performance [9].


  • Quantum parity code (QPC) — A \([[m_1 m_2,1,\min(m_1,m_2)]]\) QPC is a concatenation of a \(m_1\) bit-flip and a \(m_2\) phase-flip repetition codes, reducing to a repetition code when \(m_1\) or \(m_2\) is one.


  • Hamiltonian-based code — Bit-flip codespace is the ground-state space of a one-dimensional classical Ising model with nearest-neighbor interactions.
  • Binary repetition code
  • GNU permutation-invariant code — GNU codewords for \(g=1\) reduce to the phase-flip code.
  • Self-correcting quantum code — The bit-flip repetition code associated with the 2D classical Ising model is a self-correcting classical memory.
  • Shor \([[9,1,3]]\) code — Shor's code is a concatenation of a three-qubit bit-flip with a three-qubit phase-flip repetition code.
  • Transverse-field Ising model (TFIM) code — When written in the computational basis, the phase-flip and TFIM codewords are superpositions of qubit states of fixed total parity. The superposition is equal for the phase-flip code, whereas some states appear with a \(-1\) coefficient for TFIM code. However, the TFIM code can be encoded in constant depth.
  • Very small logical qubit (VSLQ) code — Parts of the VSLQ codewords resemble the two-qubit phase-flip repetition code, though the code cannot correct phase errors. Unlike the phase-flip code, the VSLQ code can correct for single photon loss because it uses the second excited state in the construction, which remains distinct from the vacuum even after photon loss.

Zoo code information

Internal code ID: quantum_repetition

Your contribution is welcome!

on github.com (edit & pull request)

edit on this site

Zoo Code ID: quantum_repetition

Cite as:
“Quantum repetition code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022. https://errorcorrectionzoo.org/c/quantum_repetition
@incollection{eczoo_quantum_repetition, title={Quantum repetition code}, booktitle={The Error Correction Zoo}, year={2022}, editor={Albert, Victor V. and Faist, Philippe}, url={https://errorcorrectionzoo.org/c/quantum_repetition} }
Permanent link:


A. Peres, “Reversible logic and quantum computers”, Physical Review A 32, 3266 (1985). DOI
D. G. Cory et al., “Experimental Quantum Error Correction”, Physical Review Letters 81, 2152 (1998). DOI; quant-ph/9802018
J. R. Wootton and D. Loss, “Repetition code of 15 qubits”, Physical Review A 97, (2018). DOI; 1709.00990
Zijun Chen et al., “Exponential suppression of bit or phase flip errors with repetitive error correction”. 2102.06132
Kenta Takeda et al., “Quantum error correction with silicon spin qubits”. 2201.08581
F. van Riggelen et al., “Phase flip code with semiconductor spin qubits”. 2202.11530
T. Nakazato et al., “Quantum error correction of spin quantum memories in diamond under a zero magnetic field”, Communications Physics 5, (2022). DOI
William P. Livingston et al., “Experimental demonstration of continuous quantum error correction”. 2107.11398
Teague Tomesh et al., “SupermarQ: A Scalable Quantum Benchmark Suite”. 2202.11045

Cite as:

“Quantum repetition code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022. https://errorcorrectionzoo.org/c/quantum_repetition

Github: https://github.com/errorcorrectionzoo/eczoo_data/tree/main/codes/quantum/qubits/quantum_repetition.yml.