betaFeedback

WorksPhysics and Astronomy

Building codes with transversal CCZ using projective geometry and SAT solvers

Abstract

We construct CSS codes with three logical qubits whose logical CCZ gate is implemented by transversal physical T/T†T/T^\dagger gates and whose distance is at least 3. These codes start with 8-divisible XX-stabilizers defined by projective geometry, which guarantees dZ≥3d_Z \geq 3. A SAT solver then finds three XX-logical operators compatible with the transversal CCZ. We build codes at thirteen block lengths from n=48n=48 to n=496n=496, with dZ=3d_Z=3 or 4, and illustrate the method with the [[48,3,3]] code Q48Q_{48}. Additionally, we prove that no CSS code with three logical qubits, ZZ-distance at least 3, and a quasi-transversal CCZ gate (transversal TT with a diagonal Clifford correction) exists below n=39n=39. The [[47,3,3]] code of Jacinto et al. attains the minimum length in this class, as established by the classification of Wills, Jain, and Singh.

Introduction

Fault-tolerant quantum computation requires non-Clifford logical gates. Magic-state distillation remains the standard route to such gates, but it introduces a substantial space-time overhead [3, 4, 5]. Transversal-gate constructions address the overhead by designing codes whose physical phase rotations implement a desired logical diagonal gate directly [6, 7, 8]. Examples include color-code and topological constructions [9, 10] and CSS-T codes [11, 12]. Hu, Liang, and Calderbank characterize diagonal gates on CSS codes [13]. Rengaswamy et al. give necessary conditions for fixed physical T/T†T/T^\dagger patterns on stabilizer codes [14 Thm. 6], and Campbell and Howard give sufficient overlap conditions for CCZ [6]. Related CSS constructions use the diagonal Clifford hierarchy or divisible coset weights [15, 16]. Concurrent work develops codes over binary extension fields [17]. For a single logical qubit and the TT gate, the shortest known such codes are the divisible and triorthogonal families of [18]. A recurring requirement in these constructions is that the code generated by the XX-type stabilizers be triply even, meaning every codeword weight is a multiple of 8 [19]. Such a code is also called 8-divisible, and the two terms are used interchangeably.

The present work focuses on finding Calderbank-Shor-Steane (CSS) codes with three logical qubits that implement a non-Clifford logical CCZ gate by physical TT and T†T^\dagger rotations applied directly to the data block of a distance-dd code. A CSS code is specified by nested classical binary codes

C2=rowspan⁡(S)⊂C1=rowspan⁡(G),G=[KS].C_2 = \operatorname{rowspan}(S) \subset C_1 = \operatorname{rowspan}(G), \qquad G = \begin{bmatrix} K \\ S \end{bmatrix}.

Here the ss rows of SS generate the XX-type stabilizers, the k=3k = 3 rows of KK represent the XX-logical generators, and the nn columns index the physical qubits. The quantity s=rank⁡S=dim⁡C2s = \operatorname{rank} S = \dim C_2 is the (X) stabilizer rank. For a binary vector or Boolean function ff, ∣f∣|f| denotes its Hamming weight, and for a set AA, ∣A∣|A| denotes its cardinality. The XX-logicals are the vectors of C1∖C2C_1 \setminus C_2 and the ZZ-logicals those of C2⊥∖C1⊥C_2^\perp\setminus C_1^\perp, so the code distances are dX=min⁡{∣v∣:v∈C1∖C2}d_X = \min\{ |v| : v \in C_1 \setminus C_2 \} and dZ=min⁡{∣v∣:v∈C2⊥∖C1⊥}d_Z = \min\{ |v| : v \in C_2^\perp\setminus C_1^\perp\}.

Throughout the paper, C2C_2 denotes the classical code and SS denotes only its chosen generator matrix.

The logical computational-basis state with label x⃗∈F23\vec{x} \in\mathbb{F}_2^3 is the uniform superposition over the coset KTx⃗+C2K^\mathsf{T}\vec{x} + C_2 of C2C_2 in C1C_1,

∣x⃗L⟩=12s/2∑y⃗∈F2s∣KTx⃗+STy⃗⟩=12s/2∑y⃗∈F2s∣GTz⃗⟩,z⃗=(x⃗,y⃗)∈F23+s,(1)|\vec{x}_L\rangle= \frac{1}{2^{s/2}} \sum_{\vec{y}\in\mathbb{F}_2^s} |K^\mathsf{T}\vec{x} + S^\mathsf{T}\vec{y}\rangle= \frac{1}{2^{s/2}} \sum_{\vec{y}\in\mathbb{F}_2^s} |G^\mathsf{T}\vec{z}\rangle,\qquad\vec{z}=(\vec{x},\vec{y})\in\mathbb{F}_2^{3+s}, \tag*{(1)}

