[Jump to code hierarchy]

Repetition code

Description

\([n,1,n]\) binary linear code encoding one bit of information into an \(n\)-bit string. Majority decoding requires \(n\) to be odd in order to avoid ties. The idea is to increase the code distance by repeating the logical information several times. Its automorphism group is \(S_n\).

Protection

Detects errors on up to \(n-1\) coordinates, corrects errors on up to \(\frac{n-1}{2}\) coordinates, and corrects erasure errors on up to \(n-1\) coordinates. The generator matrix is \(G=\left(\begin{smallmatrix}1 & 1&\cdots& 1 & 1 \end{smallmatrix}\right)\).

Rate

Code rate is \(\frac{1}{n}\), code distance is \(n\).

Decoding

Calculate the Hamming weight \(d_H\) of an error word. If \(d_H\leq \frac{n-1}{2}\), decode the code as 0. If \(d_H\geq \frac{n+1}{2}\), decode the code as 1.Local automaton decoder for the repetition code on a 2D lattice based on Toom’s rule [1–4].Local automaton decoder for the repetition code on a 1D lattice by Gacs that is translation-invariant, that does not require synchronization of local clocks, and that has a constant encoding rate [5–8].Local automaton decoder for the repetition code on a 1D lattice by Tsirelson [9].Local automaton decoder obtained from reinforcement learning [10].

Fault Tolerance

Triple modular redundancy (TMR) error-correction protocol [11] for fault-tolerant memory operations and classical gate operations; see [12; Secs. 2.6 and 2.7] for a pedagogical explanation.

Threshold

Suppose each bit has probability \(p\) of being received correctly, independent for each bit. The probability that a repetition code is received correctly is \(\sum_{k=0}^{(n-1)/2}\frac{n!}{k!(n-k)!}p^{n-k}(1-p)^{k}\). If \(\frac{1}{2}\leq p\), then one can always increase the probability of success by increasing the number of physical bits \(n\); see [12; Sec. 2.2.1] for a pedagogical explanation.The first threshold theorem for classical circuits was proven by von Neumann [13] using cellular automata [13,14] and which spurred the study of noisy classical circuits [15–18].

Realizations

Repetition codes, in conjunction with other codes, were used in magnetic disks [19].Communication protocols such as FlexRay [20].’

