## Description

An \([[n,k,d]]\) stabilizer code admitting a set of stabilizer generators that are either \(Z\)-type or \(X\)-type Pauli strings. Codes can be defined from two classical codes and/or chain complexes over \(\mathbb{Z}_2\) per the qubit CSS-to-homology correspondence below. Strong CSS codes are codes for which there exists a set of \(X\) and \(Z\) stabilizer generators of equal weight.

The stabilizer generator matrix is of the form \begin{align} H=\begin{pmatrix}0 & H_{Z}\\ H_{X} & 0 \end{pmatrix} \label{eq:parity} \tag*{(1)}\end{align} such that the rows of the two blocks must be orthogonal \begin{align} H_X H_Z^T=0~. \label{eq:comm} \tag*{(2)}\end{align} The above condition guarantees that the \(X\)-stabilizer generators, defined in the symplectic representation as rows of \(H_X\), commute with the \(Z\)-stabilizer generators associated with \(H_Z\).

Encoding is based on two related binary linear codes, an \([n,k_X,d_X]\) code \(C_X\) and \([n,k_Z,d_Z]\) code \(C_Z\), satisfying \(C_X^\perp \subseteq C_Z\). The resulting CSS code has \(k=k_X+k_Z-n\) logical qubits and distance \(d\geq\min\{d_X,d_Z\}\). The \(H_X\) (\(H_Z\)) block of \(H\) (1) is the parity-check matrix of the code \(C_Z\) (\(C_X\)). The requirement \(C_X^\perp \subseteq C_Z\) guarantees (2) and also implies \(C_Z^\perp \subseteq C_X \). Specializing to the case when \(C_Z=[n,k,d]\) is dual-containing yields an \([[n,2k-n,\geq d_Z]]\) qubit CSS code with \(C_X = C_Z^\perp\). Basis states for the code are, for \(\gamma \in C_X\), \begin{align} |\gamma + C_Z^\perp \rangle = \frac{1}{\sqrt{|C_Z^\perp|}} \sum_{\eta \in C_Z^\perp} |\gamma + \eta\rangle. \tag*{(3)}\end{align}

A CSS code has stabilizer weight \(w\) if the highest weight of any stabilizer generator is \(w\), i.e., any row of \(H_X\) and \(H_Z\) has weight at most \(w\). In the context of comparing weight as well as of determining distances for noise models biased toward \(X\)- or \(Z\)-type errors, an extended notation for asymmetric qubit CSS codes is \([[n,k,(d_X,d_Z),w]]\) or \([[n,k,d_X/d_Z,w]]\). The quantity \(\min\{d_X,d_Z\}\) is often called the worst-case minimum distance and is often less than the actual code distance due to degeneracy [4].

To find the minimum distance of degenerate CSS code, we have to first remove the codewords of the smaller codes as those codewords correspond to stabilizer generators instead of logical operators. Thus the general formulae for the minimum distances \(d, d_Z, d_X\) for an \([[n,k,d]]\) or \([[n,k,(d_X,d_Z)]]\) \(CSS(C_X, C_Z)\) code are: \begin{align} d_{X}&=\min\{ w_H(c) | c \in C_X \setminus C_Z^\perp \} \tag*{(4)}\\ d_{Z}&=\min\{ w_H(c) | c \in C_Z \setminus C_X^\perp \} \tag*{(5)}\\ d&=\min\{d_X,d_Z\}~, \tag*{(6)}\end{align} where \(w_H\) is the Hamming weight of a codeword.

### CSS-to-homology correspondence

Qubit CSS-to-homology correspondence: CSS codes and their properties can be formulated in terms of homology theory, yielding a powerful correspondence between codes and chain complexes, the primary homological structures. There exists a many-to-one mapping from size three chain complexes to CSS codes [5–8] that allows one to extract code properties from topological features of the complexes. Codes constructed in this manner are sometimes called homological CSS codes, but they are equivalent to CSS codes. This mapping of codes to manifolds allows the application of structures from topology to error correction, yielding various QLDPC codes with favorable properties.

