Perfect quantum code 


A non-degenerate code constructed out of \(q\)-dimensional qudits and having parameters \(((n,K,2t+1))\) is perfect if \(n\), \(K\), \(t\), and \(q\) are such that the quantum Hamming bound [1] \begin{align} \sum_{j=0}^{t}(q^2-1)^{j}{n \choose j}\leq q^{n}/K \tag*{(1)}\end{align} becomes an equality. For example, for a qubit \(q=2\) code with one logical qubit (\(K=2\)) and \(t=1\), the bound becomes \(3n+1 \leq 2^{n-1}\). The bound can be saturated only at certain \(n\).

For qubit codes with \(K=2^k\), one can work out an asymptotic Hamming bound in the large-\(n,k,t\) limit, \begin{align} \frac{k}{n}\leq 1-\frac{t}{n}\log_{2}3-h(t/n), \tag*{(2)}\end{align} where \(h\) is the binary entropy function.

Codes that are not non-degenerate can in principle violate the quantum Hamming bound. It was shown that qubit stabilizer codes up to distance \(d\leq 85\) must obey the bound [2]. A quantum Hamming-like bound exists for degenerate qubit stabilizer codes [3].


Perfect codes have been classified. For qubits (\(q=2\)), the only nontrivial codes are the stabilizer code family \([[(4^r-1)/3, (4^r-1)/3 - 2r, 3]]\) for \(r \geq 2\), obtained from Hamming codes over \(GF(4)\) via the Hermitian construction [4,5]. For qudits, the corresponding family is the \([[\frac{q^{2r}-1}{q^{2}-1},q^{n-2r},3]]\) family of quantum twisted codes [6,7].


\(k/n\to 1\) asymptotically with \(n\).




  • Five-qubit perfect code — The five-qubit code is the smallest perfect code and is a member of the perfect qubit code family \([[(4^r-1)/3, (4^r-1)/3 - 2r, 3]]\) for \(r = 2\).


  • Perfect code — A classical (quantum) perfect code saturates the classical (quantum) Hamming bound.
  • Hermitian qubit code — The only perfect qubit codes are the Hermitian qubit code family \([[(4^r-1)/3, (4^r-1)/3 - 2r, 3]]\) for \(r \geq 2\), obtained from Hamming codes over \(GF(4)\) [4,5].
  • \([[2^r, 2^r-r-2, 3]]\) Gottesman code — \([[2^r, 2^r-r-2, 3]]\) Gottesman codes saturate the asymptotic quantum Hamming bound.
  • Quantum data-syndrome (QDS) code — The quantum Hamming bound can be extended to QDS codes [8].
  • \([[15, 7, 3]]\) quantum Hamming code — \([[15, 7, 3]]\) quantum Hamming code is perfect as a CSS code, i.e., the number of its \(Z\)-type syndromes matches the number of \(X\)-type Pauli errors up to weight one [9].
  • Modular-qudit CWS code — Generalized concatenatenations of modular-qudit CWS codes yield a family of codes that have larger logical dimension than stabilizer codes and that asymptotically approach the modular-qudit Hamming bound [10].
  • Modular-qudit GKP code — The modular-qudit GKP code is not a block code, but it is perfect in the sense that each correctable error maps the logical space into a distinct error space.
  • Quantum twisted code — The \([[\frac{q^{2r}-1}{q^{2}-1},q^{n-2r},3]]\) family of quantum twisted codes are the only perfect Galois-qudit codes [6,7].


A. Ekert and C. Macchiavello, “Error Correction in Quantum Communication”, (1996) arXiv:quant-ph/9602022
E. Dallas, F. Andreadakis, and D. Lidar, “No \(((n,K,d< 127))\) Code Can Violate the Quantum Hamming Bound”, IEEE BITS the Information Theory Magazine 2, 33 (2022) arXiv:2208.11800 DOI
A. Nemec and T. Tansuwannont, “A Hamming-Like Bound for Degenerate Stabilizer Codes”, (2023) arXiv:2306.00048
D. Gottesman, “Pasting Quantum Codes”, (1996) arXiv:quant-ph/9607027
A. R. Calderbank et al., “Quantum Error Correction via Codes over GF(4)”, (1997) arXiv:quant-ph/9608006
Z. Li and L. Xing, “No More Perfect Codes: Classification of Perfect Quantum Codes”, (2009) arXiv:0907.0049
J. Bierbrauer and Y. Edel, “Quantum twisted codes”, Journal of Combinatorial Designs 8, 174 (2000) DOI
A. Ashikhmin, C.-Y. Lai, and T. A. Brun, “Quantum Data-Syndrome Codes”, IEEE Journal on Selected Areas in Communications 38, 449 (2020) arXiv:1907.01393 DOI
R. Chao and B. W. Reichardt, “Fault-tolerant quantum computation with few qubits”, npj Quantum Information 4, (2018) arXiv:1705.05365 DOI
M. Grassl et al., “Generalized concatenated quantum codes”, Physical Review A 79, (2009) arXiv:0901.1319 DOI
Page edit log

Your contribution is welcome!

on (edit & pull request)— see instructions

edit on this site

Zoo Code ID: quantum_perfect

Cite as:
“Perfect quantum code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022.
@incollection{eczoo_quantum_perfect, title={Perfect quantum code}, booktitle={The Error Correction Zoo}, year={2022}, editor={Albert, Victor V. and Faist, Philippe}, url={} }
Share via:
Twitter | Mastodon |  | E-mail
Permanent link:

Cite as:

“Perfect quantum code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022.