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} \tag*{(1)}\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. Nevertheless, the phase-flip code can offer some degree of protection in particular physical systems based on superconducting circuits [2,3].


Unitary circuit of depth logarithmic in \(n\) [4]. Any circuit has to have range \(n\) because Ghz states are locally indistinguishable [5].Adaptive constant-depth circuit with geometrically local gates and measurements throughout [6,7].Lindbladian-based dissipative encoding passively protecting against bit flips [8,9].


Toffoli magic-state preparation protocol [10].


Automaton-like decoders for the repetition code on a 2D lattice, otherwise known as the classical 2D Ising model, were developed by Toom [11,12]. An automaton by Gacs yields a decoder for a 1D lattice [13].Machine learning algorithm to implement continuous error-correction for the three-qubit quantum repetition code [14].

Fault Tolerance

Toffoli magic-state preparation protocol [10].


NMR: 3-qubit phase-flip code [15,16], with up to two rounds of error correction in liquid-state NMR [17].Superconducting circuits: 3-qubit phase-flip and bit-flip code by Schoelkopf group [18]; 3-qubit bit-flip code [19]; 3-qubit phase-flip code up to 3 cycles of error correction [20]; IBM 15-qubit device [21]; IBM Rochester device using 43-qubit code [22]; Google system performing up to 8 error-correction cycles on 5 and 9 qubits [23]; Google Quantum AI Sycamore utilizing up to 11 physical qubits and running 50 correction rounds [24]; Google Quantum AI Sycamore utilizing up to 25 qubits for comparison of logical error scaling with a quantum code [25] (see also [26]).Continuous error correction protocols have been implemented on a 3-qubit superconducting qubit device [27].Semiconductor spin-qubit devices: 3-qubit devices at RIKEN [28] and Delft [29].Nitrogen-vacancy centers in diamond: 3-qubit phase-flip code [30,31] (see also Ref. [32]).Trapped-ion device: 3-qubit phase-flip algorithm implemented in 3 cycles on high fidelity gate operations [33]. Both phase- and bit-flip codes for 31 qubits and their stabilizer measurements have been realized by Quantinuum [34].


Repetition codes can be used to benchmark device performance [35].


  • 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.
  • Qubit c-q code — A quantum repetition code 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.
  • Repetition code
  • Two-component cat code — Two-legged cat and quantum repetition codes can be thought of as classical codes because they protect against only one type of noise. Two-legged cat codes (quantum repetition) codes suppress cavity dephasing (bit-flip) noise exponentially with \(|\alpha|^2\) (\(n\)). The stability offered by cat codes has been linked to several favorable properties of phases of matter associated with the repetition-code Hamiltonian [36,37].
  • 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.
  • \(D_4\) hyper-diamond GKP code — The \(D_4\) hyper-diamond GKP code can be seen as a concatenation of a rotated square-lattice GKP code with a repetition code [38]. This is related to the fact that the four-bit repetition code yields the \(D_4\) hyper-diamond lattice code via the mod-two lattice construction.
  • Self-correcting quantum code — The bit-flip repetition code associated with the 2D classical Ising model is a self-correcting classical memory [39; Sec. V.A].
  • \([[9,1,3]]\) Shor code — The Shor 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.
  • GNU permutation-invariant code — GNU codewords for \(g=1\) reduce to the phase-flip code.


