Qubit code 

This code defines the Qubit Kingdom


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.


Corrects erasure errors on up to \(d-1\) qubits. The number of correctable errors is often called the decoding radius, and it is upper bounded by half of the code distance. As a result, qubit codes cannot tolerate adversarial errors on more than \((1-R)/4\) registers.

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}~. \tag*{(1)}\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 [13]. 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 [4]. 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.

Fault Tolerance

There are lower bounds on the overhead of fault-tolerant QEC in terms of the capacity of the noise channel [5]. A more stringent bound applies to geometrically local QEC due to the fact that locality constrains the growth of the entanglement that is needed for protection [6].


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


  • Modular-qudit code — Modular-qudit quantum codes for \(q=2\) correspond to qubit codes.
  • Galois-qudit code — Galois-qudit quantum codes for \(q=2\) correspond to qubit codes.
  • Spin code — Spin codes with spin \(\ell=1/2\) correspond to qubit codes.



  • Qubit c-q code — Qubit c-q codes are qubit codes designed to transmit classical information.
  • 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 [9]. However, noise models for the two code families induce different notions of locality and thus qualitatively different physical interpretations [10].
  • Clifford code — Certain Clifford codes yield qubit codes with non-trivial distance when the single spin is treated as a collective spin of several qubits.


E. Knill, “Non-binary Unitary Error Bases and Quantum Codes”, (1996) arXiv:quant-ph/9608048
E. Knill, “Group Representations, Error Bases and Quantum Codes”, (1996) arXiv:quant-ph/9608049
A. Klappenecker and M. Roetteler, “Beyond Stabilizer Codes I: Nice Error Bases”, (2001) arXiv:quant-ph/0010082
U. S. Kapshikar, “The Diagonal Distance of CWS Codes”, (2021) arXiv:2107.11286
O. Fawzi, A. Müller-Hermes, and A. Shayeghi, “A Lower Bound on the Space Overhead of Fault-Tolerant Quantum Computation”, Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2022) arXiv:2202.00119 DOI
N. Baspin, O. Fawzi, and A. Shayeghi, “A lower bound on the overhead of quantum error correction in low dimensions”, (2023) arXiv:2302.04317
C. H. Bennett et al., “Mixed-state entanglement and quantum error correction”, Physical Review A 54, 3824 (1996) arXiv:quant-ph/9604024 DOI
A. Y. Kitaev, “Unpaired Majorana fermions in quantum wires”, Physics-Uspekhi 44, 131 (2001) arXiv:cond-mat/0010440 DOI
Victor V. Albert, private communication, 2016
S. M. Girvin, “Introduction to quantum error correction and fault tolerance”, SciPost Physics Lecture Notes (2023) arXiv:2111.08894 DOI
Page edit log

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.), 2023. https://errorcorrectionzoo.org/c/qubits_into_qubits
  title={Qubit code},
  booktitle={The Error Correction Zoo},
  editor={Albert, Victor V. and Faist, Philippe},
Share via:
Twitter | Mastodon |  | E-mail
Permanent link:

Cite as:

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

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