A chain complex of size three is given by binary vector spaces \(A_2\), \(A_1\), \(A_0\) and binary matrices \(\partial_{i=1,2}\) (called boundary operators) \(A_i\) to \(A_{i-1}\) that satisfy \(\partial_1 \partial_2 = 0\). Such a complex is typically denoted as \begin{align} A_2 \xrightarrow{\partial_2} A_1 \xrightarrow{\partial_1} A_0~. \label{eq:chain} \tag*{(7)}\end{align} One constructs a CSS code by associating a physical qubit to every basis element of \(A_1\), and defining parity-check matrices \(H_X=\partial_1\) and \(H_Z=\partial_2^T\)). That way, the spaces \(A_0\) and \(A_2\) can be associated with \(X\)-type and \(Z\)-type Pauli operators, respectively, and boundary operators determine the Paulis making up the stabilizer generators. The requirement \(\partial_1 \partial_2 = 0\) guarantees that the \(X\)-stabilizer generators associated with \(H_X\) commute with the \(Z\)-stabilizer generators associated with \(H_Z\).

Usually, the chain complex (7) used in the construction comes from the chain complex associated with a cellulation of a manifold. When the manifold is a two-dimensional surface, its entire chain is used. Higher-dimensional manifolds allow for longer chain complexes, and one can use the three largest non-trivial vector spaces in its chain.

CSS codes saturate a type of error correction uncertainty relation [2; Thm. 3], which is a special case of an entropic uncertainty relation between a pair of bases [9–11]. The code state \(\sum_{c\in C_{Z}}|c\rangle\) can be expressed in terms of either basis states labeled by the code \(C_{Z}\) or its dual, satisfying, with equality, the relation \begin{align} |C_{Z}||C_{Z}^{\perp}| \geq 2^{n}\,. \tag*{(8)}\end{align}

## Protection

Detects errors on \(d-1\) qubits, corrects errors on \(\left\lfloor (d-1)/2 \right\rfloor\) qubits.

Using the relation to chain complexes, the number of encoded logical qubits is equal to the dimension of the first \(\mathbb{Z}_2\)-homology of the chain complex, \(H_1(\partial, \mathbb{Z}_2) = \frac{\text{Ker}(\partial_1)}{\text{Im}(\partial_2)}\).

The distance of the CSS code is equal to the minimum of the combinatorial (\(d-1\))-systole of the cellulated \(d\)-dimensional manifold and its dual.

CSS codes have a CSS lower bound against depolarizing noise because CSS decoding does not take into account correlations between \(X\)- and \(Z\)-type noise [12]. An upper bound is formulated in Ref. [13].

## Rate

## Magic

## Encoding

## Transversal Gates

## Gates

## Decoding

## Fault Tolerance

## Code Capacity Threshold

## Realizations

## Notes

## Parents

- CPC code — CSS codes are a subset of CPC codes [49], with the latter not requiring the two classical codes to be related.
- Movassagh-Ouyang Hamiltonian code — Movassagh-Ouyang codes stem from a prescription that converts an arbitrary classical code into a quantum code.
- Modular-qudit CSS code — Modular-qudit CSS codes for \(q=2\) are (qubit) CSS codes.
- Galois-qudit CSS code — Galois-qudit CSS codes for \(q=2\) are (qubit) CSS codes.

## Children

- Quantum multi-dimensional parity-check (QMDPC) code
- \([[12,2,4]]\) carbon code
- \([[10,1,2]]\) CSS code
- \([[6,2,2]]\) \(C_6\) code
- Generalized Shor code
- Quantum polar code — Quantum polar codes are CSS codes used in an entanglement generation scheme that generally requires entanglement assistance. They require assistance only to determine positions to store information which optimally protect against both bit and phase noise. Without this assistance, they are just CSS codes constructed out of polar codes. A variant of quantum polar codes exists that does not require entanglement assistance [50].
- Checkerboard model code
- Fibonacci fractal spin-liquid code
- Layer code
- Sierpinsky fractal spin-liquid (SFSL) code
- X-cube model code
- Generalized quantum divisible code — Generalized quantum divisible codes are CSS codes. Any weakly self-dual CSS code yields a level-three generalized quantum divisible code when level-lifted [51; Sec. VI.C].
- Quantum Golay code
- Classical-product code
- Concatenated Steane code
- Yoked surface code
- Generalized homological-product qubit CSS code
- Finite-geometry (FG) QLDPC code

