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 \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.

A quantum Hamming-like bound exists for degenerate qubit stabilizer codes [1].


Perfect codes have been classified. For qubits (\(q=2\)), the only codes are the stabilizer code family \([[(4^r-1)/3, (4^r-1)/3 - 2r, 3]]\) for \(r \geq 2\) [2,3]. For qudits, the family is parameterized by \(K=q^{n-2r}\) for \(n=\frac{q^{2r}-1}{q^{2}-1}\) and \(r \geq 2\); all codes correct a single error (\(t=1\)) [4,5]. The trivial code (\(k=n\)) is also perfect.


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


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 [6].





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
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 1 (2023) arXiv:2208.11800 DOI
R. Chao and B. W. Reichardt, “Fault-tolerant quantum computation with few qubits”, npj Quantum Information 4, (2018) arXiv:1705.05365 DOI
Page edit log

Your contribution is welcome!

on (edit & pull request)

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

Cite as:

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