- Open Access
Planar Fault-Tolerant Circuits for Non-Clifford Gates on the 2D Color Code
PRX Quantum 7, 020367 – Published 23 June, 2026
DOI: https://doi.org/10.1103/p7c9-x1m9
Abstract
We introduce a family of scalable planar fault-tolerant circuits that implement logical non-Clifford operations on a 2D color code, such as a logical gate or a logical non-Pauli measurement that prepares a magic state. The circuits are relatively simple, consisting only of physical gates, gates, and few-qubit measurements. They can be implemented with an array of qubits on a 2D chip with nearest-neighbor couplings and no wire crossings. The construction is based on a spacetime path integral representation of a non-Abelian 2+1D topological phase, which is related to the 3D color code. We turn the path integral into a circuit by expressing it as a spacetime tensor network and then traversing it in some chosen time direction. We describe in detail how fault tolerance is achieved using a “just-in-time” decoding strategy, for which we repurpose and extend state-of-the-art color-code matching decoders.
Physics Subject Headings (PhySH)
Popular Summary
Fault-tolerant quantum computing with 2D topological codes is attractive because it matches planar hardware, but universal computation still hinges on implementing at least one non-Clifford ingredient (notably the T gate or T-magic-state primitives) in a way that does not dominate resources. We present a family of fully planar, geometrically local fault-tolerant protocols (“twisted color circuits”) that realize such non-Clifford logical operations while staying within a 2D nearest-neighbor layout and using only standard components—single-qubit T gates, CX gates, and few-qubit Pauli measurements—so they are directly compatible with chip-scale architectures. Our construction starts from a spacetime path-integral description related to the 3D color code, translates it into a ZX tensor-network form, and then compiles it into explicit circuits with well-defined boundaries and interfaces back to the 2D color code. Because T gates make “decode-at-the-end” insufficient, we incorporate a just-in-time decoding approach that continually processes syndromes during execution, leveraging matching-based decoders and casting the core subroutines as efficient hypergraph-matching problems (with reductions to coupled cellular matching where possible). We also provide a supporting mathematical framework (color cohomology) that clarifies defect/syndrome constraints, boundary types, and the relation of the underlying spacetime model to a known non-Abelian topological gauge theory, which in turn guides both circuit design and decoding.
Article Text
References (107)
- A. Y. Kitaev, Fault-tolerant quantum computation by anyons, Ann. Phys. 303, 2 (2003).
- E. Dennis, A. Kitaev, A. Landahl, and J. Preskill, Topological quantum memory, J. Math. Phys. 43, 4452 (2002).
- S. B. Bravyi and A. Y. Kitaev, Quantum codes on a lattice with boundary, arXiv:quant-ph/9811052.
- H. Bombin and M. A. Martin-Delgado, Topological quantum distillation, Phys. Rev. Lett. 97, 180501 (2006).
- N. Lacroix et al., Scaling and logic in the color code on a superconducting quantum processor, Nature 645, 614 (2025).
- S. Krinner, N. Lacroix, A. Remm, A. Di Paolo, E. Genois, C. Leroux, C. Hellings, S. Lazar, F. Swiadek, J. Herrmann, G. J. Norris, C. K. Andersen, M. Müller, A. Blais, C. Eichler, and A. Wallraff, Realizing repeated quantum error correction in a distance-three surface code, Nature 605, 669 (2022).
- R. Acharya et al., Quantum error correction below the surface code threshold, Nature 638, 920 (2025).
- D. Horsman, A. G. Fowler, S. Devitt, and R. V. Meter, Surface code quantum computing by lattice surgery, New J. Phys. 14, 123011 (2012).
- D. Litinski, A game of surface codes: Large-scale quantum computing with lattice surgery, Quantum 3, 128 (2019).
- A. J. Landahl and C. Ryan-Anderson, Quantum computing by color-code lattice surgery, arXiv:1407.5103.
- F. Thomsen, M. S. Kesselring, S. D. Bartlett, and B. J. Brown, Low-overhead quantum computing with the color code, Phys. Rev. Res. 6, 043125 (2024).
- C. Ryan-Anderson et al., Implementing fault-tolerant entangling gates on the five-qubit code and the color code, arXiv:2208.01863.
- D. Bluvstein et al., Logical quantum processor based on reconfigurable atom arrays, Nature 626, 58 (2024).
- S. Bravyi and A. Kitaev, Universal quantum computation with ideal Clifford gates and noisy ancillas, Phys. Rev. A 71, 022316 (2005).
- S. Bravyi and J. Haah, Magic state distillation with low overhead, Phys. Rev. A 86, 052329 (2012).
- D. Litinski, Magic state distillation: Not as costly as you think, Quantum 3, 205 (2019).
- M. Davydova, A. Bauer, J. C. Magdalena de la Fuente, M. Webster, D. J. Williamson, and B. J. Brown, Universal fault tolerant quantum computing in 2D without getting tied in knots, arXiv:2503.15751.
- H. Bombin, Dimensional jump in quantum error correction, New J. Phys. 18, 043038 (2016).
- M. E. Beverland, A. Kubica, and K. M. Svore, The cost of universality: A comparative study of the overhead of state distillation and code switching with color codes, PRX Quantum 2, 020341 (2021).
- H. Bombin and M. A. Martin-Delgado, Topological computation without braiding, Phys. Rev. Lett. 98, 160502 (2007).
- M. Vasmer and D. E. Browne, Three-dimensional surface codes: Transversal gates and fault-tolerant architectures, Phys. Rev. A 100, 012312 (2019).
- H. Bombin, 2D quantum computation with 3D topological codes, arXiv:1810.09571.
- B. J. Brown, A fault-tolerant non-Clifford gate for the surface code in two dimensions, Sci. Adv. 6, eaay4929 (2020).
- T. R. Scruby, D. E. Browne, P. Webster, and M. Vasmer, Numerical implementation of just-in-time decoding in novel lattice slices through the three-dimensional surface code, Quantum 6, 721 (2022).
- H. Bombin, D. Litinski, N. Nickerson, F. Pastawski, and S. Roberts, Unifying flavors of fault tolerance with the ZX calculus, Quantum 8, 1379 (2024).
- A. Townsend-Teague, J. M. de la Fuente, and M. Kesselring, Floquetifying the colour code, EPTCS 384, 265 (2023).
- A. Bauer, Topological error correcting processes from fixed-point path integrals, Quantum 8, 1288 (2024).
- A. Bauer, Low-overhead non-Clifford topological fault-tolerant circuits for all non-chiral Abelian topological phases, Quantum 9, 1673 (2025).
- A. Bauer, The Floquet code: A simple example for topological quantum computation in the path integral approach, Phys. Rev. A 111, 032413 (2025).
- A. Kubica and N. Delfosse, Efficient color code decoders in dimensions from toric code decoders, Quantum 7, 929 (2023).
- H. Bombin and M. A. Martin-Delgado, Exact topological quantum order in and beyond: Branyons and brane-net condensates, Phys. Rev. B 75, 075103 (2007).
- C. Gidney, A pair measurement surface code on pentagons, Quantum 7, 1156 (2023).
- A. Kissinger, Phase-free ZX diagrams are CSS codes (…or how to graphically grok the surface code), arXiv:2204.14038.
- J. C. Magdalena de la Fuente, J. Old, A. Townsend-Teague, M. Rispler, J. Eisert, and M. Müller, ruby code: Making a case for a three-colored graphical calculus for quantum error correction in spacetime, PRX Quantum 6, 010360 (2025).
- R. Raussendorf, J. Harrington, and K. Goyal, Topological fault-tolerance in cluster state quantum computation, New J. Phys. 9, 199 (2007).
- N. Nickerson and H. Bombín, Measurement based fault tolerance beyond foliation, arXiv:1810.09621.
- A 3D triangulation is a decomposition of a 3-manifold into tetrahedron volumes, which are glued at their triangle faces. A 3D cellulation is defined similarly, without requiring the volumes and faces to be tetrahedra and triangles.
- Wikipedia, Bitruncated cubic honeycomb, https://en.wikipedia.org/wiki/Bitruncated_cubic_honeycomb.
- B. Coecke and A. Kissinger, Picturing Quantum Processes: A First Course in Quantum Theory and Diagrammatic Reasoning (Cambridge University, Cambridge, 2017).
- J. van de Wetering, ZX-calculus for the working quantum computer scientist, arXiv:2012.13966.
- C. Chamberland and M. E. Beverland, Flag fault-tolerant error correction with arbitrary distance codes, Quantum 2, 53 (2018).
- J. C. Magdalena de la Fuente, Dynamical weight reduction of Pauli measurements, arXiv:2410.12527.
- B. Rodatz, B. Poór, and A. Kissinger, Floquetifying stabiliser codes with distance-preserving rewrites, arXiv:2410.17240.
- Alternatively, we could have chosen a unit cell spanned by , , and . In this case we would specify the circuit on a smaller patch of the spatial lattice but for 12 instead of 4 time steps.
- A fourth color boundary is completely analogous but not used in the protocol.
- One could derive these boundaries from analogous color boundaries of the 3D color code. Unfortunately, color boundaries are commonly defined along a surface inside the triangulation dual to the 3-colex, which cuts only through -colored edges of the primal 3-colex [31]. Our color boundaries are defined on an arbitrary surface inside the primal 3-colex, and the additional bonds at the red boundary edges would correspond to additional stabilizers at the boundary of the 3D color code. Reference [103] defines similar looking boundaries with stabilizers but still considers surfaces in the dual triangulation.
- This is different from the usual way of defining a color boundary along a path in the dual lattice that only cuts perpendicular through -colored edges. Such boundaries are usually placed along the “arm-chair” direction of the hexagonal lattice, which is rotated by relative to the zig-zag direction shown in Fig. 7.
- The logical action on will not be a gate, and the logical action of the protocol in Eq. (1) will be yet different, see Ref. [17]. We are not interested in the logical action of the protocol here, but use it as tool to derive the interface of the color path integral.
- More precisely, the 3D color code is equivalent to three copies of the 3D toric code, so maps to three separate string configurations as we show in Sec. 3. We will pretend that there is only one string configuration to simplify the following discussion.
- H. Bombin, Single-shot fault-tolerant quantum error correction, Phys. Rev. X 5, 031043 (2015).
- H. Bombin, Transversal gates and error propagation in 3D topological codes, arXiv:1810.09575.
- More precisely, there are three sorts of flux and charge strings each, and the charge strings of one sort can terminate on the residual flux strings of the other two sorts [51].
- N. Delfosse, Decoding color codes by projection onto surface codes, Phys. Rev. A 89, 012317 (2014).
- Usually, the cochains are defined with coefficients in the Pontryagin dual group of the chains. For us, the coefficient group is which can be identified with its Pontryagin dual via the pairing (or “Fourier transform” or “Hadamard gate”) , so we identify the cochains with chains. If we sometimes call a chain “cochain,” this is only to signal that we intend to apply the coboundary operator to it instead of the boundary operator .
- We could define homology to be the cohomology of the Pontryagin dual chain complex consisting of and , then we simply have . Since we define it via the transpose matrices, there is a canonical pairing between and .
- More precisely, is the number of times is contained in , but this is only relevant for very irregular lattices or very small lattices with periodic boundary conditions.
- Note that a chain complex is called exact if every (co)cycle is a (co)boundary, that is, if the (co)homology is trivial. Here we demand that this is true only for locally supported (co)cycles, such that the (co)homology can be nontrivial, but can only depend on the global properties (usually, the topology) of the lattice.
- V. G. Turaev and O. Y. Viro, State sum invariants of 3-manifolds and quantum 6j-symbols, Topology 31, 865 (1992).
- J. W. Barrett and B. W. Westbury, Invariants of piecewise-linear 3-manifolds, Trans. Amer. Math. Soc. 348, 3997 (1996).
- M. Fukuma, S. Hosono, and H. Kawai, Lattice topological field theory in two dimensions, Commun. Math. Phys. 161, 157 (1994).
- R. Dijkgraaf and E. Witten, Topological gauge theories and group cohomology, Commun. Math. Phys. 129, 393 (1990).
- L. Crane and D. N. Yetter, in Quantum Topology, edited by L. Kauffman and R. Baadhio (World Scientific, Singapore, 1993).
- A. Bauer, J. Eisert, and C. Wille, A unified diagrammatic approach to topological fixed point models, SciPost Phys. Core 5, 38 (2022).
- A. Bauer, Topological phases, fixed-point models, extended TQFT, and fault-tolerant quantum computation-tensors in spacetime, Ph.D. thesis, Freie Universität Berlin, https://refubium.fu-berlin.de/bitstream/handle/fub188/45937/Dissertation_Andreas_Bauer.pdf?sequence=4, 2023.
- If we divide the boundary into an input and an output component, the state can also be interpreted as a vectorized linear map from the input to the output vector space.
- Physically, our path integrals have the same qualitative properties as the imaginary-time evolution of a 2D Hamiltonian [63]. It should be noted though, that our path integrals are defined in discrete time, whereas the imaginary-time evolution is defined in continuous time. One could in principle obtain a path integral from an imaginary-time evolution by Trotterization, but our path integrals do not directly arise in this way.
- Note that topological phases can be defined directly on the level of path integrals: Two path integrals are in the same phase if they are related by a continuous deformation that does maintain a constant spectral gap of the transfer operator (corresponding to a 2D layer of the 3D path integral). We believe that the resulting classification of topological phases is closely related to that for lattice Hamiltonians.
- For usual examples, is very small, for example it might suffice if the interior and exterior are separated by at least one lattice edge.
- Here, we mean the connected correlator, .
- Since we sum over all boundary variables, evaluating the path integral with physical boundary yields again a number . We can also evaluate the path integral on a lattice whose boundary is divided into a physical-boundary part and a state-boundary part, yielding a state supported only on the state-boundary part. In this case, the state itself has a physical boundary, which is the region separating state and physical boundary in spacetime.
- M. D. W. Propitius, Topological interactions in broken gauge theories, Ph.D. thesis, University of Amsterdam, http://arxiv.org/abs/hep-th/9511195.
- N. E. Steenrod, Products of cocycles and extensions of mappings, Ann. Math. 48, 290 (1947).
- Y.-A. Chen and S. Tata, Higher cup products on hypercubic lattices: Application to lattice models of topological phases, J. Math. Phys. 64, 091902 (2023).
- If there is an edge with both and , it becomes ambiguous whether there is a red-green intersection at the edge center or not, which can be resolved by shifting the red and green edge centers with respect to another. However, this case does not appear when showing the equivalence of the color and twisted cellular path integrals.
- Alternatively, we can interpret as taking values in the Pontryagin dual . Then this weight is equal to the evaluation of on .
- S. Roberts and D. J. Williamson, 3-fermion topological quantum computation, PRX Quantum 5, 010315 (2024).
- D. Bulmash and M. Barkeshli, Absolute anomalies in symmetry-enriched topological states and exact constructions, Phys. Rev. Res. 2, 043033 (2020).
- M. McEwen, D. Bacon, and C. Gidney, Relaxing hardware requirements for surface code circuits using time-dynamics, Quantum 7, 1172 (2023).
- nCat Lab, Quadratic refinement, https://ncatlab.org/nlab/show/quadratic+refinement.
- In fact, a flux string corresponds to the direct sum of both non-Abelian flux anyons.
- If the fluxes in the model would correspond to Abelian worldlines, then the invariance in Eq. (95) can be rescued by adding further terms to the action as it was done in Ref. [28].
- K. Sahay and B. J. Brown, A decoder for the triangular color code by matching on a Möbius strip, PRX Quantum 3, 010310 (2022).
- C. Gidney and C. Jones, New circuits and an open source decoder for the color code, arXiv:2312.08813.
- M. B. Hastings and J. Haah, Dynamically generated logical qubits, Quantum 5, 564 (2021).
- A. Paetznick, C. Knapp, N. Delfosse, B. Bauer, J. Haah, M. B. Hastings, and M. P. da Silva, Performance of planar Floquet codes with Majorana-based qubits, PRX Quantum 4, 010310 (2023).
- Concretely, this cohomology looks like 3D color cohomology on spacetime volumes with twisted color circuits, and like 3D cellular cohomology on volumes with surface-code syndrome-extraction circuits. For volumes with 2D-color-code syndrome-extraction circuits, the cohomology theory corresponds to some sort of “skeletal color cohomology,” defined on a “skeletal 3-colex” which is dual to a cellulation with only triangle faces and 3-colorable vertices but arbitrary volumes. Transversal or gates on Abelian codes correspond to domain walls with an action in addition to the cohomology theory. In contrast to the action of a or gate, this action is quadratic and leads to a deterministic coupling between the constraints for and , which can be decoded globally using methods similar to these in Ref. [28].
- H. Bombín, C. Dawson, Y.-H. Liu, N. Nickerson, F. Pastawski, and S. Roberts, Modular decoding: Parallelizable real-time decoding for quantum computers, arXiv:2303.04846.
- This has the benefit that such magic states can be prepared offline, in parallel to the remaining logical circuit.
- J. Edmonds, Paths, trees, and flowers, Can. J. Math. 17, 449 (1965).
- O. Higgott and C. Gidney, Sparse blossom: Correcting a million errors per core second with minimum-weight matching, Quantum 9, 1600 (2025).
- We expect the twisted color circuits to have a somewhat lower threshold since the just-in-time decoded errors effectively lead to further errors.
- A. Kubica, M. E. Beverland, F. Brandao, J. Preskill, and K. M. Svore, Three-dimensional color code thresholds via statistical-mechanical mapping, Phys. Rev. Lett. 120, 180501 (2018).
- Note that this decoding has nothing to do with the flux decoding in the measurement-error-free case for the color code, whose maximum-likelihood threshold is much higher.
- B. J. Brown, N. H. Nickerson, and D. E. Browne, Fault-tolerant error correction with the gauge color code, Nat. Commun. 7, 12302 (2016).
- H. G. Katzgraber, H. Bombin, and M. A. Martin-Delgado, Error threshold for color codes and random three-body Ising models, Phys. Rev. Lett. 103, 090501 (2009).
- T. R. Scruby and Z. Cai, Fault-tolerant quantum computation without distillation on a 2D device, arXiv:2412.12529.
- N. P. Breuckmann, M. Davydova, J. N. Eberhardt, and N. Tantivasadakarn, Cups and gates I: Cohomology invariants and logical quantum operations, arXiv:2410.16250.
- G. Zhu, A topological theory for qLDPC: non-Clifford gates and magic state fountain on homological product codes with constant rate and beyond the distance barrier, arXiv:2501.19375.
- P.-S. Hsin, R. Kobayashi, and G. Zhu, Classifying logical gates in quantum codes via cohomology operations and symmetry, arXiv:2411.15848.
- T.-C. Lin, Transversal non-Clifford gates for quantum LDPC codes on sheaves, arXiv:2410.14631.
- M. S. Kesselring, F. Pastawski, J. Eisert, and B. J. Brown, The boundaries and twist defects of the color code and their applications to topological quantum computation, Quantum 2, 101 (2018).
- In the language of subsystem codes this is similar to gauge fixing an associated (spacetime) logical operator.
- Z. Song and G. Zhu, Magic boundaries of 3D color codes, Quantum 9, 1831 (2025).
- Even though the same chain complexes can be used to define boundaries for both the color path integral and the 3D color code, their classifications are fundamentally different: In general, the boundaries of the 3D color code correspond to the boundaries of a 4D path integral.
- Note that the cellular “twist” is described by a group 3-cocycle , and a boundary is described by a subgroup and a group 2-cocycle such that . So we only get boundaries if is a cohomologically trivial group 3-cocycle, which is the case for subgroups that do not contain . Note that for , there are two distinct group 2-cohomology classes corresponding to two distinct boundaries, but these distinct boundaries turn out to belong to the same boundary topological phase nonetheless [17].
- A. Bullivant, Y. Hu, and Y. Wan, Twisted quantum double model of topological orders with boundaries, Phys. Rev. B 96, 165138 (2017).
- J. C. Magdalena de la Fuente, J. Eisert, and A. Bauer, Bulk-to-boundary anyon fusion from microscopic models, J. Math. Phys. 64, 111904 (2023).
