Qubit code


Encodes \(K\)-dimensional Hilbert space into a \(2^n\)-dimensional (i.e., \(n\)-qubit) Hilbert space. Usually denoted as \(((n,K))\) or \(((n,K,d))\), where \(d\) is the code's distance.


A convenient and often considered error set is the Pauli error or Pauli string basis. For a single qubit, this set consists of products of powers of the Pauli matrices \begin{align} X=\begin{pmatrix}0 & 1\\ 1 & 0 \end{pmatrix}\,\,\text{ and }\,\,Z=\begin{pmatrix}1 & 0\\ 0 & -1 \end{pmatrix}~. \end{align} For multiple qubits, error set elements are tensor products of elements of the single-qubit error set.

The Pauli error set is a unitary and Hermitian basis for linear operators on the multi-qubit Hilbert space that is orthonormal under the Hilbert-Schmidt inner product; it is a prototypical nice error basis [1]. The distance associated with this set is often the minimum weight of a Pauli string that implements a nontrivial logical operation in the code. The minimum weight of a Pauli error that has a non-zero expectation value for some code basis state is called the diagonal distance [2]. Codes whose distance is greater than the diagonal distance are degenerate.


The decoder determining the most likely error given a noise channel is called the maximum-likelihood decoder. For few-qubit codes (\(n\) is small), maximum-likelihood decoding can be based by creating a lookup table. For infinite code families, the size of such a table scales exponentially with \(n\), so approximate decoding algorithms scaling polynomially with \(n\) have to be used.


There is a relation between one-way entanglement distillation protocols and QECCs [3].




  • Fermionic code — While the Majorana operator algebra is isomorphic to the qubit Pauli-operator algebra via the Jordan-Wigner transformation [4], codes based on the two algebras have different notions of locality and thus qualitatively different physical interpretations.
  • Fock-state bosonic code — Fock-state code whose codewords are finite superpositions of Fock states with maximum occupation \(N\) can be mapped into a qubit code with \(n\geq\log_2 N\) by performing a binary expansion of the Fock-state labels \(n\) and treating each binary digit as an index for a qubit state. Pauli operators for the constituent qubits can be expressed in terms of bosonic raising and lowering operators [5]. However, noise models for the two code families induce different notions of locality and thus qualitatively different physical interpretations [6].
  • Group-based quantum code — Group quantum codes whose physical spaces are constructed using the group \(\mathbb{Z}_2\) are qubit codes.
  • Spin code — Spin codes with spin \(\ell=1/2\) correspond to qubit codes.


E. Knill, “Non-binary Unitary Error Bases and Quantum Codes”. quant-ph/9608048
Upendra S. Kapshikar, “The Diagonal Distance of CWS Codes”. 2107.11286
C. H. Bennett et al., “Mixed-state entanglement and quantum error correction”, Physical Review A 54, 3824 (1996). DOI; quant-ph/9604024
A. Y. Kitaev, “Unpaired Majorana fermions in quantum wires”, Physics-Uspekhi 44, 131 (2001). DOI; cond-mat/0010440
Victor V. Albert, private communication, 2016
Steven M. Girvin, “Introduction to Quantum Error Correction and Fault Tolerance”. 2111.08894
Page edit log

Zoo code information

Internal code ID: qubits_into_qubits

Your contribution is welcome!

on github.com (edit & pull request)

edit on this site

Zoo Code ID: qubits_into_qubits

Cite as:
“Qubit code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022. https://errorcorrectionzoo.org/c/qubits_into_qubits
@incollection{eczoo_qubits_into_qubits, title={Qubit code}, booktitle={The Error Correction Zoo}, year={2022}, editor={Albert, Victor V. and Faist, Philippe}, url={https://errorcorrectionzoo.org/c/qubits_into_qubits} }
Share via:
Twitter |  | E-mail
Permanent link:

Cite as:

“Qubit code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022. https://errorcorrectionzoo.org/c/qubits_into_qubits

Github: https://github.com/errorcorrectionzoo/eczoo_data/tree/main/codes/quantum/qubits/qubits_into_qubits.yml.