## Cousins

- Qubit stabilizer code — Qubit CSS codes are qubit stabilizer codes whose stabilizer groups admit a generating set of pure-\(X\) and pure-\(Z\) Pauli strings. Any \([[n,k,d]]\) stabilizer code can be mapped onto a \([[2n,2k,\geq d]]\) CSS code, with the mapping preserving geometric locality of a code up to a constant factor [52] (see also [53][54; Thm. 1]). For any non-CSS code \(\mathsf{C}\), there exists a CSS code \(\mathsf{C}^{\prime}\) such that \(\mathsf{C} = DQ\mathsf{C}^{\prime}\), where \(D\) is a diagonal Clifford operator and \(Q\) is an element of an XP stabilizer group [26; Prop. B.3.1].
- Linear binary code — The CSS construction uses two related binary linear codes, \(C_X\) and \(C_Z\).
- Dual linear code — CSS codes for which \(C_X=C_Z \equiv C\) are called self-orthogonal since \(C^{\perp} \subseteq C\). The stabilizer group of such codes is invariant under the Hadamard gate exchanging \(X\) and \(Z\).
- Alternant code — Alternant codes used in the CSS construction yield quantum codes that asymptotically achieve the quantum Gilbert-Varshamov bound [55].
- Random quantum code — Random CSS codes asymptotically achieve linear distance with high probability, achieving the quantum Gilbert-Varshamov bound [1].
- Algebraic-geometry (AG) code — Algebraic geometry codes can be plugged into the CSS construction to yield asymptotically good quantum codes [56,57]. However, such codes are not QLDPC.
- Subsystem qubit stabilizer code — Qubit CSS "seed" codes can be used to produce subsystem stabilizer codes [58].
- Cycle code — Cycle codes, including the Petersen cycle and Hoffman-Singleton cycle codes, feature in magic-state distillation protocols [15; Appx. A.2.1][16; Sec. VII.A].
- Quantum spherical code (QSC) — CSS codes concatenated with two-component cat codes form QSCs which have a weight-based notion of distance.
- Constant-excitation (CE) code — Qubit CE codes are protected from coherent noise in the form of transversal \(Z\)-rotations because such rotations act identically on all codewords [59,60]. In the case of qubit CSS codes, all codes oblivious to such rotations are CE codes [59,60]. Any \([[n,k,d]]\) CSS code can be made into an \([[mn,k,>d]]\) CE code [59].
- Quantum locally testable code (QLTC) — A qubit CSS code defined by \(H_{Z}\) and \(H_{X}\) is glocally testable with some soundness iff the constituent codes \(\ker H_{Z}\) and \(\ker H_{X}\) are locally testable with the same soundness [61; Fact 17].
- Majorana stabilizer code — When constructing a Majorana stabilizer code from a self-orthogonal classical code with an odd number of bits and generator matrix \(G\), a more complex procedure must be applied to ensure that the fermion code has an even number of Majorana zero modes, and thus a physical Hilbert space [53,62]. Rather than taking \(G\) to be the stabilizer matrix as in the even case, we take \(G\oplus G\). This is a concatenation of classical codes as in the CSS construction and it yields a mapping \([2N-1,k,d]\rightarrow [[2N-1,2N-1-k,d^\perp]]_f\). This procedure may be further generalized by concatenating two different self-orthogonal classical codes with an odd number of bits, as is often done in the CSS construction.
- Union stabilizer (USt) code — An \([[n,2k-n,d]]\) CSS code can be converted to a \([[n,k+k^{\prime}−n,\min(d,\left\lceil 3d^{\prime}/2\right\rceil )]]\) code for particular \(k^{\prime}\) and \(d^{\prime}\) via the Steane enlargement construction [63]. This code can be treated as a union stabilizer code [64].
- XP stabilizer code — Each XP-regular code can be mapped to a CSS code with a similar logical operator structure [65].
- EA qubit stabilizer code — As opposed to CSS codes, EA qubit stabilizer codes can be constructed from any linear binary code.
- Cluster-state code — A resource cluster state can be constructed out of any qubit CSS code via foliation. Conversely, CSS codes can be constructed out of cluster states [18].
- Qubit BCH code — Some qubit BCH codes are CSS.
- Subsystem CSS code — Subsystem qubit CSS codes reduce to (subspace) CSS qubit codes when there is no gauge subsystem.

