Triorthogonal Quantum Codes
- Triorthogonal codes are quantum CSS codes defined by binary matrices whose rows satisfy pairwise and triplewise even-overlap constraints, enabling transversal non-Clifford logical operations.
- They underpin magic-state distillation and fault-tolerant protocols with key examples like the [[15,1,3]] and [[49,1,5]] codes demonstrating transversal T and CCZ gate implementations.
- Construction methods range from numerical searches and algebraic techniques based on self-dual codes to optimization via integer linear programming, with extensions to qudit settings and improved decoding strategies.
Triorthogonal codes are quantum Calderbank–Shor–Steane (CSS) codes defined by a binary matrix whose rows obey simultaneous pairwise and triplewise even-overlap constraints. In the binary setting, these constraints are imposed on the supports of generator rows, and they underlie several of the best-known constructions for transversal non-Clifford logical gates, especially in magic-state distillation and related fault-tolerant protocols (Bravyi et al., 2012, Paetznick et al., 2013, Camps-Moreno et al., 2024). Subsequent work has connected triorthogonal matrices to CSS- codes, characterized their equivalence classes and extremal structure, developed constructive and classification methods, and extended the framework to decoding and to non-binary qudit settings (Camps-Moreno et al., 2024, Baldelli et al., 23 May 2026).
1. Definition and structural identities
Let have row vectors . The matrix is triorthogonal when, for all distinct pairs and triples of rows,
where denotes the Schur product and denotes Hamming weight modulo $2$ (Camps-Moreno et al., 2024). Equivalent formulations in the literature describe the same condition as every pair of rows overlapping in an even number of coordinates and every triple of rows also overlapping in an even number of coordinates (Bravyi et al., 2012, Mishchenko et al., 2022).
A standard decomposition separates odd-weight and even-weight rows. If the top rows are odd and the bottom rows are even, so that , then one has
0
which is a useful normal-form identity for binary triorthogonal matrices (Camps-Moreno et al., 2024). In the CSS interpretation, the even-weight rows become 1-type stabilizer generators, while the odd-weight rows correspond to logical 2 operators (Mishchenko et al., 2022, Bravyi et al., 2012).
This binary definition is the core combinatorial object. Many later results amount to determining which linear codes admit such a generating matrix, how these matrices behave under equivalence and puncturing, and which logical gates their associated CSS codes support.
2. CSS and CSS-3 formulations
If 4 is triorthogonal and 5, then
6
and the hull
7
is exactly 8 (Camps-Moreno et al., 2024). This identifies triorthogonal codes as a special subclass of CSS-9 constructions. In particular, the CSS pair
0
satisfies the CSS-1 condition
2
and therefore yields an 3 quantum code with 4 and 5 (Camps-Moreno et al., 2024).
This formulation makes the odd/even row split intrinsic rather than basis-dependent. A key structural consequence is that a binary triorthogonal matrix determines the parameters of the corresponding triorthogonal quantum code uniquely: if 6 and 7 are equivalent and both triorthogonal, then they give rise to the same 8 parameters (Camps-Moreno et al., 2024). More precisely, 9 is triorthogonal if and only if
0
where 1 is a permutation matrix on the odd-weight rows, 2 is invertible on the even-weight rows, and 3 is arbitrary (Camps-Moreno et al., 2024). Thus equivalent triorthogonal generator matrices differ only by permuting odd rows, mixing in 4, or changing the basis of 5.
The same paper introduces a partial order on triorthogonal codes,
6
and characterizes extremal elements in this CSS-7 poset. A code is minimal if and only if it is one-dimensional and even, so 8; it is maximal if and only if
9
(Camps-Moreno et al., 2024). These results make precise when a triorthogonal code can no longer be reduced or enlarged without leaving the triorthogonal class.
3. Transversal gates and logical action
Triorthogonal codes were introduced in connection with magic-state distillation, where the central operational property is a transversal realization of non-Clifford gates (Bravyi et al., 2012). In the Bravyi–Haah construction, any triorthogonal matrix gives a stabilizer code for which there exists a diagonal Clifford 0, composed only of 1 and 2 gates, such that
3
acts as a logical 4 on all encoded qubits simultaneously (Bravyi et al., 2012). Later formulations state the same operational fact as a transversal 5 followed by prescribed Clifford fixups, typically single-qubit 6 and two-qubit 7 corrections (Jain et al., 2024).
The logical action can be sharper under additional conditions. In the CSS framework 8, a full generator matrix of 9 realizes physical transversal 0 as logical 1 without further Clifford correction if and only if the matrix is triorthogonal and an additional Hamming-weight condition modulo 2 holds: 3 for the appropriate logical representative 4, stabilizer element 5, and logical bit pattern 6 (Rengaswamy et al., 2020, Rengaswamy et al., 2019). The same line of work proves that triorthogonal codes are, essentially, the most general CSS codes that realize logical transversal 7 via physical transversal 8 (Rengaswamy et al., 2019, Rengaswamy et al., 2020).
A second major gate-theoretic property is transversal 9. Any triorthogonal code admits
$2$0
as a logical $2$1 on three encoded blocks, because the triple-overlap condition cancels all unwanted phase terms except the logical cubic phase (Paetznick et al., 2013). Together with transversal Hadamard plus fault-tolerant error correction, this yields a universal distillation-free gate set (Paetznick et al., 2013). More recently, for $2$2-triorthogonal CSS codes $2$3, parallel physical $2$4 gates between corresponding qubits of two blocks were shown to implement logical $2$5, and this property was used to construct lower-overhead logical $2$6 gadgets and teleportation protocols between a triorthogonal code and a companion symmetric CSS code (Jiao et al., 7 Oct 2025).
The gate-theoretic picture therefore has two layers: triorthogonality guarantees level-3 Clifford-hierarchy structure, while additional constraints determine whether the implementation is exact, corrected by a Clifford, or embedded into a larger code-switching architecture.
4. Construction methods and propagation rules
Several distinct construction paradigms are now known. The earliest systematic family is the Bravyi–Haah $2$7 family, which exists for every even $2$8 and gives encoding rate $2$9 (Paetznick et al., 2013, Bravyi et al., 2012). The same work introduced a numerical search method based on column types and linear equations over 0, yielding, among other examples, a distance-5 1 code (Bravyi et al., 2012).
A more algebraic route starts from binary self-dual codes. An algorithm in "Triorthogonal Codes and Self-dual Codes" constructs a maximal triorthogonal subspace 2 inside a self-dual 3 code 4 by iteratively adding codewords that satisfy pairwise orthogonality and triplewise orthogonality with the current generating set (Shi et al., 2024). That paper also generalizes classical shortening and extending to the triorthogonal setting. Shortening on a coordinate preserves triorthogonality, and extending by prepending a standard basis column 5 likewise preserves triorthogonality (Shi et al., 2024). Additional propagation rules include direct concatenation, block-diagonal direct sum, Plotkin-style sums, and a building-up construction by a single extra row (Shi et al., 2024).
The CSS-6 viewpoint yields another propagation rule. If 7 is triorthogonal and 8, then
9
is again triorthogonal (Camps-Moreno et al., 2024). If 0 has odd weight, the associated quantum code gains one logical qubit, producing parameters 1; if 2 has even weight, the logical dimension is unchanged, but the distance bound 3 may improve (Camps-Moreno et al., 2024).
A third construction framework is optimization-based. "On Constructing and Decoding Quantum Triorthogonal Codes" formulates the search for even-weight triorthogonal generator matrices with prescribed dual distance as an integer linear program combining triorthogonality constraints, MacWilliams identities, and Krawtchouk-polynomial conditions (Baldelli et al., 23 May 2026). For odd 4, dual distance 5, and 6, this approach finds nontrivial 7 codes at lengths
8
with some marked as triply-even and others explicitly not necessarily generated by classical triply-even codes (Baldelli et al., 23 May 2026).
5. Representative families, examples, and finite-length classification
The finite-length landscape is anchored by a small set of canonical examples. The 9 punctured Reed–Muller code is the first standard nontrivial case and remains the prototypical triorthogonal 0-code (Bravyi et al., 2012, Jain et al., 2024). The 1 code can be viewed as a doubling of the 2 self-dual color code and the 3 Reed–Muller code, and the 4 code is obtained by doubling the 5 Golay code with the 6 triorthogonal code (Sullivan, 2023).
| Code | Construction | Role noted in the literature |
|---|---|---|
| 7 | punctured Reed–Muller | standard small triorthogonal 8-code |
| 9 | doubling 00 and 01 | crucial ingredient in Golay conversion |
| 02 | doubling 03 and 04 | transversal 05 and code-conversion target |
For the doubling construction, the distance formula is explicit. The 06 code satisfies
07
and the 08 code satisfies
09
(Sullivan, 2023). These are not isolated examples: a 2024 compilation lists triorthogonal 10 codes for odd distances 11 with lengths
12
and states, to the authors’ knowledge, that these are the smallest known triorthogonal codes for their respective distances (Jain et al., 2024). In that family the qubit overhead scales as 13, and the stabilizer generator weights scale roughly as 14 (Jain et al., 2024).
At very small sizes, the classification problem is essentially complete. There are exactly 15 distinguished triorthogonal subspaces with 16, and every triorthogonal code in that range descends from one of them through puncturing and deleting qubits (Nezami et al., 2021). This classification is phrased in terms of Reed–Muller indicator polynomials and provides a finite-length taxonomy of all small examples (Nezami et al., 2021).
A useful caution appears already in the smallest worked examples. For the 17 matrix with three odd rows and no even rows,
18
the formal CSS-19 lower bound gives 20, but in fact 21 and 22 has distance 23 (Camps-Moreno et al., 2024). This clarifies a recurring point: formal lower bounds arising from the hull construction need not coincide with the true 24-distance.
6. Decoding, applications, limitations, and non-binary extensions
Triorthogonal codes are the workhorse for low-overhead magic-state distillation because their pairwise and triplewise even-overlap structure guarantees that a transversal 25-gate on physical qubits implements a logical 26 on the distilled subspace (Baldelli et al., 23 May 2026). In the original Bravyi–Haah framework, recursive distillation based on an 27 triorthogonal code gives overhead
28
and the 29 family approaches 30 (Bravyi et al., 2012). Generalized triorthogonal constructions later pushed asymptotic distillation efficiency toward 31 (Haah et al., 2017).
On the decoding side, recent work evaluates high-distance triorthogonal codes over the dephasing channel using bounded-distance decoding, belief propagation plus ordered-statistics post-processing, and an adapted GRAND decoder (Baldelli et al., 23 May 2026). For the 32 and 33 codes, qGRAND with large query budget is reported as slightly better at low 34 than the best BP+OSD variants on the 35 code, and competitive or better on the denser 36 code; the paper concludes that the GRAND-based decoder is a promising option (Baldelli et al., 23 May 2026).
Triorthogonal codes also appear in code-conversion architectures. The 37 Golay code can be fault-tolerantly converted to a 38 triorthogonal code with a transversal 39 gate, using only transversal Clifford operations, single-qubit measurements, and an ancilla construction based on the 40 code (Sullivan, 2023). A different universal-computation route pairs a triorthogonal code with a symmetric CSS code so that 41 and 42 are transversal in the triorthogonal block while Clifford gates are transversal in the symmetric block, with logical teleportation between the two (Jiao et al., 7 Oct 2025).
In secure multi-party quantum computation, triorthogonal CSS codes broaden the set of feasible node counts relative to triply-even codes. Reported examples include 43, 44, and 45, whereas the small triply-even examples are 46 and 47 (Mishchenko et al., 2022). This supports the narrower but important distinction that triply-even codes form a subclass of triorthogonal codes, while triorthogonality permits additional small-length instances (Mishchenko et al., 2022, Baldelli et al., 23 May 2026).
Several limitations recur across the literature. Known binary triorthogonal codes often have relatively low distance, frequently 48 or 49, and 50 is often small, commonly 51 (Paetznick et al., 2013, Mishchenko et al., 2022). Logical Hadamard is generally not transversal in a single triorthogonal code and must be supplied by error correction, teleportation, or code switching (Paetznick et al., 2013, Mishchenko et al., 2022, Jiao et al., 7 Oct 2025). These constraints motivate current work on higher-distance constructions, better decoding, and hybrid architectures.
The framework has also been generalized beyond binary qubits. For qutrits, there is a family of 52 triorthogonal codes with
53
which tends to 54 as 55; the 56 example has 57 (Prakash et al., 2024). Over 58, asymptotically good triorthogonal codes with transversal 59 have been constructed, including a 60 example (Cervia et al., 26 Dec 2025). For all prime dimensions, punctured Reed–Muller constructions yield sublogarithmic overhead, and a 61 code with 62 is explicitly reported (Saha et al., 12 Oct 2025). These non-binary results suggest that triorthogonality is not merely a qubit-specific device but a broader coding-theoretic mechanism for transversal level-3 Clifford-hierarchy gates.