Cousins

  • Maximum distance separable (MDS) code— Binary repetition codes are trivial MDS codes [21; Thm. 12.3.1][22; Sec. 3.3.2].
  • Perfect binary code— Repetition codes are trivially perfect for odd \(n\) [21; Def. 12.3.4][23; pg. 180].
  • Quantum repetition code— A quantum repetition code can be thought of as a classical \([n,1,n]\) repetition code embedded in a quantum system.
  • \([2^r-1,2^r-r-1,3]\) Hamming code— The triple repetition code \([3,1,3]\) is the smallest Hamming code.
  • \(E_8\) Gosset lattice— The \([8,1,8]\) repetition code can be used to obtain the \(E_8\) Gosset lattice [24; Exam. 10.7.1].
  • \(D_4\) hyper-diamond lattice— Construction \(A_c\) applied to the binary repetition code \(\{00,11\}\) over the Gaussian integers yields a Gaussian lattice whose corresponding real lattice is \(D_4\) [25; Ch. 7, pg. 202].
  • \([n,n-1,2]\) Single parity-check (SPC) code— Binary SPCs and repetition codes are dual to each other.
  • Pinwheel code— The hypergraph product of a pinwheel code with a cyclic repetition code yields a local Type-I fracton model in three dimensions [26].
  • Klemm code— The generator matrix of the Klemm code consists of a sum of the generator matrix of the repetition code and twice the generator matrix of the SPC code [27].
  • Compactified \(\mathbb{R}\) gauge theory code— The compactified \(\mathbb{R}\) gauge theory code is constructed from a hypergraph product of two repetition codes over the integers.
  • Tiger surface code— The tiger surface code is constructed from a hypergraph product of two repetition codes over the integers.
  • Self-correcting quantum code— The repetition code associated with the 2D classical Ising model is a self-correcting classical memory [28][29; Sec. V.A].
  • \([[2m,2m-2,2]]\) error-detecting code— The \([[2m,2m-2,2]]\) error-detecting code is constructed via the CSS construction from an SPC code and its dual repetition code [30; Sec. III].
  • \([[7,2,2]]\) HGP phantom code— This code is constructed from the hypergraph product of the \([3,2,2]\) simplex code and the \([2,1,2]\) repetition code [31].
  • Anisotropic \(\mathbb{Z}_2\) Laplacian model code— The anisotropic \(\mathbb{Z}_2\) Laplacian model is the hypergraph product of a cyclic repetition code and a Laplacian code [26].
  • Chamon model code— The Chamon model code can be obtained from an XYZ product of three repetition codes [32], in a construction different from the 3D surface code; see [33; Sec. 3.4].
  • Fibonacci fractal spin-liquid code— The Fibonacci fractal spin-liquid code is a hypergraph product of the repetition code and the Fibonacci code [34], and can be formulated directly as a BP code [26].
  • Sierpinski prism model code— The Sierpinski prism model code is a hypergraph product of the repetition code and the Newman-Moore code [26,35].
  • Two-foliated fracton code— The two-foliated fracton code is a hypergraph product of the repetition code and the plaquette Ising code on a square lattice with periodic boundary conditions [36].
  • Long-range enhanced surface code (LRESC)— LRESCs are constructed using a hypergraph product of two copies of a concatenated LDPC-repetition seed code.
  • Kitaev surface code— The planar surface code on a square lattice can be obtained from a hypergraph product of two repetition codes with appropriate boundary checks.
  • Toric code— The toric code can be obtained from a hypergraph product of two repetition codes [37; Exam. 6]. Other hypergraph products of two repetition codes yield the related \([[2d^2-2d+1,1,d]]\) CSS code family [37; Exam. 5].
  • XY surface code— Under pure \(Z\) noise, the \(d\times d\) XY surface code with odd \(d\) is equivalent to a distance-\(d^2\) repetition code, since its only pure-\(Z\) logical operator is \(Z^{\otimes d^2}\) [38][39; Sec. IV.C].
  • 3D surface code— The 3D planar and toric code on a cubic lattice can be obtained from a hypergraph product of three repetition codes [41][40; Exam. A.1].
  • \((1,3)\) 4D toric code— The 4D \((1,3)\) planar (toric) code on a hypercubic lattice can be obtained from a particular choice of chain complex from a hypergraph product of four repetition codes [41].
  • \((2,2)\) Loop toric code— The 4D loop planar (toric) code on a hypercubic lattice can be obtained from a particular choice of chain complex from a hypergraph product of four repetition codes [41].
  • XZZX surface code— The Chamon model code can be obtained from an XYZ product of three repetition codes [32]; see [33; Sec. 3.4]. Using only two repetition codes in the analogous 2D construction yields the XZZX code, making it a 2D analogue of the Chamon code [33; Sec. 2]. Under pure \(Z\) noise, the \(d\times d\) XZZX code is equivalent to a distance-\(d\) repetition code [42][39; Sec. IV.C]. For \(Z\) bias \(\eta\gg d\) and error rates near threshold, the XZZX code is effectively equivalent to the phase-flip repetition code on \(d\) qubits [39; Sec. VI].