following the notation of Campbell and Howard [6]. Applying T⊗nT^{\otimes n} to ∣x⃗L⟩|\vec{x}_L\rangle multiplies the term indexed by y⃗\vec{y} by ω∣GTz⃗∣\omega^{|G^\mathsf{T}\vec{z}|} with ω=e2πi/8\omega= e^{2\pi i/8}, so a diagonal gate’s logical action is governed by ∣GTz⃗∣ mod 8|G^\mathsf{T}\vec{z}| \bmod8. The Bravyi–Haah parity identity [3, 6, 20] decomposes this weight mod 8 into single-row weights, pairwise overlaps and triple overlaps: for any full-rank GG with rows g1,…,grg^1,\ldots,g^r and any z⃗∈F2r\vec{z}\in\mathbb{F}_2^r, with ii, i′i', i′′i'' ranging over all rr rows of GG,

∣GTz⃗∣=∑i∣gi∣zi−2∑i<i′∣gi∧gi′∣zizi′+4∑i<i′<i′′∣gi∧gi′∧gi′′∣zizi′zi′′(mod8).(2)\begin{aligned} |G^\mathsf{T}\vec{z}| ={}& \sum_i |g^i|z_i - 2\sum_{i<i'} |g^i \wedge g^{i'}|z_i z_{i'} \\ &+ 4\sum_{i<i'<i''} |g^i \wedge g^{i'} \wedge g^{i''}|z_i z_{i'}z_{i''}\pmod8. \tag*{(2)} \end{aligned}

where ∣gi∧gi′∣=∑jgjigji′|g^i \wedge g^{i'}| = \sum_j g^i_jg^{i'}_j is the overlap (shared support) of two rows, and similarly for triple overlaps1.

For a target diagonal gate UF=∑x⃗ωF(x⃗)∣x⃗⟩⟨x⃗∣U_F = \sum_{\vec{x}}\omega^{F(\vec{x})}|\vec{x}\rangle\langle\vec{x}|, we consider the case where a diagonal Clifford correction CC, applied after the transversal TT rotations, i.e. CT⊗nCT^{\otimes n}, realizes logical UFU_F on the codespace. For UF=CCZU_F = \mathrm{CCZ} on k=3k = 3 logical qubits the target is FCCZ(x⃗)=4x1x2x3F_{\mathrm{CCZ}}(\vec{x}) = 4x_1x_2x_3, and the constraint reads

∣KTx⃗+STy⃗∣+2h(KTx⃗+STy⃗)≡4x1x2x3(mod8)∀ x⃗,y⃗,(3)|K^\mathsf{T}\vec{x} + S^\mathsf{T}\vec{y}| + 2h(K^\mathsf{T}\vec{x} + S^\mathsf{T}\vec{y}) \equiv4x_1x_2x_3 \pmod8 \qquad\forall\ \vec{x},\vec{y}, \tag*{(3)}

where the function hh collects the phases contributed by CC: a linear term for each SS-gate and a quadratic term for each CZCZ-gate. hh is explicitly defined in Eq. (13). Two regimes are considered:

  • quasi-transversal CCZ [6]: CC is any diagonal Clifford, so the correction may still contain entangling CZCZ gates on pairs of qubits and gates acting on the logical qubits.

  • single-qubit transversal CCZ (Definition 3.4) is implemented by a physical T/T†T/T^\dagger pattern. Equivalently, apply T⊗nT^{\otimes n} followed by S†S^\dagger on selected qubits, using TS†=T†TS^\dagger= T^\dagger.

Equation (3) fixes the undetermined coefficients of (2), one monomial of degree ≤3\le3 at a time, yielding nine conditions on the row overlaps of GG, i.e. the Campbell–Howard (CH) conditions [6]. The conditions are necessary as well as sufficient (Theorem 3.3). Table 1 lists all nine conditions.

