Triorthogonal code[1; Secs. III-IV]
Description
Qubit CSS codes realize logical diagonal non-Clifford gates through transversal \(T\) gates followed by diagonal Clifford corrections.
An \(m \times n\) binary matrix is triorthogonal if its rows \(r_1, \ldots, r_m\) satisfy \(|r_i \cdot r_j| = 0\) and \(|r_i \cdot r_j \cdot r_k| = 0\) modulo \(2\), with binary addition and multiplication. The triorthogonal CSS code associated with the matrix is constructed by mapping nonzero entries in even-weight rows to \(X\)-type stabilizer generators, odd-weight rows to \(X\)-type logical operators, and \(Z\) operators for each row in the orthogonal complement. A generalized triorthogonal code keeps every overlap involving a stabilizer row even but allows odd overlaps among its logical rows, which realize diagonal non-Clifford gates other than \(T\) [2; Appx. D][3; Sec. 2.3].
The parities of the weights, pair overlaps, and triple overlaps of the logical rows form a symmetric trilinear form [4][3; Sec. 2.3]. This form determines the logical gate realized by transversal \(T\) up to a diagonal Clifford correction, namely a product of \(T\), \(CS\), and \(CCZ\) gates on the logical qubits [4]. A CSS code with three logical qubits realizes a logical \(CCZ\) gate by \(T^{\otimes n}\) followed by a diagonal Clifford correction if and only if it satisfies the nine Campbell-Howard conditions [2][5; Thm. 3.3]. These require the code to be generalized triorthogonal with logical rows of even weight, even pair overlaps, and odd triple overlap.
Protection
Generalized triorthogonal matrices with at most seven rows yield \(T\)-to-\(T\) distillation protocols of distance at most three and \(T\)-to-\(CCZ\) protocols of distance at most two [6; Sec. V].Rate
Asymptotically good families of binary triorthogonal codes exist [7].Encoding
Encoder for magic states for the code constructed in [1].Transversal and Permutation-Based Gates
Transversal action of \(T\) gates on all qubits, followed by a particular pattern of \(CZ\) and \(S\) gates, will realize a logical \(T\) gate [1; Lemma 2][8; Rem. I.2.2]. When an additional condition on logical-\(X\) operators is satisfied, the \(CZ\) and \(S\) gates are no longer necessary [9; Thm. 14].Triorthogonality is necessary but not sufficient for physical transversal \(T\) gates on each qubit to realize the identity logical gate [9; Thm. 12].Certain codes realize controlled-controlled-\(Z\) gates [10], realized via physical \(CCZ\) gates on three code blocks.Triorthogonal codes realizing logical \(T\) gates using only physical \(T\) gates can be paired up with self-dual CSS codes to yield a transversal CNOT gate [11].Decoding
Steane error correction [11].Fault Tolerance
Universal fault-tolerant gates can be performed without magic-state distillation [10,12].Universal fault-tolerant gates can be achieved by pairing with a self-dual CSS code and using Steane error correction [11].Notes
Reference [13] presents a classification of triorthogonal codes up to \(n + k \leq 38\) by associating each triorthogonal code with a RM code polynomial. Reference [4] extends the classification to generalized triorthogonal codes with \(n\leq54\) and \(d_Z\geq3\). See Ref. [4; Table II] for the resulting Pareto-optimal distillation protocols and Figshare for their matrices.See Ref. [6; Tables I and II] for tables of single-output \(T\)- and \(CCZ\)-state distillation protocols.See Ref. [5; Table 3] for codes with a \(T/T^\dagger\) logical \(CCZ\) gate whose \(X\)-type stabilizer columns are subspace complements in \(PG(s-1,2)\) for \(s\leq9\).A database of triorthogonal codes is available in QECDB [14].Cousins
- Quantum Reed-Muller (RM) code— Classification of triorthogonal codes yields a connection to RM code polynomials [13].
- Self-dual linear code— Self-dual binary codes can be used to construct triorthogonal codes [15].
- CSS-T code— Triorthogonal and CSS-T codes overlap, but neither is a subset of the other [8]. CSS-T codes reduce to triorthogonal codes when the logical action of the physical transversal \(T\) gate is a logical \(T\) gate on all encoded qubits. Triorthogonality is necessary for physical transversal \(T\) gates on each qubit to realize the identity logical gate [9; Thm. 12]. The \(X\)-type stabilizer generator matrix for a CSS-T code is always triorthogonal [16; Corr. 5].
- Binary dihedral PI code— There exist binary dihedral PI codes that have distance 5 (7, 9, 11, 13) and encode in 27 (49, 73, 107, 147) qubits, all realizing transversal \(T\) gates.
- \([[5,1,3]]\) Five-qubit perfect code— The layered construction with the \([[31,5,3]]\) outer coset-divisible code can be viewed as a factorization of a \([[31,1,3]]\) triorthogonal code [17; Sec. V].
- Self-dual CSS code— Triorthogonal codes realizing logical \(T\) gates using only physical \(T\) gates can be paired up with self-dual CSS codes. Such a pair yields a transversal CNOT gate and universal fault-tolerant gates using Steane error correction [11].
- Generalized quantum divisible code— Both generalized quantum divisible codes and triorthogonal codes are CSS codes. Every level-three generalized quantum divisible code is a triorthogonal code, while the converse was left open in Ref. [18; Sec. VI.C].
- Quantum rainbow code— Hypergraph products of color codes yield quantum rainbow codes with growing distance and transversal gates in the Clifford hierarchy. In particular, utilizing this construction for quasi-hyperbolic color codes [19] yields an \([[n,O(n),O(\log n)]]\) triorthogonal code family satisfying the necessary conditions for the magic-state yield parameter \(\gamma\) to become arbitrarily small [20].
- \([[23, 1, 7]]\) Quantum Golay code— A \([[95,1,7]]\) triorthogonal code with a transversal \(T\) gate can be obtained from the qubit Golay code via the doubling transformation [21].
- Weakly divisible CSS code— The \([[31,5,3]]\) member together with the five-qubit code can be viewed as a factorization of a \([[31,1,3]]\) triorthogonal code [17; Sec. V].
- Quantum quadratic-residue (QR) code— Qubit quantum QR codes are doubly even and admit transversal implementations of the single-qubit Clifford group [8]. They yield a family of high-distance triorthogonal and weak triply even codes via the doubling transformation [8]; such codes admit transversal implementations of the \(T\) gate.
- Quantum AG code— By defining a generalization of triorthogonal matrices to Galois qudits of dimension \(q=2^m\), one can construct an asymptotically good family of quantum AG codes that admits a diagonal transversal gate at the third level of the Clifford hierarchy and attains a zero magic-state yield parameter, \(\gamma = 0\) [22]. This code can be treated as a qubit code by decomposing each Galois qudit into a Kronecker product of \(m\) qubits; see [23,25–28][24; Sec. 5.3]. Two other asymptotically good families [26,27] admit a transversal \(CCZ\) gate (a different diagonal gate at the third level of the Clifford hierarchy) and achieve \(\gamma \to 0\) with constant alphabet size.
Primary Hierarchy
References
- [1]
- S. Bravyi and J. Haah, “Magic-state distillation with low overhead”, Physical Review A 86, (2012) arXiv:1209.2426 DOI
- [2]
- E. T. Campbell and M. Howard, “Unified framework for magic state distillation and multiqubit gate synthesis with reduced resource cost”, Physical Review A 95, (2017) arXiv:1606.01904 DOI
- [3]
- J. Haah and M. B. Hastings, “Codes and Protocols for DistillingT, controlled-S, and Toffoli Gates”, Quantum 2, 71 (2018) arXiv:1709.02832 DOI
- [4]
- A. Wills, S. P. Jain, and S. Singh, “Classification of Generalised Triorthogonal Codes through Length 54”, (2026) arXiv:2609.30860
- [5]
- B. Lu and K. R. Brown, “Building codes with transversal CCZ using projective geometry and SAT solvers”, (2026) arXiv:2610.09341
- [6]
- H. Jacinto, X. Valcarce, V. Barizien, É. Gouzien, and N. Sangouard, “Exploring the landscape of compact magic-state distillation factories”, (2026) arXiv:2606.07734
- [7]
- R. San-José, “Asymptotically good binary triorthogonal codes and higher-level transversal gates”, (2026) arXiv:2609.08203
- [8]
- S. P. Jain and V. V. Albert, “Transversal Clifford and T -Gate Codes of Short Length and High Distance”, IEEE Journal on Selected Areas in Information Theory 6, 127 (2025) arXiv:2408.12752 DOI
- [9]
- N. Rengaswamy, R. Calderbank, M. Newman, and H. D. Pfister, “On Optimality of CSS Codes for Transversal T”, IEEE Journal on Selected Areas in Information Theory 1, 499 (2020) arXiv:1910.09333 DOI
- [10]
- A. Paetznick and B. W. Reichardt, “Universal Fault-Tolerant Quantum Computation with Only Transversal Gates and Error Correction”, Physical Review Letters 111, (2013) arXiv:1304.3709 DOI
- [11]
- D. Jiao, M. Bayanifar, A. Ashikhmin, and O. Tirkkonen, “Low Overhead Universal Quantum Computation with Triorthogonal Codes”, (2025) arXiv:2510.05708
- [12]
- D. Banfield, H. Leitch, and A. Kay, “Implementing Clifford Gates on Stabilizer Codes via Measurement”, (2025) arXiv:2210.14074
- [13]
- S. Nezami and J. Haah, “Classification of small triorthogonal codes”, Physical Review A 106, (2022) arXiv:2107.09684 DOI
- [14]
- S. Burton, “qecdb.org: Quantum Error Correction Database”, URL
- [15]
- M. Shi, H. Lu, J.-L. Kim, and P. Sole, “Triorthogonal Codes and Self-dual Codes”, (2024) arXiv:2408.09685
- [16]
- E. Camps-Moreno, H. H. López, G. L. Matthews, D. Ruano, R. San-José, and I. Soprunov, “An algebraic characterization of binary CSS-T codes and cyclic CSS-T codes for quantum fault tolerance”, Quantum Information Processing 23, (2024) arXiv:2312.17518 DOI
- [17]
- J. Hu, Q. Liang, and R. Calderbank, “Divisible Codes for Quantum Computation”, (2022) arXiv:2204.13176
- [18]
- J. Haah, “Towers of generalized divisible quantum codes”, Physical Review A 97, (2018) arXiv:1709.08658 DOI
- [19]
- G. Zhu, S. Sikander, E. Portnoy, A. W. Cross, and B. J. Brown, “Non-Clifford and Parallelizable Fault-Tolerant Logical Gates on Constant and Almost-Constant Rate Homological Quantum Low-Density Parity-Check Codes via Higher Symmetries”, PRX Quantum 6, (2025) arXiv:2310.16982 DOI
- [20]
- T. R. Scruby, A. Pesah, and M. Webster, “Quantum Rainbow Codes: Achieving Linear Rate, Growing Distance and Transversal Non-Clifford Gates with Generalised Colour Codes”, (2025) arXiv:2408.13130
- [21]
- M. Sullivan, “Code conversion with the quantum Golay code for a universal transversal gate set”, Physical Review A 109, (2024) arXiv:2307.14425 DOI
- [22]
- A. Wills, M.-H. Hsieh, and H. Yamasaki, “Constant-Overhead Magic State Distillation”, (2024) arXiv:2408.07764
- [23]
- A. Ashikhmin and E. Knill, “Nonbinary quantum stabilizer codes”, IEEE Transactions on Information Theory 47, 3065 (2001) DOI
- [24]
- A. Niehage, “Quantum Goppa Codes over Hyperelliptic Curves”, (2005) arXiv:quant-ph/0501074
- [25]
- D. Gottesman, Surviving as a Quantum Computer in a Classical World (2024) URL
- [26]
- Q. T. Nguyen, “Good binary quantum codes with transversal CCZ gate”, (2024) arXiv:2408.10140
- [27]
- L. Golowich and V. Guruswami, “Asymptotically Good Quantum Codes with Transversal Non-Clifford Gates”, (2024) arXiv:2408.09254
- [28]
- M. Heinrich, “On stabiliser techniques and their application to simulation and certification of quantum devices”, PhD thesis, Universität zu Köln, 2021.
Page edit log
- Rodrigo San-José (2026-10-05) — most recent
- Victor V. Albert (2026-10-08)
- Victor V. Albert (2026-09-06)
- Victor V. Albert (2026-06-08)
- Victor V. Albert (2024-07-29)
- Shubham P. Jain (2024-07-29)
- Narayanan Rengaswamy (2024-07-29)
- Victor V. Albert (2021-12-16)
- Benjamin Quiring (2021-12-16)
Cite as:
“Triorthogonal code”, The Error Correction Zoo (V. V. Albert & P. Faist, eds.), 2026. https://errorcorrectionzoo.org/c/quantum_triorthogonal, arXiv:2606.11484