A. Peres, “Reversible logic and quantum computers”, Physical Review A 32, 3266 (1985) DOI
K. Keane and A. N. Korotkov, “Simplified quantum error detection and correction for superconducting qubits”, Physical Review A 86, (2012) arXiv:1205.1836 DOI
Á. Rozgonyi and G. Széchenyi, “Break-even point of the quantum repetition code”, (2023) arXiv:2303.17810
D. Cruz et al., “Efficient Quantum Algorithms for GHZ and W States, and Implementation on the IBM Quantum Computer”, Advanced Quantum Technologies 2, 1900015 (2019) arXiv:1807.05572 DOI
S. Bravyi et al., “Obstacles to Variational Quantum Optimization from Symmetry Protection”, Physical Review Letters 125, (2020) arXiv:1910.08980 DOI
A. B. Watts et al., “Exponential separation between shallow quantum circuits and unbounded fan-in shallow classical circuits”, Proceedings of the 51st Annual ACM SIGACT Symposium on Theory of Computing (2019) arXiv:1906.08890 DOI
R. Verresen, N. Tantivasadakarn, and A. Vishwanath, “Efficiently preparing Schrödinger’s cat, fractons and non-Abelian topological order in quantum devices”, (2022) arXiv:2112.03061
C. Ahn, A. C. Doherty, and A. J. Landahl, “Continuous quantum error correction via quantum feedback control”, Physical Review A 65, (2002) arXiv:quant-ph/0110111 DOI
F. Reiter et al., “Dissipative quantum error correction and application to quantum sensing with trapped ions”, Nature Communications 8, (2017) arXiv:1702.08673 DOI
C. Chamberland et al., “Building a Fault-Tolerant Quantum Computer Using Concatenated Cat Codes”, PRX Quantum 3, (2022) arXiv:2012.04108 DOI
A. L. Toom, “Nonergodic Multidimensional System of Automata”, Probl. Peredachi Inf., 10:3 (1974), 70–79; Problems Inform. Transmission, 10:3 (1974), 239–246
L. F. Gray, “Toom’s Stability Theorem in Continuous Time”, Perplexing Problems in Probability 331 (1999) DOI
P. Gács, Journal of Statistical Physics 103, 45 (2001) DOI
I. Convy et al., “Machine learning for continuous quantum error correction on superconducting qubits”, New Journal of Physics 24, 063019 (2022) arXiv:2110.10378 DOI
D. G. Cory et al., “Experimental Quantum Error Correction”, Physical Review Letters 81, 2152 (1998) arXiv:quant-ph/9802018 DOI
O. Moussa et al., “Demonstration of Sufficient Control for Two Rounds of Quantum Error Correction in a Solid State Ensemble Quantum Information Processor”, Physical Review Letters 107, (2011) arXiv:1108.4842 DOI
J. Zhang et al., “Experimental quantum error correction with high fidelity”, Physical Review A 84, (2011) arXiv:1109.4821 DOI
M. D. Reed et al., “Realization of three-qubit quantum error correction with superconducting circuits”, Nature 482, 382 (2012) arXiv:1109.4948 DOI
D. Ristè et al., “Detecting bit-flip errors in a logical qubit using stabilizer measurements”, Nature Communications 6, (2015) arXiv:1411.5542 DOI
J. Cramer et al., “Repeated quantum error correction on a continuously encoded qubit by real-time feedback”, Nature Communications 7, (2016) arXiv:1508.01388 DOI
J. R. Wootton and D. Loss, “Repetition code of 15 qubits”, Physical Review A 97, (2018) arXiv:1709.00990 DOI
J. R. Wootton, “Benchmarking near-term devices with quantum error correction”, Quantum Science and Technology 5, 044004 (2020) arXiv:2004.11037 DOI
J. Kelly et al., “State preservation by repetitive error detection in a superconducting quantum circuit”, Nature 519, 66 (2015) arXiv:1411.7403 DOI
“Exponential suppression of bit or phase errors with cyclic error correction”, Nature 595, 383 (2021) arXiv:2102.06132 DOI
R. Acharya et al., “Suppressing quantum errors by scaling a surface code logical qubit”, (2022) arXiv:2207.06431
K. C. Miao et al., “Overcoming leakage in scalable quantum error correction”, (2022) arXiv:2211.04728
W. P. Livingston et al., “Experimental demonstration of continuous quantum error correction”, Nature Communications 13, (2022) arXiv:2107.11398 DOI
K. Takeda et al., “Quantum error correction with silicon spin qubits”, Nature 608, 682 (2022) arXiv:2201.08581 DOI
F. van Riggelen et al., “Phase flip code with semiconductor spin qubits”, (2022) arXiv:2202.11530
G. Waldherr et al., “Quantum error correction in a solid-state hybrid spin register”, Nature 506, 204 (2014) arXiv:1309.6424 DOI
T. Nakazato et al., “Quantum error correction of spin quantum memories in diamond under a zero magnetic field”, Communications Physics 5, (2022) DOI
T. H. Taminiau et al., “Universal control and error correction in multi-qubit spin registers in diamond”, Nature Nanotechnology 9, 171 (2014) arXiv:1309.5452 DOI
P. Schindler et al., “Experimental Repetitive Quantum Error Correction”, Science 332, 1059 (2011) DOI
S. A. Moses et al., “A Race Track Trapped-Ion Quantum Processor”, (2023) arXiv:2305.03828
T. Tomesh et al., “SupermarQ: A Scalable Quantum Benchmark Suite”, (2022) arXiv:2202.11045
F. Minganti et al., “Spectral theory of Liouvillians for dissipative phase transitions”, Physical Review A 98, (2018) arXiv:1804.11293 DOI
S. Lieu et al., “Symmetry Breaking and Error Correction in Open Quantum Systems”, Physical Review Letters 125, (2020) arXiv:2008.02816 DOI
B. Royer, S. Singh, and S. M. Girvin, “Encoding Qubits in Multimode Grid States”, PRX Quantum 3, (2022) arXiv:2201.12337 DOI
B. J. Brown et al., “Quantum memories at finite temperature”, Reviews of Modern Physics 88, (2016) arXiv:1411.6643 DOI
Page edit log

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
  title={Quantum repetition code},
  booktitle={The Error Correction Zoo},
  editor={Albert, Victor V. and Faist, Philippe},
Share via:
Twitter | Mastodon |  | E-mail
Permanent link:

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/small_distance/quantum_repetition.yml.