References

  1. [1]Hugo Jacinto, Xavier Valcarce, Victor Barizien, Élie Gouzien, and Nicolas Sangouard. Exploring the landscape of compact magic-state distillation factories, 2026. arXiv:2606.07734.arxiv.org/abs/2606.07734
  2. [2]Adam Wills, Shubham P. Jain, and Shraddha Singh. Classification of generalised triorthogonal codes through length 54, 2026. arXiv:2609.30860.arxiv.org/abs/2609.30860
  3. [3]Sergey Bravyi and Jeongwan Haah. Magic state distillation with low overhead. Physical Review A, 86(5):052329, November 2012. ISSN 1050-2947, 1094-1622. DOI: 10.1103/PhysRevA.86.052329.DOI
  4. [4]Craig Gidney, Noah Shutty, and Cody Jones. Magic state cultivation: Growing T states as cheap as CNOT gates, September 2024. arXiv:2409.17595.arxiv.org/abs/2409.17595
  5. [5]Héctor Bombín, Mihir Pant, Sam Roberts, and Karthik I. Seetharam. Fault-Tolerant Postselection for Low-Overhead Magic State Preparation. PRX Quantum, 5(1):010302, January 2024. ISSN 2691-3399. DOI: 10.1103/PRXQuantum.5.010302.DOI
  6. [6]Earl T. Campbell and Mark Howard. Unified framework for magic state distillation and multiqubit gate synthesis with reduced resource cost. Physical Review A, 95(2):022316, February 2017. ISSN 2469-9926, 2469-9934. DOI: 10.1103/PhysRevA.95.022316.DOI
  7. [7]Jeongwan Haah and Matthew B. Hastings. Codes and protocols for distilling T, controlled-S, and Toffoli gates. Quantum, 2:71, 2018. DOI: 10.22331/q-2018-06-07-71.
  8. [8]Alexander Barg, Nolan J. Coble, Dominik Hangleiter, and Christopher Kang. Geometric structure and transversal logic of quantum Reed-Muller codes. IEEE Transactions on Information Theory, 72(1):415–436, January 2026. DOI: 10.1109/TIT.2025.3592631.DOI
  9. [9]Héctor Bombín. Gauge color codes: Optimal transversal gates and gauge fixing in topological stabilizer codes. New Journal of Physics, 17(8):083002, 2015. DOI: 10.1088/1367-2630/17/8/083002.DOI
  10. [10]Benjamin J. Brown. Color code with a logical control-S gate using transversal T rotations. Physical Review Letters, 135(7):070602, August 2025. ISSN 0031-9007, 1079-7114. DOI: 10.1103/lwxd-fdlb.DOI
  11. [11]Eduardo Camps-Moreno, Hiram H. López, Gretchen L. Matthews, Diego Ruano, Rodrigo San-José, and Ivan Supronov. An algebraic characterization of binary CSS-T codes and cyclic CSS-T codes for quantum fault tolerance. Quantum Information Processing, 23(6):230, 2024. DOI: 10.1007/s11128-024-04427-5.
  12. [12]Jin Ming Koh, Anqi Gong, Andrei C. Diaconu, Daniel Bochen Tan, Alexandra A. Geim, Michael J. Gullans, Norman Y. Yao, Mikhail D. Lukin, and Shayan Majidy. Entangling logical qubits without physical operations, 2026. arXiv:2601.20927.arxiv.org/abs/2601.20927
  13. [13]Jingzhen Hu, Qingzhong Liang, and Robert Calderbank. Designing the Quantum Channels Induced by Diagonal Gates. Quantum, 6:802, September 2022. DOI: 10.22331/q-2022-09-08-802.DOI
  14. [14]Narayana Rengaswamy, Robert Calderbank, Michael Newman, and Henry D. Pfister. On Optimality of CSS Codes for Transversal T. IEEE Journal on Selected Areas in Information Theory, 1(2):499–514, August 2020. DOI: 10.1109/JSAIT.2020.3012914.DOI
  15. [15]Jingzhen Hu, Qingzhong Liang, and Robert Calderbank. Climbing the Diagonal Clifford Hierarchy. Academia Quantum, 2(4), October 2025. DOI: 10.20935/AcadQuantum7957.arxiv.org/abs/2110.11923
  16. [16]Jingzhen Hu, Qingzhong Liang, and Robert Calderbank. Divisible Codes for Quantum Computation, April 2022. arXiv:2204.13176.arxiv.org/abs/2204.13176
  17. [17]Anqi Gong, Christopher A. Pattison, Patrick Rall, and Adam Wills. Magic state distillation via codes over binary extension fields, 2026. arXiv:2608.09727.arxiv.org/abs/2608.09727
  18. [18]Shubham P. Jain and Victor V. Albert. Transversal Clifford and T-gate codes of short length and high distance. IEEE Journal on Selected Areas in Information Theory, 6:127–137, 2025. ISSN 2641-8770. DOI: 10.1109/JSAIT.2025.3570832.DOI
  19. [19]Koichi Betsumiya and Akihiro Munemasa. On triply even binary codes. Journal of the London Mathematical Society, 86(1):1–16, 2012. DOI: 10.1112/jlms/jdr054.
  20. [20]Sepehr Nezami and Jeongwan Haah. Classification of small trichogonal codes. Physical Review A, 106(1):012437, July 2022. DOI: 10.1103/PhysRevA.106.012437.DOI
  21. [21]E. F. Assmus, Jr. and J. D. Key. Polynomial codes and finite geometries. In V. S. Pless and W. C. Huffman, editors, Handbook of Coding Theory, volume 2, chapter 16, pages 1269–1343. Elsevier, 1998.
  22. [22]Salah A. Aly. A class of quantum LDPC codes constructed from finite geometries. In IEEE Global Telecommunications Conference (GLOBECOM), pages 1–5, 2008. DOI: 10.1109/GLOCOM.2008.ECP.217. arXiv:0712.4115.DOI
  23. [23]Ben DalfAvero, William M. Watkins, Margarite L. LaBorde, Vincent Russo, Ethan Egger, Gregory Quiroz, and Ryan LaRose. Satisfying quantum codes: Physics-informed and hardware-aware code design with SAT solvers, 2026. arXiv:2608.23460.
  24. [24]Sascha Kurz. Divisible codes. DOI: 10.15495/EPub UBT 00008789, 2025. Revised edition, December 2025.
  25. [25]Ivan N. Landjev. Linear codes over finite fields and finite projective geometries. Discrete Mathematics, 213(1–3):211–244, 2000. DOI: 10.1016/S0012-365X(99)00183-1.DOI
  26. [26]A. R. Calderbank and W. M. Kantor. The geometry of two-weight codes. Bulletin of the London Mathematical Society, 18(2):97–122, 1986. DOI: 10.1112/blms/18.2.97.DOI
  27. [27]A. E. Brouwer. Two-weight codes. In W. C. Huffman, J.-L. Kim, and P. Solé, editors, Concise Encyclopedia of Coding Theory, chapter 19, pages 449–462. CRC Press, 2021.
  28. [28]Daniel Heinlein, Thomas Honold, Michael Kiermaier, Sascha Kurz, and Alfred Wassermann. Projective divisible binary codes. In The Tenth International Workshop on Coding and Cryptography (WCC 2017), 2017. arXiv:1703.08291.arxiv.org/abs/1703.08291
  29. [29]Stergios Koutsoumpas, Darren Banfield, and Alastair Kay. The smallest code with transversal T, 2022. arXiv:2210.14066.
  30. [30]Florence J. MacWilliams and Neil J. A. Sloane. The Theory of Error-Correcting Codes. North-Holland, 1977. DOI: 10.1016/S0924-6509(08)X7030-8.DOI
  31. [31]N. J. A. Sloane and E. R. Berlekamp. Weight enumerator for second-order Reed–Muller codes. IEEE Transactions on Information Theory, 16(6):745–751, 1970. DOI: 10.1109/TIT.1970.1054553.DOI
  32. [32]Tadao Kasami and Nobuki Tokura. On the weight structure of Reed–Muller codes. IEEE Transactions on Information Theory, 16(6):752–759, 1970. DOI: 10.1109/TIT.1970.1054545.
  33. [33]Tadao Kasami, Nobuki Tokura, and Saburo Azumi. On the weight enumeration of weights less than 2.5d of Reed–Muller codes. Information and Control, 30(4):380–395, 1976. DOI: 10.1016/S0019-9958(76)90355-7.
  34. [34]Claude Carlet. Boolean Functions for Cryptography and Coding Theory. Cambridge University Press, 2021. DOI: 10.1017/9781108606806.DOI
  35. [35]E. F. Assmus, Jr. and J. D. Key. Designs and Their Codes. Number 103 in Cambridge Tracts in Mathematics. Cambridge University Press, 1992. DOI: 10.1017/CBO97811316529836.DOI
  36. [36]W. Cary Huffman and Vera Pless. Fundamentals of Error-Correcting Codes. Cambridge University Press, 2003. DOI: 10.1017/CBO9780511807077.DOI
  37. [37]Brendan D. McKay and Adolfo Piperno. Practical graph isomorphism, II. Journal of Symbolic Computation, 60:94–112, 2014. DOI: 10.1016/j.jsc.2013.09.003.DOI
  38. [38]Arjeh M. Cohen and Aloysius G. Helminck. Trilinear alternating forms on a vector space of dimension 7. Communications in Algebra, 16(1):1–25, 1988. DOI: 10.1080/00927878808823558.DOI
  39. [39]An Braeken, Yuri Borsisov, Svyeta Nikova, and Bart Preneel. Classification of Boolean functions of 6 variables or less with respect to cryptographic properties. Cryptology ePrint Archive, Report 2004/248, 2004. URL https://eprint.iacr.org/2004/248. Conference version: Automata, Languages and Programming, LNCS 3580, pp. 324–334 (2005), DOI: 10.1007/11523468^27.

Paper details

vlnc:W_rgq3jyrp
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Physics and Astronomy

AI assistants

View statement
Looking for related papers…
Contents