Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Log inSign up
Challenges
Datasets
Workspaces
Papers
Discussions
Leaderboard
Blog
Job Board
Q3AS

© 2026 Aqora Quantum S.A.S.

TermsPrivacyLegal Notice

arXiv:1812.01238 · Quantum

Efficient magic state factories with a catalyzed | C C Z ⟩ to 2 | T ⟩ transformation

Craig Gidney, Austin G. Fowler

Published Apr 29, 2019• 152 citations
arXivHTMLPDF

Abstract

We present magic state factory constructions for producing | C C Z ⟩ states and | T ⟩ states. For the | C C Z ⟩ factory we apply the surface code lattice surgery construction techniques described in \cite{fowler2018} to the fault-tolerant Toffoli \cite{jones2013, eastin2013distilling}. The resulting factory has a footprint of 12 d × 6 d (where d is the code distance) and produces one | C C Z ⟩ every 5.5 d surface code cycles. Our | T ⟩ state factory uses the | C C Z ⟩ factory's output and a catalyst | T ⟩ state to exactly transform one | C C Z ⟩ state into two | T ⟩ states. It has a footprint 25 % smaller than the factory in \cite{fowler2018} but outputs | T ⟩ states twice as quickly. We show how to generalize the catalyzed transformation to arbitrary phase angles, and note that the case θ = 22.5 ∘ produces a particularly efficient circuit for producing | T ⟩ states. Compared to using the 12 d × 8 d × 6.5 d | T ⟩ factory of \cite{fowler2018}, our | C C Z ⟩ factory can quintuple the speed of algorithms that are dominated by the cost of applying Toffoli gates, including Shor's algorithm \cite{shor1994} and the chemistry algorithm of Babbush et al. \cite{babbush2018}. Assuming a physical gate error rate of 10 − 3 , our CCZ factory can produce ∼ 10 10 states on average before an error occurs. This is sufficient for classically intractable instantiations of the chemistry algorithm, but for more demanding algorithms such as Shor's algorithm the mean number of states until failure can be increased to ∼ 10 12

DOI
10.22331/q-2019-04-30-135

Related papers

Low Spatial Cost CCZ Magic State Factory

Sungyeon Kook, Yujin Kang, Ilkwon Sohn +1 more

We propose a design framework for reconstructing gate-based magic state distillation protocols as compact joint-measurement architectures implementable with the surface code. The goal is to reduce the surface-code resource cost of a magic state factory while preserving the logical function and error-detection structure of the distillation protocol. We construct a reduced architecture for implementing an eight-to-three CCZ distillation protocol using smaller surface-code patches. The proposed factory preserves the single-fault-detection property and the leading-order error suppression of the protocol, while producing CCZ magic states with lower spatial cost than the design of Gidney and Fowler. The proposed design perspective can also be applied to T-state factories and other multiqubit non-Clifford resource-state factories. Our approach provides a framework for extending the design space of surface-code magic state factories beyond a single CCZ layout optimization.

quant-pharXiv:2606.24170•Jun 24, 2026•0 citations

Logical CCZ state cultivation

Yuta Hirasaki, Jong Yeon Lee

Logical CCZ states enable Toffoli gates, a central building block of fault-tolerant quantum arithmetic. We introduce an end-to-end protocol for direct CCZ-state preparation on bivariate tricycle and bicycle (BT/BB) codes. Our factory combines the cup-product CCZ gates native to BT codes with two novel ingredients, both enabled by engineering the logical coupling between BT and BB codes through projection-preserving lifts. Index-2 lifted BB ancillas enable selective $Z$-basis initialization, allowing the native cup-product gates to directly prepare two disjoint logical CCZ states. The prepared CCZ states are faithfully transferred to index-3 lifted BB memories with high code distance. We use decoder-based postselection to obtain high-fidelity output states with low overhead. We perform exact simulations of our factory under a circuit-level noise model motivated by neutral-atom hardware, obtaining joint infidelities of $1.84\times10^{-5}$ at $21.94\%$ acceptance and $4.10\times10^{-7}$ at $8.89\%$ acceptance for single-qubit, CZ, and CCZ error rates of $0.01\%$, $0.1\%$, and $0.5\%$, respectively. At the output-infidelity target of our smallest factory, its estimated spacetime cost per CCZ state is lower than that of $T$-state cultivation followed by CCZ conversion, providing an efficient route to logical CCZ states for fault-tolerant quantum computation.

quant-pharXiv:2610.20591•Oct 15, 2026•0 citations

Efficient Magic State Factory Via Transversal Non-Clifford Gate

I-Chi Chen, Hrushikesh Pramod Patil, Huiyang Zhou +1 more

