arXiv:2610.08012quant-phOct 2026

Manuscript Offprint

arXiv:2610.08012

Cyclic triorthogonal codes in prime dimension

Shiroman Prakash

Shiroman Prakash

Department of Physics and Computer Science, Dayalbagh Educational Institute, Agra-282005, India

We study cyclic triorthogonal codes in prime dimension pp, on which a transversal third-level diagonal gate acts as a logical non-Clifford gate. For odd pp, we use a definition of triorthogonality that does not require self-orthogonality. For cyclic codes of length coprime to pp, triorthogonality reduces to a sumset condition on the spectral support, which makes exhaustive search feasible: for two natural constructions, we enumerate all maximal codes of this kind for p=3p = 3 up to length 121 and p=5,7p = 5, 7 up to length 96. For qubits, we prove that a cyclic code of odd length is triply even if and only if it is classically triorthogonal, giving a complete description of triply-even cyclic codes, and we determine all such codes up to length 763. For qudits, we find codes such as [[19, 1, 3]]3_3 and [[7, 1, 3]]7_7, which improve on the shortest Reed–Muller and Reed–Solomon codes in both overhead exponent and distillation threshold. The latter is the first member of an infinite family of [[p, 1, 2[p/6] + 1]]p_p codes.

1 Introduction

Triorthogonal codes [1] are CSS codes for which a transversal third-level diagonal gate implements a non-Clifford logical gate, and they underlie many magic state distillation protocols [1, 2]. However, small explicit examples are comparatively scarce, particularly for qudits. Many of the best-known examples are cyclic or extended cyclic. These include the [[15, 1, 3]]_2 code [2], the punctured Reed–Muller codes [3–7], and the qudit Reed–Solomon codes [8]. It is therefore natural to study cyclic triorthogonal codes systematically.

Our study includes qudits of all prime dimensions. Magic state distillation extends naturally to qudits of odd prime dimension [3, 9, 10], where it can reduce overheads and raise thresholds compared with qubits [4, 11–14]. The relevant third-level gates and magic states, and the noise thresholds achievable with them, have been studied in [15–17].

For cyclic codes, the algebra of triorthogonality becomes transparent. A cyclic code CC of length nn over Fp\mathbb{F}_p, with p∤np \nmid n, is determined by its spectral support S⊆ZnS \subseteq \mathbb{Z}_n: the set of frequencies at which the discrete Fourier transform of a codeword may be nonzero, or equivalently the exponents jj for which αj\alpha^j is not a root of the generator polynomial, where α\alpha is a primitive nn-th root of unity in an extension field of Fp\mathbb{F}_p. Coordinatewise products of cyclic codes are again cyclic, and the span of all tt-fold products of codewords of CC has spectral support equal to the sumset tS=S+⋯+StS = S + \cdots + S [18, 19]. Triorthogonality asks that certain coordinate sums of such products vanish, and a cyclic code has vanishing coordinate sums exactly when 00 is not in its support. Triorthogonality therefore reduces to the condition that 00 avoids certain sumsets of SS. Camps-Moreno et al. [20] used this idea to characterize binary cyclic CSS-T codes, leaving the qq-ary case open. We apply it to triorthogonality in every prime dimension.

Shiroman Prakash: sprakash@dei.ac.in

We consider two constructions (Section 4). In construction A, the stabilizers form a cyclic code and the logical row is the all-ones vector; this is the analogue of punctured Reed–Muller codes, and triorthogonality is equivalent to 0∉S∪2S∪3S0 \notin S \cup 2S \cup 3S. In construction B, a cyclic space is punctured at one coordinate, and the condition for triorthogonality is simply 0∉3S0 \notin 3S. For odd pp we use a definition of triorthogonality that, unlike that of [8], imposes no self-orthogonality, and we give a short self-contained proof that it yields a transversal non-Clifford gate (Section 3). T. Saha has independently obtained this sufficient condition for p≥5p \geq 5 [21]. The weaker definition matters in practice: the [[19,1,3]]3[[19, 1, 3]]_3 code of Example 14 is not self-orthogonal, and requiring self-orthogonality would raise the shortest cyclic distance-3 qutrit code to length 39.

