Producing high-fidelity magic states using the smallest possible amount of physical qubits and operations stands as a very important challenge to achieve fault-tolerant quantum computation at scale. Besides emerging proposals for alternative methods such as cultivation, magic state distillation remains essential for achieving very low error rates. Known distillation protocols are usually built through quantum codes derived from triorthogonal matrices. Here, exploiting the specific noise structure present in magic state distillation protocols, we show that classical error-correcting codes offer a simpler framework for deriving these protocols. This formulation is particularly well suited to systematic numerical and analytical studies of distillation protocols involving a fixed number of qubits. Specifically, we use a SAT solver to derive a series of no-go theorems that relate key figures of merit, including the number of qubits, the protocol depth, the factory distance, and the prefactor in the output error rate. For instance, we prove that any $T$-to-$T$ state distillation protocol using fewer than eight qubits can detect at most three errors, while any $T$-to-$\mathrm{CC}Z$ state distillation protocol using fewer than eight qubits can detect at most two errors. Our results also include new distillation protocols with the smallest number of qubits for a given distance in the literature, namely distance 4 and 5 $T$-to-$T$ state protocols supported on 10 and 11 qubits, as well as distance 3 and 4 $T$-to-$\mathrm{CC}Z$ state distillation protocols supported on 9 and 10 qubits.
Producing high-fidelity magic states using the smallest possible amount of physical qubits and operations stands as a very important challenge to achieve fault-tolerant quantum computation at scale. Besides emerging proposals for alternative methods such as cultivation, magic state distillation remains essential for achieving very low error rates. Known distillation protocols are usually built through quantum codes derived from triorthogonal matrices. Here, exploiting the specific noise structure present in magic state distillation protocols, we show that classical error-correcting codes offer a simpler framework for deriving these protocols. This formulation is particularly well suited to systematic numerical and analytical studies of distillation protocols involving a fixed number of qubits. Specifically, we use a SAT solver to derive a series of no-go theorems that relate key figures of merit, including the number of qubits, the protocol depth, the factory distance, and the prefactor in the output error rate. For instance, we prove that any T-to-T state distillation protocol using fewer than eight qubits can detect at most three errors, while any T-to-CCZ state distillation protocol using fewer than eight qubits can detect at most two errors. Our results also include new distillation protocols with the smallest number of qubits for a given distance in the literature, namely distance 4 and 5 T-to-T state protocols supported on 10 and 11 qubits, as well as distance 3 and 4 T-to-CCZ state distillation protocols supported on 9 and 10 qubits.
In order to circumvent that no universal set of gates can be achieved on a given quantum error-correcting codes, additional gates can be performed through magic state injection. This however requires to have access to high fidelity magic state, which can be obtained by the distillation of low quality states to fewer higher quality ones. In this paper, we provide a family of distillation protocols able to produce diagonal states at every level of the Clifford hierarchy. This family is obtained recursively using code doubling techniques and leveraging qubit recycling, the fact that some idle qubits of the protocols can be measured and re-used. At a given level of the Clifford hierarchy, we show that the protocols we derive can be performed at arbitrary high distance on a fix number of logical qubits. This family recovers many known efficient protocols, and uncovers new ones, such as a 111→1 protocol for ∣T⟩ state distillation at distance 7, which are the most compact in term of volume. Finally, we discuss possible extension of this framework for distillation protocols producing more than one output state.
Zero-level CCZ Distillation
Magic state distillation is a key component of fault-tolerant quantum computation, as it enables the implementation of non-Clifford gates such as the T gate and the CCZ gate via gate teleportation. However, conventional distillation protocols require a large number of logical qubits and introduce substantial spatial and temporal overhead, posing a significant bottleneck for scalable fault-tolerant quantum computation. In this work, we propose a zero-level distillation protocol that efficiently generates a high-fidelity logical CCZ magic state using only physical qubits on a two-dimensional square lattice with nearest-neighbor interactions. Our method leverages the transversal T/T† operation of the [[8,3,2]] code to fault-tolerantly encode the state CCZ∣+++⟩, which is subsequently teleported to three surface-code logical qubits via lattice surgery. To enable teleportation between codes with different distances, we introduce adaptively initialized teleportation (AIT), a tailored initialization procedure for the surface code. Numerical simulations demonstrate that the logical error rate scales as pL≃300×p2 with respect to the physical error rate p. For example, the proposed method improves the logical error rate by approximately one and two orders of magnitude at p=10−3 and p=10−4, respectively, compared to conventional seven-T-gate approaches. The distillation circuit requires only 22 physical qubits, 3 logical qubits, and a circuit depth of 24, reducing the space-time overhead by a factor of approximately 5-10 compared to previous methods. This result highlights the practicality of CCZ-state distillation in early fault-tolerant quantum computation and offers a new direction toward resource-efficient physical-level magic state distillation beyond conventional T-state generation.
Magic state distillation is a widely considered primitive in fault-tolerant quantum computation for the preparation of high-fidelity non-Clifford resources. The most commonly considered class of such protocols are generalised triorthogonal codes; these distil n noisy input T states into purified third-level diagonal magic states. Extensive prior work has searched this space of protocols, often using heuristic methods that do not guarantee optimality. Existing classification work is limited to protocols distilling k output T states with n+k≤38 (Nezami and Haah, Phys. Rev. A 106, 012437 (2022)). In this work, we significantly expand this classification to all protocols with lengths n≤54. We restrict to distance d≥3 to keep the classification to a sensible size, and because efficient searches are well understood at distance 2 (Singh et al., arXiv:2606.28518). Moreover, our results are complementary to synthillation (Campbell and Howard, Phys. Rev. A 95, 022316 (2017)), which can distil third-level states from T states, but only at distance 2. Under optimality in terms of input count, space footprint, and distance for a given output, we find 74 optimal generalised triorthogonal protocols in our range, 65 of which are new to the literature. To achieve our classification, we extend the classification of unital triorthogonal spaces of Nezami and Haah from length 38 to 54 using a directional derivative method. Using these as the stabiliser spaces, we add logical rows that satisfy the triorthogonality constraints to create full protocols.
Fault-tolerant quantum computation architectures are frequently bottlenecked by the overhead of producing high-fidelity magic states. In this work, we use algebraic geometric techniques to construct codes over binary extension fields F2s, thus discovering new protocols for the distillation of qubit magic states, where our focus is on the regime of practical qubit-based quantum computing architectures. To do this, we show that multi-qubit gates of interest such as CS, CCZ, and TOF#=CCZ123CCZ345, can be packaged into simple gates over the larger fields, and we derive simple algebraic conditions in the extension fields allowing the distillation of these gates. Because they are derived from Galois qudits, the corresponding qubits codes naturally handle the correlated errors present on such multi-qubit states. Moreover, the protocols we discover are extremely compact; for example, we show that 4 CS states can be distilled to 1 CS state at distance 2, using only 4 logical qubits. For a case study, we consider the distillation of CS and CCZ states from injected T and CS states. When optimized for magic state production per unit time, or logical spacetime volume, we find that our protocols outperform the state-of-the-art in almost every situation, both at input error rates 10−3 (direct injection), and 10−6 (allowing some cultivation pre-injection).
Magic state distillation is a crucial yet resource-intensive process in fault-tolerant quantum computation. The protocol's overhead, defined as the number of input magic states required per output magic state with an error rate below ε, typically grows as O(logγ(1/ε)). Achieving smaller overheads, i.e., smaller exponents γ, is highly desirable; however, all existing protocols require polylogarithmically growing overheads with some γ>0, and identifying the smallest achievable exponent γ for distilling magic states of qubits has remained challenging. To address this issue, we develop magic state distillation protocols for qubits with efficient, polynomial-time decoding that achieve an O(1) overhead, meaning the optimal exponent γ=0; this improves over the previous best of γ≈0.678 due to Hastings and Haah. In our construction, we employ algebraic geometry codes to explicitly present asymptotically good quantum codes for 210-dimensional qudits that support transversally implementable logical gates in the third level of the Clifford hierarchy. The use of asymptotically good codes with non-vanishing rate and relative distance leads to the constant overhead. These codes can be realised by representing each 210-dimensional qudit as a set of 10 qubits, using stabiliser operations on qubits. The 10-qubit magic states distilled with these codes can be converted to and from conventional magic states for the controlled-controlled-Z (CCZ) and T gates on qubits with only a constant overhead loss, making it possible to achieve constant-overhead distillation of such standard magic states for qubits. These results resolve the fundamental open problem in quantum information theory concerning the construction of magic state distillation protocols with the optimal exponent.
Magic-state distillation is a major resource cost in fault-tolerant quantum computing. The cost of a magic-state factory depends strongly on its failure rate, which grows with the number of input magic states. Although symmetry-restricted methods have recently made distance two searches tractable, distance three and above have remained elusive at moderate input counts. We develop symmetry- and AI-assisted methods to search this regime. We present a unified binary-matrix formulation encompassing both triorthogonal-code and direct circuit searches. We show that distance at least three is equivalent to nonzero, pairwise distinct syndromes, separating the choice of syndromes from the search for compatible output gates. We restrict the syndrome search using group symmetry and language-model agents, followed by deterministic solving and independent verification. Our searches yield 699 factory classes, including 564 new ones. These include factories for pure-T states and factories with entangled outputs comprising combinations of T, CS, and CCZ magic states. The pure-T factories [[63, 11, 3]] and [[850, 128, 6]] achieve the lowest overhead exponents we know among protocols with at most 100 and 1000 inputs, respectively, with γ=1.589 and γ=1.057. Our [[1715, 287, 6]] factory, with γ=0.998, is the smallest known pure-T factory with γ<1. We also provide a context directory of search briefs and campaign notes with which readers can train their own agents and tailor the search to their requirements. With these results, we begin constructing an active, open-source repository of magic-state distillation protocols for the quantum community, supplemented by our methods and data, for the practical fault-tolerant quantum computing regime.