Magic-state preparation is a central component of fault-tolerant quantum computing. Recent theoretical and experimental successes in code-switch-based magic-state preparation have underscored the promise of these methods for quantum error correction. Similarly, magic-state cultivation has likewise been demonstrated in both numerical and experimental settings. However, a thorough comparison between magic-state cultivation and code-switch-based magic-state factories is still missing. In this work, we carry out end-to-end simulations of magic-state preparation using code switching and compare its resource requirements and performance against magic-state cultivation. As part of this analysis, we develop a lattice-surgery protocol for transfer between the doubled color code and the rotated surface code. We extend the complete code-switching protocol to the $d=5$ doubled color code and perform the corresponding end-to-end simulations. Finally, we propose two fault-tolerant magic-state preparation protocols that combine phase-kickback checks with a transversal non-Clifford gate.

quant-pharXiv:2606.16199•Jun 16, 2026•0 citations

Quantum computation with realistic magic-state factories

Joe O’Gorman, Earl T. Campbell

Leading approaches to fault-tolerant quantum computation dedicate a significant portion of the hardware to computational factories that churn out high-fidelity ancillas called magic states. Consequently, efficient and realistic factory design is of paramount importance. Here we present the most detailed resource assessment to date of magic-state factories within a surface code quantum computer, along the way introducing a number of techniques. We show that the block codes of Bravyi and Haah [Phys. Rev. A 86, 052329 (2012)] have been systematically undervalued; we track correlated errors both numerically and analytically, providing fidelity estimates without appeal to the union bound. We also introduce a subsystem code realization of these protocols with constant time and low ancilla cost. Additionally, we confirm that magic-state factories have space-time costs that scale as a constant factor of surface code costs. We find that the magic-state factory required for postclassical factoring can be as small as 6.3 million data qubits, ignoring ancilla qubits, assuming ${10}^{\ensuremath{-}4}$ error gates and the availability of long-range interactions.

arXiv:1605.07197•Physical Review A•Mar 31, 2017•158 citations

Symmetry and AI-assisted discovery of magic-state factories

Shubham P. Jain, Adam Wills, Shraddha Singh

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.

quant-pharXiv:2610.06535•Oct 6, 2026•0 citations

Recursive Magic State Distillation on the Surface Code

Jonathan E. Moussa

I reduce the cost to prepare magic states with lattice surgery operations on the surface code by using a recursive implementation of 15-to-1 magic state distillation. On a rotated surface code with distance $d$, $|T\rangle$ preparation requires a $d$-by-$3 d$ grid of data qubits for up to $15 d$ error correction cycles, and $|CCZ\rangle$ preparation requires a $3 d$-by-$2 d$ grid for up to $10.5 d$ cycles. However, a significantly lower physical error threshold than that of the underlying surface code is required to match the error probability of the output magic state with the logical error rate of the output surface code at large code distances.