## References

- [1]
- A. R. Calderbank and P. W. Shor, “Good quantum error-correcting codes exist”, Physical Review A 54, 1098 (1996) arXiv:quant-ph/9512032 DOI
- [2]
- A. M. Steane, “Error Correcting Codes in Quantum Theory”, Physical Review Letters 77, 793 (1996) DOI
- [3]
- “Multiple-particle interference and quantum error correction”, Proceedings of the Royal Society of London. Series A: Mathematical, Physical and Engineering Sciences 452, 2551 (1996) arXiv:quant-ph/9601029 DOI
- [4]
- D. Gottesman. Surviving as a quantum computer in a classical world (2024) URL
- [5]
- A. Y. Kitaev, “Quantum computations: algorithms and error correction”, Russian Mathematical Surveys 52, 1191 (1997) DOI
- [6]
- H. Bombin and M. A. Martin-Delgado, “Homological error correction: Classical and quantum codes”, Journal of Mathematical Physics 48, (2007) arXiv:quant-ph/0605094 DOI
- [7]
- S. Bravyi and M. B. Hastings, “Homological Product Codes”, (2013) arXiv:1311.0885
- [8]
- N. P. Breuckmann, “PhD thesis: Homological Quantum Codes Beyond the Toric Code”, (2018) arXiv:1802.01520
- [9]
- I. Białynicki-Birula and J. Mycielski, “Uncertainty relations for information entropy in wave mechanics”, Communications in Mathematical Physics 44, 129 (1975) DOI
- [10]
- D. Deutsch, “Uncertainty in Quantum Measurements”, Physical Review Letters 50, 631 (1983) DOI
- [11]
- H. Maassen and J. B. M. Uffink, “Generalized entropic uncertainty relations”, Physical Review Letters 60, 1103 (1988) DOI
- [12]
- D. Maurice, J.-P. Tillich, and I. Andriyanova, “A family of quantum codes with performances close to the hashing bound under iterative decoding”, 2013 IEEE International Symposium on Information Theory (2013) DOI
- [13]
- S. Bravyi et al., “High-threshold and low-overhead fault-tolerant quantum memory”, Nature 627, 778 (2024) arXiv:2308.07915 DOI
- [14]
- E. Dennis et al., “Topological quantum memory”, Journal of Mathematical Physics 43, 4452 (2002) arXiv:quant-ph/0110143 DOI
- [15]
- J. Haah et al., “Magic state distillation with low space overhead and optimal asymptotic input count”, Quantum 1, 31 (2017) arXiv:1703.07847 DOI
- [16]
- Quantum Information and Computation 18, (2018) arXiv:1709.02789 DOI
- [17]
- J. Łodyga et al., “Simple scheme for encoding and decoding a qubit in unknown state for various topological codes”, Scientific Reports 5, (2015) arXiv:1404.2495 DOI
- [18]
- A. Bolt et al., “Foliated Quantum Error-Correcting Codes”, Physical Review Letters 117, (2016) arXiv:1607.02579 DOI
- [19]
- W. Dür and H.-J. Briegel, “Entanglement Purification for Quantum Computation”, Physical Review Letters 90, (2003) arXiv:quant-ph/0210069 DOI
- [20]
- R. Zen et al., “Quantum Circuit Discovery for Fault-Tolerant Logical State Preparation with Reinforcement Learning”, (2024) arXiv:2402.17761
- [21]
- P. W. Shor, “Fault-tolerant quantum computation”, (1997) arXiv:quant-ph/9605011
- [22]
- N. P. Breuckmann and S. Burton, “Fold-Transversal Clifford Gates for Quantum Codes”, (2022) arXiv:2202.06647
- [23]
- M. Grassl and M. Roetteler, “Leveraging automorphisms of quantum codes for fault-tolerant quantum computation”, 2013 IEEE International Symposium on Information Theory (2013) arXiv:1302.1035 DOI
- [24]
- S. Bravyi and J. Haah, “Magic-state distillation with low overhead”, Physical Review A 86, (2012) arXiv:1209.2426 DOI
- [25]
- M. A. Webster, A. O. Quintavalle, and S. D. Bartlett, “Transversal diagonal logical operators for stabiliser codes”, New Journal of Physics 25, 103018 (2023) arXiv:2303.15615 DOI
- [26]
- Webster, Mark. The XP Stabilizer Formalism. Dissertation, University of Sydney, 2023.
- [27]
- A. Cowtan and S. Burton, “CSS code surgery as a universal construction”, (2023) arXiv:2301.13738
- [28]
- T. Inada et al., “Measurement-Free Ultrafast Quantum Error Correction by Using Multi-Controlled Gates in Higher-Dimensional State Space”, (2021) arXiv:2109.00086
- [29]
- G. A. Paz-Silva, G. K. Brennen, and J. Twamley, “Fault Tolerance with Noisy and Slow Measurements and Preparation”, Physical Review Letters 105, (2010) arXiv:1002.1536 DOI
- [30]
- S. Heußen, D. F. Locher, and M. Müller, “Measurement-free fault-tolerant quantum error correction in near-term devices”, (2023) arXiv:2307.13296
- [31]
- A. T. Schmitz, “Thermal Stability of Dynamical Phase Transitions in Higher Dimensional Stabilizer Codes”, (2020) arXiv:2002.11733
- [32]
- Y. Choukroun and L. Wolf, “Deep Quantum Error Correction”, (2023) arXiv:2301.11930
- [33]
- A. M. Steane, “Active Stabilization, Quantum Computation, and Quantum State Synthesis”, Physical Review Letters 78, 2252 (1997) arXiv:quant-ph/9611027 DOI
- [34]
- T. Tansuwannont, C. Chamberland, and D. Leung, “Flag fault-tolerant error correction, measurement, and quantum computation for cyclic Calderbank-Shor-Steane codes”, Physical Review A 101, (2020) arXiv:1803.09758 DOI
- [35]
- P.-H. Liou and C.-Y. Lai, “Parallel syndrome extraction with shared flag qubits for Calderbank-Shor-Steane codes of distance three”, Physical Review A 107, (2023) arXiv:2208.00581 DOI
- [36]
- B. Pato et al., “Optimization tools for distance-preserving flag fault-tolerant error correction”, (2024) arXiv:2306.12862
- [37]
- C. Chamberland and M. E. Beverland, “Flag fault-tolerant error correction with arbitrary distance codes”, Quantum 2, 53 (2018) arXiv:1708.02246 DOI
- [38]
- S. Huang, T. Jochym-O’Connor, and T. J. Yoder, “Homomorphic Logical Measurements”, (2022) arXiv:2211.03625
- [39]
- N. Delfosse, B. W. Reichardt, and K. M. Svore, “Beyond Single-Shot Fault-Tolerant Quantum Error Correction”, IEEE Transactions on Information Theory 68, 287 (2022) arXiv:2002.05180 DOI
- [40]
- A. A. Kovalev and L. P. Pryadko, “Fault tolerance of quantum low-density parity check codes with sublinear distance scaling”, Physical Review A 87, (2013) arXiv:1208.2317 DOI
- [41]
- I. Dumer, A. A. Kovalev, and L. P. Pryadko, “Thresholds for Correcting Errors, Erasures, and Faulty Syndrome Measurements in Degenerate Quantum Codes”, Physical Review Letters 115, (2015) arXiv:1412.6172 DOI
- [42]
- G. Alagic et al., “Quantum Fully Homomorphic Encryption with Verification”, Advances in Cryptology – ASIACRYPT 2017 438 (2017) arXiv:1708.09156 DOI
- [43]
- P. W. Shor and J. Preskill, “Simple Proof of Security of the BB84 Quantum Key Distribution Protocol”, Physical Review Letters 85, 441 (2000) arXiv:quant-ph/0003004 DOI
- [44]
- A. Coladangelo et al., “Hidden Cosets and Applications to Unclonable Cryptography”, (2022) arXiv:2107.05692
- [45]
- A. M. Steane, “Simple quantum error-correcting codes”, Physical Review A 54, 4741 (1996) arXiv:quant-ph/9605021 DOI
- [46]
- M. A. Nielsen and I. L. Chuang, Quantum Computation and Quantum Information (Cambridge University Press, 2012) DOI
- [47]
- J. Preskill. Lecture notes on Quantum Computation. (1997–2020) URL
- [48]
- A. R. Calderbank et al., “Quantum Error Correction via Codes over GF(4)”, (1997) arXiv:quant-ph/9608006
- [49]
- N. Chancellor et al., “Graphical structures for design and verification of quantum error correction”, Quantum Science and Technology 8, 045028 (2023) arXiv:1611.08012 DOI
- [50]
- J. M. Renes et al., “Efficient Quantum Polar Codes Requiring No Preshared Entanglement”, IEEE Transactions on Information Theory 61, 6395 (2015) arXiv:1307.1136 DOI
- [51]
- J. Haah, “Towers of generalized divisible quantum codes”, Physical Review A 97, (2018) arXiv:1709.08658 DOI
- [52]
- M. L. Liu, N. Tantivasadakarn, and V. V. Albert, “Subsystem CSS codes, a tighter stabilizer-to-CSS mapping, and Goursat’s Lemma”, (2023) arXiv:2311.18003
- [53]
- S. Bravyi, B. M. Terhal, and B. Leemhuis, “Majorana fermion codes”, New Journal of Physics 12, 083039 (2010) arXiv:1004.3791 DOI
- [54]
- A. A. Kovalev and L. P. Pryadko, “Quantum Kronecker sum-product low-density parity-check codes with finite rate”, Physical Review A 88, (2013) arXiv:1212.6703 DOI
- [55]
- J. Fan et al., “Partially Concatenated Calderbank-Shor-Steane Codes Achieving the Quantum Gilbert-Varshamov Bound Asymptotically”, IEEE Transactions on Information Theory 69, 262 (2023) DOI
- [56]
- A. Ashikhmin, S. Litsyn, and M. Tsfasman, “Asymptotically good quantum codes”, Physical Review A 63, (2001) arXiv:quant-ph/0006061 DOI
- [57]
- R. Matsumoto, “Improvement of Ashikhmin-Litsyn-Tsfasman bound for quantum codes”, IEEE Transactions on Information Theory 48, 2122 (2002) arXiv:quant-ph/0107129 DOI
- [58]
- O. Novak and N. Rengaswamy, “GNarsil: Splitting Stabilizers into Gauges”, (2024) arXiv:2404.18302
- [59]
- J. Hu et al., “CSS Codes that are Oblivious to Coherent Noise”, 2021 IEEE International Symposium on Information Theory (ISIT) (2021) DOI
- [60]
- J. Hu et al., “Mitigating Coherent Noise by Balancing Weight-2 Z-Stabilizers”, IEEE Transactions on Information Theory 68, 1795 (2022) arXiv:2011.00197 DOI
- [61]
- L. Eldar and A. W. Harrow, “Local Hamiltonians Whose Ground States Are Hard to Approximate”, 2017 IEEE 58th Annual Symposium on Foundations of Computer Science (FOCS) (2017) arXiv:1510.02082 DOI
- [62]
- S. Vijay and L. Fu, “Quantum Error Correction for Complex and Majorana Fermion Qubits”, (2017) arXiv:1703.00459
- [63]
- A. M. Steane, “Enlargement of Calderbank Shor Steane quantum codes”, (1998) arXiv:quant-ph/9802061
- [64]
- M. Grassl and M. Rotteler, “Non-additive quantum codes from Goethals and Preparata codes”, 2008 IEEE Information Theory Workshop (2008) arXiv:0801.2144 DOI
- [65]
- M. A. Webster, B. J. Brown, and S. D. Bartlett, “The XP Stabiliser Formalism: a Generalisation of the Pauli Stabiliser Formalism with Arbitrary Phases”, Quantum 6, 815 (2022) arXiv:2203.00103 DOI

## Page edit log

- Christopher A. Pattison (2023-08-12) — most recent
- Balint Pato (2023-02-28)
- Balint Pato (2023-02-25)
- Victor V. Albert (2022-09-10)
- Victor V. Albert (2022-05-18)
- Armin Gerami (2022-05-16)
- Leonid Pryadko (2022-02-16)
- Victor V. Albert (2022-02-16)
- Seyed Sajjad Nezhadi (2021-12-14)
- Victor V. Albert (2021-11-04)

## Cite as:

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