Qubits. For qubits the spectral criterion gives a complete description of a class of codes that is otherwise hard to construct. A binary code is triply even if all its weights are divisible by 8, and classically triorthogonal if ∑lxlylzl≡0\sum_l x_{l}y_l z_l \equiv 0 for all codewords x,y,zx, y, z. Every triply-even code is classically triorthogonal, but not conversely [22]. We show that the converse holds for cyclic codes of odd length: such a code is triply even if and only if 0∉3S0 \notin 3S, that is, if and only if it is classically triorthogonal (Theorem 16). The proof is a short consequence of McEliece's theorem on the divisibility of weights of cyclic codes [23]. Systematic constructions of triply-even codes are rare: beyond Reed–Muller codes, they have mostly come from doubling [22, 24] and triangular graphs [22]. Here every union of cyclotomic cosets with 0∉3S0 \notin 3S gives one, and the transversal TT gate acts on the resulting quantum codes exactly, with no Clifford correction. We determine all triply-even cyclic codes of odd length up to 763.

Qudits. The spectral criteria make an exhaustive search over cyclic codes arising from constructions A and B feasible, since each candidate is a union of cyclotomic cosets and the conditions can be checked directly on S. We carry out this search for p=3p = 3 up to length 121 and p=5,7p = 5, 7 up to length 96, and certify every distance, either exactly or as a rigorous lower bound (Sections 6 and 7). The resulting codes reach a given distance at a fraction of the length of punctured Reed–Muller codes; for example, the new [[7, 1, 3]]7 code is less than a sixth of the length of [[48, 1, 4]]7, the shortest punctured Reed–Muller code with d≥3d \geq 3. The criteria also yield infinite families. Alongside the qudit Reed–Solomon codes, we obtain [[p, 1, 2[p/6] + 1]]_p codes for every prime p≥7p \geq 7, of which [[7, 1, 3]]7 is the first (Proposition 15); as far as we know, this family has not previously been identified as triorthogonal. Finally, in Section 8 we compute exact distillation thresholds and overhead exponents. The [[19, 1, 3]]3 and [[7, 1, 3]]7 codes improve on the shortest Reed–Muller and Reed–Solomon codes in both; for p=5p = 5, however, cyclic codes provide no advantage over recursive use of the [[4, 1, 2]]5 Reed–Solomon code.

Related work. Zurel, Jana and de Silva [25] recently showed that quantum quadratic residue codes, which are also cyclic, unify several high-threshold distillation protocols, including the 5-qubit, Steane and 11-qutrit Golay codes [26]. Those protocols distill Clifford-eigenstate magic states (the Bravyi–Kitaev T state [2] for qubits and the strange state [27] for qutrits) using codes with a transversal Clifford gate. The codes in this paper are of a different kind: they distill the states U∣+⟩U|+\rangle produced by a transversal non-Clifford gate U, which are the resource for injecting U. For qubits, generalized triorthogonal codes have recently been classified up to length 54 [28], extending [29]. The binary cyclic CSS-T characterization of [20] has been extended to matrix-product codes with cyclic constituents [30]. The authors of [20] also studied binary triorthogonal codes within the CSS-T framework [31], and proposed constructions from cyclic codes and the generalization to the p-ary case as directions for future work. Binary CSS-T codes have also been built from cyclic codes [32], and triorthogonal codes with cyclic column symmetry were found by integer programming in [33], all of distance 3 in the range searched. The shortest known triorthogonal codes at distances 7 and 9, [[95, 1, 7]]_2 and [[185, 1, 9]]_2, come from non-cyclic constructions [24, 34]. Asymptotically good codes with transversal non-Clifford gates have also been constructed [35–38]; these target asymptotic overhead and typically require large lengths or field sizes, whereas we focus on small codes for small primes.

The paper is organized as follows. Section 2 reviews the spectral description of cyclic codes. Section 3 recalls the CSS code associated with a matrix, gives our definition of triorthogonality for odd p, and proves that it yields a transversal gate, separately for p≥5p \geq 5 and p = 3. Section 4 derives the spectral criteria, and Section 5 the qubit result. Sections 6–8 describe the search, the codes and their distillation performance, and Section 9 concludes. The appendices give the spectral description of concatenated codes, the proof of a lemma about distillation thresholds, the best code at every length, and the spectral supports of selected codes.

References (45)