Haah cubic code[1]


Class of stabilizer codes on a length-\(L\) cubic lattice with one or two qubits per site. We also require that the stabilizer group \(\mathsf{S}\) is translation invariant and generated by two types of operators with support on a cube. In the non-CSS case, these two are related by spatial inversion. For CSS codes, we require that the product of all corner operators is the identity. We lastly require that there are no non-trival ''string operators'', meaning that single-site operators are a phase, and any period one logical operator \(l \in \mathsf{S}^{\perp}\) is just a phase. Haah showed in his original construction that there is exactly one non-CSS code of this form, and 17 CSS codes [1]. The non-CSS code is labeled code 0, and the rest are numbered from 1 - 17. Codes 1-4, 7, 8, and 10 do not have string logical operators [1][2].

Straightforward generalizations of the above codes exist to modular qudits, oscillators, and rotors [3][4].


Cubic codes protect against simultaneous independent Pauli errors on different sites (not qubits, since there can be 2 qubits per site). Codes 0-4 are known to have distance \(d \ge L\), meaning they can achieve macroscopic code distance as \(L\to\infty\).


The encoding rate depends on the code implemented, but code 0 has been shown to have \(k \ge L\) (on a periodic finite cubic lattice of side length \(L\). In general we expect the number of logical bits to scale as \(k \sim L\).



  • Color code — The color and cubic code families both include 3D codes that do not admit string-like operators.
  • Kitaev surface code — The energy of any partial implementation of code 1 is proportional to the boundary length similar to the 4D toric code, which can potentially surpress the effects of thermal errors, but it is currently an open problem.
  • Lifted-product (LP) code — A lifted product code for the ring \(R=\mathbb{F}_2[x,y,z]/(x^L-1,y^L-1,z^L-1)\) is the cubic code.
  • Self-correcting quantum code — Cubic code 1 is partially self-correcting with a logarithmic energy barrier [6].

Zoo code information

Internal code ID: haah_cubic

Your contribution is welcome!

on github.com (edit & pull request)

edit on this site

Zoo Code ID: haah_cubic

Cite as:
“Haah cubic code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2022. https://errorcorrectionzoo.org/c/haah_cubic
@incollection{eczoo_haah_cubic, title={Haah cubic code}, booktitle={The Error Correction Zoo}, year={2022}, editor={Albert, Victor V. and Faist, Philippe}, url={https://errorcorrectionzoo.org/c/haah_cubic} }
Permanent link:


J. Haah, “Local stabilizer codes in three dimensions without string logical operators”, Physical Review A 83, (2011). DOI; 1101.1962
A. Dua et al., “Sorting topological stabilizer models in three dimensions”, Physical Review B 100, (2019). DOI; 1908.08049
J. Haah, Two generalizations of the cubic code model, KITP Conference: Frontiers of Quantum Information Physics, UCSB, Santa Barbara, CA.
V. V. Albert, S. Pascazio, and M. H. Devoret, “General phase spaces: from discrete variables to rotor and continuum limits”, Journal of Physics A: Mathematical and Theoretical 50, 504002 (2017). DOI; 1709.04460
M. Pretko, X. Chen, and Y. You, “Fracton phases of matter”, International Journal of Modern Physics A 35, 2030003 (2020). DOI; 2001.01722
S. Bravyi and J. Haah, “Quantum Self-Correction in the 3D Cubic Code Model”, Physical Review Letters 111, (2013). DOI; 1112.3252

Cite as:

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

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