References

  1. [1]

    A. L. Toom, “Nonergodic Multidimensional System of Automata”, Problemy Peredachi Informatsii 10(3), 70–79 (1974); Problems of Information Transmission 10(3), 239–246 (1974)

  2. [2]

    A. L. Toom, “Stable and attractive trajectories in multicomponent systems”, Multicomponent random systems 6, 549-575 (1980)

  3. [3]

    L. F. Gray, “Toom’s Stability Theorem in Continuous Time”, Perplexing Problems in Probability 331 (1999) DOI

  4. [4]

    G. Grinstein, “Can complex structures be generically stable in a noisy world?”, IBM Journal of Research and Development 48, 5 (2004) DOI

  5. [5]

    P. Gács, “Reliable computation with cellular automata”, Proceedings of the fifteenth annual ACM symposium on Theory of computing - STOC ’83 32 (1983) DOI

  6. [6]

    P. Gács, “Reliable computation with cellular automata”, Journal of Computer and System Sciences 32, 15 (1986) DOI

  7. [7]

    P. Gács, “Self-Correcting Two-Dimensional Arrays”, Advances in Computing Research 5, 223-326 (1989)

  8. [8]

    P. Gács, “Reliable Cellular Automata with Self-Organization”, Journal of Statistical Physics 103, 45 (2001) arXiv:math/0003117 DOI

  9. [9]

    B. S. Cirel’son, “Reliable storage of information in a system of unreliable components with local interactions”, Lecture Notes in Mathematics 15 (1978) DOI

  10. [10]

    M. Park, N. Maskara, M. Kalinowski, and M. D. Lukin, “Enhancing quantum memory lifetime with measurement-free local error correction and reinforcement learning”, Physical Review A 111, (2025) arXiv:2408.09524 DOI

  11. [11]

    R. E. Lyons and W. Vanderkulk, “The Use of Triple-Modular Redundancy to Improve Computer Reliability”, IBM Journal of Research and Development 6, 200 (1962) DOI

  12. [12]

    S. M. Girvin, “Introduction to quantum error correction and fault tolerance”, SciPost Physics Lecture Notes (2023) arXiv:2111.08894 DOI

  13. [13]

    J. von Neumann, “Probabilistic Logics and the Synthesis of Reliable Organisms From Unreliable Components”, Automata Studies. (AM-34) 43 (1956) DOI

  14. [14]

    J. von Neumann and A. W. Burks, “Theory of self-reproducing automata”, (1966)

  15. [15]

    N. Pippenger, “On networks of noisy gates”, 26th Annual Symposium on Foundations of Computer Science (sfcs 1985) 30 (1985) DOI

  16. [16]

    N. Pippenger, “Reliable computation by formulas in the presence of noise”, IEEE Transactions on Information Theory 34, 194 (1988) DOI

  17. [17]

    I. Benjamini, R. Pemantle, and Y. Peres, “Unpredictable paths and percolation”, The Annals of Probability 26, (1998) DOI

  18. [18]

    H. Kesten and B. P. Stigum, “A Limit Theorem for Multidimensional Galton-Watson Processes”, The Annals of Mathematical Statistics 37, 1211 (1966) DOI

  19. [19]

    T. Klove and M. Miller, “The Detection of Errors After Error-Correction Decoding”, IEEE Transactions on Communications 32, 511 (1984) DOI

  20. [20]

    “High-Performance Embedded Computing”, (2014) DOI

  21. [21]

    P. Boyvalenkov, D. Danev, “Linear programming bounds”, Concise Encyclopedia of Coding Theory (Chapman and Hall/CRC, 2021), pp. 251-266 DOI

  22. [22]

    P. R. J. Östergård, “Construction and Classification of Codes”, Concise Encyclopedia of Coding Theory (Chapman and Hall/CRC, 2021), pp. 61-78 DOI

  23. [23]

    F. J. MacWilliams and N. J. A. Sloane, The Theory of Error-Correcting Codes (Elsevier, 1977)

  24. [24]

    T. Ericson and V. A. Zinoviev, eds., Codes on Euclidean Spheres (Elsevier, 2001)

  25. [25]

    J. H. Conway and N. J. A. Sloane, Sphere Packings, Lattices and Groups (Springer New York, 1999) DOI

  26. [26]

    Y. Tan, B. Roberts, N. Tantivasadakarn, B. Yoshida, and N. Y. Yao, “Fracton models from product codes”, Physical Review Research 7, (2025) arXiv:2312.08462 DOI

  27. [27]

    S. T. Dougherty, P. Gaborit, M. Harada, A. Munemasa, and P. Sole, “Type IV self-dual codes over rings”, IEEE Transactions on Information Theory 45, 2345 (1999) DOI

  28. [28]

    L. E. Thomas, “Bound on the mass gap for finite volume stochastic ising models at low temperature”, Communications in Mathematical Physics 126, 1 (1989) DOI

  29. [29]

    B. J. Brown, D. Loss, J. K. Pachos, C. N. Self, and J. R. Wootton, “Quantum memories at finite temperature”, Reviews of Modern Physics 88, (2016) arXiv:1411.6643 DOI

  30. [30]

    N. Rengaswamy, R. Calderbank, H. D. Pfister, and S. Kadhe, “Synthesis of Logical Clifford Operators via Symplectic Geometry”, 2018 IEEE International Symposium on Information Theory (ISIT) 791 (2018) arXiv:1803.06987 DOI

  31. [31]

    J. M. Koh, A. Gong, A. C. Diaconu, D. B. Tan, A. A. Geim, M. J. Gullans, N. Y. Yao, M. D. Lukin, and S. Majidy, “Entangling logical qubits without physical operations”, (2026) arXiv:2601.20927

  32. [32]

    D. Maurice, “Codes correcteurs quantiques pouvant se décoder itérativement”, PhD thesis, Université Pierre et Marie Curie-Paris VI, 2014.

  33. [33]

    A. Leverrier, S. Apers, and C. Vuillot, “Quantum XYZ Product Codes”, Quantum 6, 766 (2022) arXiv:2011.09746 DOI

  34. [34]

    B. Yoshida, “Exotic topological order in fractal spin liquids”, Physical Review B 88, (2013) arXiv:1302.6248 DOI

  35. [35]

    T. Rakovszky and V. Khemani, “The Physics of (good) LDPC Codes II. Product constructions”, (2024) arXiv:2402.16831

  36. [36]

    N. P. Breuckmann, M. Davydova, J. N. Eberhardt, and N. Tantivasadakarn, “Cups and Gates I: Cohomology Invariants and Logical Quantum Operations”, Communications in Mathematical Physics 407, (2026) arXiv:2410.16250 DOI

  37. [37]

    A. A. Kovalev and L. P. Pryadko, “Improved quantum hypergraph-product LDPC codes”, 2012 IEEE International Symposium on Information Theory Proceedings 348 (2012) arXiv:1202.0928 DOI

  38. [38]

    D. K. Tuckett, A. S. Darmawan, C. T. Chubb, S. Bravyi, S. D. Bartlett, and S. T. Flammia, “Tailoring Surface Codes for Highly Biased Noise”, Physical Review X 9, (2019) arXiv:1812.08186 DOI

  39. [39]

    Y. Xiao, B. Srivastava, and M. Granath, “Exact results on finite size corrections for surface codes tailored to biased noise”, Quantum 8, 1468 (2024) arXiv:2401.04008 DOI

  40. [40]

    L. Berent, T. Hillmann, J. Eisert, R. Wille, and J. Roffe, “Analog Information Decoding of Bosonic Quantum Low-Density Parity-Check Codes”, PRX Quantum 5, (2024) arXiv:2311.01328 DOI

  41. [41]

    W. Zeng and L. P. Pryadko, “Higher-Dimensional Quantum Hypergraph-Product Codes with Finite Rates”, Physical Review Letters 122, (2019) arXiv:1810.01519 DOI

  42. [42]

    J. P. Bonilla Ataides, D. K. Tuckett, S. D. Bartlett, S. T. Flammia, and B. J. Brown, “The XZZX surface code”, Nature Communications 12, (2021) arXiv:2009.07851 DOI

Page edit log

Your contribution is welcome!

on github.com (edit & pull request)

— see instructions

Zoo Code ID: repetition

Cite as:
“Repetition code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2026. https://errorcorrectionzoo.org/c/repetition, arXiv:2606.11484
BibTeX:
@incollection{eczoo_repetition,
title={Repetition code},
booktitle={The Error Correction Zoo},
year={2026},
editor={Albert, Victor V. and Faist, Philippe},
eprint={2606.11484},
doi={10.48550/arXiv.2606.11484},
url={https://errorcorrectionzoo.org/c/repetition}
}
Share via:
Twitter | Mastodon |  | E-mail
Permanent link:
https://errorcorrectionzoo.org/c/repetition

Cite as:

“Repetition code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2026. https://errorcorrectionzoo.org/c/repetition, arXiv:2606.11484

Github: https://github.com/errorcorrectionzoo/eczoo_data/edit/main/codes/classical/bits/reed_muller/dual_hamming/repetition.yml.