Five-qubit perfect code |
Five-qubit stabilizer code with generators that are symmetric under cyclic permutation of qubits, \begin{align} \begin{split} S_1 &= IXZZX \\ S_2 &= XZZXI \\ S_3 &= ZZXIX \\ S_4 &= ZXIXZ~. \end{split} \end{align} |

Perfect code |
An \((n,K,2t+1)_q\) binary or \(q\)-ary code is perfect if parameters \(n\), \(K\), \(t\), and \(q\) are such that the Hamming (a.k.a. sphere-packing) bound \begin{align}
\sum_{j=0}^{t}(q-1)^{j}{n \choose j}\leq q^{n}/K
\end{align} becomes an equality. For example, for a binary \(q=2\) code with one logical bit (\(K=2\)) and \(t=1\), the bound becomes \(n+1 \leq 2^{n-1}\). Perfect codes are those for which balls of Hamming radius \(t\) exactly fill the space of all \(n\) \(q\)-ary strings. |

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

\([[2^r, 2^r-r-2, 3]]\) quantum Hamming code |
A family of stabilizer codes of distance \(3\) that asymptotically saturate quantum Hamming bound. |