quant-pharXiv:2603.05409•Mar 6, 2026•0 citations
We present magic state factory constructions for producing | C C Z ⟩ states and | T ⟩ states. For the | C C Z ⟩ factory we apply the surface code lattice surgery construction techniques described in \cite{fowler2018} to the fault-tolerant Toffoli \cite{jones2013, eastin2013distilling}. The resulting factory has a footprint of 12 d × 6 d (where d is the code distance) and produces one | C C Z ⟩ every 5.5 d surface code cycles. Our | T ⟩ state factory uses the | C C Z ⟩ factory's output and a catalyst | T ⟩ state to exactly transform one | C C Z ⟩ state into two | T ⟩ states. It has a footprint 25 % smaller than the factory in \cite{fowler2018} but outputs | T ⟩ states twice as quickly. We show how to generalize the catalyzed transformation to arbitrary phase angles, and note that the case θ = 22.5 ∘ produces a particularly efficient circuit for producing | T ⟩ states. Compared to using the 12 d × 8 d × 6.5 d | T ⟩ factory of \cite{fowler2018}, our | C C Z ⟩ factory can quintuple the speed of algorithms that are dominated by the cost of applying Toffoli gates, including Shor's algorithm \cite{shor1994} and the chemistry algorithm of Babbush et al. \cite{babbush2018}. Assuming a physical gate error rate of 10 − 3 , our CCZ factory can produce ∼ 10 10 states on average before an error occurs. This is sufficient for classically intractable instantiations of the chemistry algorithm, but for more demanding algorithms such as Shor's algorithm the mean number of states until failure can be increased to ∼ 10 12
We propose a design framework for reconstructing gate-based magic state distillation protocols as compact joint-measurement architectures implementable with the surface code. The goal is to reduce the surface-code resource cost of a magic state factory while preserving the logical function and error-detection structure of the distillation protocol. We construct a reduced architecture for implementing an eight-to-three CCZ distillation protocol using smaller surface-code patches. The proposed factory preserves the single-fault-detection property and the leading-order error suppression of the protocol, while producing CCZ magic states with lower spatial cost than the design of Gidney and Fowler. The proposed design perspective can also be applied to T-state factories and other multiqubit non-Clifford resource-state factories. Our approach provides a framework for extending the design space of surface-code magic state factories beyond a single CCZ layout optimization.
Logical CCZ states enable Toffoli gates, a central building block of fault-tolerant quantum arithmetic. We introduce an end-to-end protocol for direct CCZ-state preparation on bivariate tricycle and bicycle (BT/BB) codes. Our factory combines the cup-product CCZ gates native to BT codes with two novel ingredients, both enabled by engineering the logical coupling between BT and BB codes through projection-preserving lifts. Index-2 lifted BB ancillas enable selective ZZZ-basis initialization, allowing the native cup-product gates to directly prepare two disjoint logical CCZ states. The prepared CCZ states are faithfully transferred to index-3 lifted BB memories with high code distance. We use decoder-based postselection to obtain high-fidelity output states with low overhead. We perform exact simulations of our factory under a circuit-level noise model motivated by neutral-atom hardware, obtaining joint infidelities of 1.84×10−51.84\times10^{-5}1.84×10−5 at 21.94%21.94\%21.94% acceptance and 4.10×10−74.10\times10^{-7}4.10×10−7 at 8.89%8.89\%8.89% acceptance for single-qubit, CZ, and CCZ error rates of 0.01%0.01\%0.01%, 0.1%0.1\%0.1%, and 0.5%0.5\%0.5%, respectively. At the output-infidelity target of our smallest factory, its estimated spacetime cost per CCZ state is lower than that of TTT-state cultivation followed by CCZ conversion, providing an efficient route to logical CCZ states for fault-tolerant quantum computation.
Magic-state preparation is a central component of fault-tolerant quantum computing. Recent theoretical and experimental successes in code-switch-based magic-state preparation have underscored the promise of these methods for quantum error correction. Similarly, magic-state cultivation has likewise been demonstrated in both numerical and experimental settings. However, a thorough comparison between magic-state cultivation and code-switch-based magic-state factories is still missing. In this work, we carry out end-to-end simulations of magic-state preparation using code switching and compare its resource requirements and performance against magic-state cultivation. As part of this analysis, we develop a lattice-surgery protocol for transfer between the doubled color code and the rotated surface code. We extend the complete code-switching protocol to the d=5d=5d=5 doubled color code and perform the corresponding end-to-end simulations. Finally, we propose two fault-tolerant magic-state preparation protocols that combine phase-kickback checks with a transversal non-Clifford gate.
Leading approaches to fault-tolerant quantum computation dedicate a significant portion of the hardware to computational factories that churn out high-fidelity ancillas called magic states. Consequently, efficient and realistic factory design is of paramount importance. Here we present the most detailed resource assessment to date of magic-state factories within a surface code quantum computer, along the way introducing a number of techniques. We show that the block codes of Bravyi and Haah [Phys. Rev. A 86, 052329 (2012)] have been systematically undervalued; we track correlated errors both numerically and analytically, providing fidelity estimates without appeal to the union bound. We also introduce a subsystem code realization of these protocols with constant time and low ancilla cost. Additionally, we confirm that magic-state factories have space-time costs that scale as a constant factor of surface code costs. We find that the magic-state factory required for postclassical factoring can be as small as 6.3 million data qubits, ignoring ancilla qubits, assuming ${10}^{\ensuremath{-}4}$ error gates and the availability of long-range interactions.
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γ= 1.589γ=1.589 and γ=1.057γ= 1.057γ=1.057. Our [[1715, 287, 6]] factory, with γ=0.998γ= 0.998γ=0.998, is the smallest known pure-T factory with γ<1γ< 1γ<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.
I reduce the cost to prepare magic states with lattice surgery operations on the surface code by using a recursive implementation of 15-to-1 magic state distillation. On a rotated surface code with distance ddd, ∣T⟩|T\rangle∣T⟩ preparation requires a ddd-by-3d3 d3d grid of data qubits for up to 15d15 d15d error correction cycles, and ∣CCZ⟩|CCZ\rangle∣CCZ⟩ preparation requires a 3d3 d3d-by-2d2 d2d grid for up to 10.5d10.5 d10.5d cycles. However, a significantly lower physical error threshold than that of the underlying surface code is required to match the error probability of the output magic state with the logical error rate of the output surface code at large code distances.