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:2512.23799 · PRX Quantum

Efficient simulation of logical magic state preparation protocols

Samyak Surti, Lucas Daguerre, Isaac H. Kim

quant-phSubmitted Dec 29, 2025• Announced Dec 31, 2025• 1 citation• Revised May 25, 2026 (v2)
v1 · Dec 29, 2025v2 · May 25, 2026
arXivHTMLPDF

Abstract

Developing space- and time-efficient logical magic state preparation protocols will likely be an essential step towards building a large-scale fault-tolerant quantum computer. Motivated by this need, we introduce a scalable method for simulating logical magic state preparation protocols under the standard circuit-level noise model. When applied to protocols based on code switching, magic state cultivation, and magic state distillation, our method yields a complexity polynomial in (i) the number of qubits and (ii) the non-stabilizerness, e.g., stabilizer rank or Pauli rank, of the target encoded magic state. The efficiency of our simulation method is rooted in a curious fact: every circuit-level Pauli error in these protocols propagates to a Clifford error at the end. This property is satisfied by a large family of protocols, including those that repeatedly measure a transversal Clifford that squares to a Pauli. We provide a proof-of-principle numerical simulation that prepares a magic state using such logical Clifford measurements. Our work enables practical simulation of logical magic state preparation protocols without resorting to approximations or resource-intensive state-vector simulations.

Journal reference
PRX Quantum 7, 020329 (2026)
DOI
10.1103/fby6-xjbm
Comments
20 pages, 15 figures + appendices. v2: fixed typos, improved clarity of figures and expanded discussion

Related papers

Exact efficient simulation of noisy logical magic states using Clifford stabilizers

Yugo Takada, Stephen D. Bartlett, Dominic J. Williamson

The preparation of high-fidelity logical magic states is a crucial subroutine for universal fault-tolerant quantum computation (FTQC). Predicting the performance of FTQC and developing improved protocols rely on numerical methods to classically simulate logical magic state preparation in the presence of noise. Clifford logic on Pauli-stabilizer codes with circuit-level Pauli errors can be efficiently simulated using Pauli-stabilizer formalism, but the non-Clifford operations required to prepare logical magic states render generic simulation inefficient. We introduce Clifford-stabilizer simulation, an exact and efficient algorithm based on updating a Clifford-stabilizer group to simulate noisy preparation protocols for a broad class of logical magic states used to implement non-Clifford gates in the third level of the Clifford hierarchy under circuit-level Pauli errors. Clifford-stabilizer simulation applies to a range of operations that commonly appear in preparation protocols for such logical magic states, including Pauli-stabilizer measurements, logical Clifford measurements, and transversal non-Clifford gates. Our algorithm for Clifford-stabilizer simulation maps a non-Clifford circuit with sampled circuit-level Pauli errors to a Clifford circuit that exactly reproduces its measurement outcome distribution, achieving time and space complexities polynomial in relevant protocol parameters. We perform exact simulation of magic state cultivation up to fault distance 7 by Clifford-stabilizer simulation. Our method provides a route to perform exact benchmarking of large-scale logical magic state preparation protocols required for useful FTQC.

quant-pharXiv:2609.16929•Sep 16, 2026•0 citations

Polynomial-time simulation of non-Clifford quantum error correction

Serban Cercelescu, Mark Koch, Arthur Pesah

We show that every intermediate state of a broad class of non-Clifford quantum error-correction circuits is a third-order phase-polynomial state, even under stochastic Pauli noise. The class includes magic state distillation and cultivation, code switching and gauge fixing, transversal non-Clifford gates with syndrome extraction, and injection of diagonal magic states. Third-order phase-polynomial states strictly generalize stabilizer states, and we prove that they are exactly the stabilizer states of the diagonal-Clifford-and-Pauli (DCP) stabilizer formalism that we introduce. We characterize these states and show that their representations can be updated in polynomial time. This yields an exact polynomial-time simulation algorithm for these circuits and, more broadly, a framework for reasoning about their internal states and about magic states in general. We provide an open-source implementation, \texttt{merlin}, and benchmark it against existing non-Clifford simulators on distillation, cultivation, and code switching circuits. The benchmarks demonstrate improved runtime and memory scaling as the number of logical outputs grows in Bravyi-Haah distillation, and simulation of a code switching circuit beyond the reach of all other tested simulators.

quant-pharXiv:2610.06811•Oct 6, 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

Breaking even with magic: demonstration of a high-fidelity logical non-Clifford gate

Shival Dasu, Burton, Simon, Karl Mayer +7 more

Encoding quantum information to protect it from errors is essential for performing large-scale quantum computations. Performing a universal set of quantum gates on encoded states demands a potentially large resource overhead and minimizing this overhead is key for the practical development of large-scale fault-tolerant quantum computers. We propose and experimentally implement a magic-state preparation protocol to fault-tolerantly prepare a pair of logical magic states in a [[6,2,2]] quantum error-detecting code using only eight physical qubits. Implementing this protocol on H1-1, a 20 qubit trapped-ion quantum processor, we prepare magic states with experimental infidelity $7^{+3}_{-1}\times 10^{-5}$ with a $14.8^{+1}_{-1}\%$ discard rate and use these to perform a fault-tolerant non-Clifford gate, the controlled-Hadamard (CH), with logical infidelity $\leq 2.3^{+9}_{-9}\times 10^{-4}$. Notably, this significantly outperforms the unencoded physical CH infidelity of $10^{-3}$. Through circuit-level stabilizer simulations, we show that this protocol can be self-concatenated to produce extremely high-fidelity magic states with low space-time overhead in a [[36,4,4]] quantum error correcting code, with logical error rates of $6\times 10^{-10}$ ($5\times 10^{-14}$) at two-qubit error rate of $10^{-3}$ ($10^{-4}$) respectively.

arXiv:2506.14688•Jun 17, 2025•1 citation

Magic-Free Certification of Logical Error Rates in Universal Fault-Tolerant Circuits

Gebrat Porta-San Miguel, Shahram Panahiyan, Dieter Jaksch

As quantum hardware enters the fault-tolerant regime, algorithms are beginning to be executed on encoded qubits, yet scalable certification of how well they run remains an open problem. Here we introduce magic-free certification, a certification protocol for universal fault-tolerant circuits that consumes no magic, the resource that generally places them beyond efficient classical simulation and is by far the most expensive element of a fault-tolerant computation. The protocol is code- and decoder-agnostic, runs interleaved with the target circuit on the same device, and has a sample complexity that grows linearly with the number of logical qubits and non-Clifford gates while remaining decoupled from the logical error rate itself. Given a predefined error tolerance $p_L^*$, the protocol determines at a chosen confidence level whether the device executes the target circuit at a logical error rate below $p_L^*$. The method relies on trap circuits, copies of the target with every magic state replaced by a stabilizer state, whose outcomes are deterministic and which, being indistinguishable from the target to stochastic Pauli noise, fail at the same rate. We illustrate the protocol in Steane-code simulations of a magic state injection gadget and a quantum Fourier transform.

quant-pharXiv:2610.16401•Oct 13, 2026•0 citations

Constant-depth magic state cultivation with Clifford measurements by gauging

Bence Hetényi, Benjamin J. Brown, Dominic J. Williamson

Magic states are a scarce resource for two-dimensional qubit stabilizer codes. Magic state cultivation was recently proposed to reduce the cost of magic state preparation by measuring the transversal Clifford operator of the color code. Cultivation achieves $\sim 10^{-9}$ logical error rates for the $d=5$ color code, with substantially lower space-time overhead than magic state distillation. However, due to the $\mathcal{O}(d)$ depth of the Clifford measurement circuit, magic state cultivation becomes impractical for $d>5$. Here, we perform logical $XS^\dagger$ measurements on the color code by gauging a transversal Clifford gate, resulting in a constant-depth logical measurement circuit. We employ repeated gauging measurements with post-selection rather than performing error correction on the Clifford stabilizer code that emerges during the gauging protocol, thus gaining simplicity at the cost of scalability. Our protocol requires a regular square grid connectivity and yields logical error rates comparable to magic state cultivation. The $d=7$ version of our protocol gives access to the $10^{-12}$ logical error rate regime at $0.05\%$ physical error rate while retaining more than $1\%$ of the shots after the equivalent of the cultivation stage.

quant-pharXiv:2603.05429•Physical Review Letters•Mar 6, 2026•0 citations
Developing space- and time-efficient logical magic state preparation protocols will likely be an essential step towards building a large-scale fault-tolerant quantum computer. Motivated by this need, we introduce a scalable method for simulating logical magic state preparation protocols under the standard circuit-level noise model. When applied to protocols based on code switching, magic state cultivation, and magic state distillation, our method yields a complexity polynomial in (i) the number of qubits and (ii) the non-stabilizerness, e.g., stabilizer rank or Pauli rank, of the target encoded magic state. The efficiency of our simulation method is rooted in a curious fact: every circuit-level Pauli error in these protocols propagates to a Clifford error at the end. This property is satisfied by a large family of protocols, including those that repeatedly measure a transversal Clifford that squares to a Pauli. We provide a proof-of-principle numerical simulation that prepares a magic state using such logical Clifford measurements. Our work enables practical simulation of logical magic state preparation protocols without resorting to approximations or resource-intensive state-vector simulations.
The preparation of high-fidelity logical magic states is a crucial subroutine for universal fault-tolerant quantum computation (FTQC). Predicting the performance of FTQC and developing improved protocols rely on numerical methods to classically simulate logical magic state preparation in the presence of noise. Clifford logic on Pauli-stabilizer codes with circuit-level Pauli errors can be efficiently simulated using Pauli-stabilizer formalism, but the non-Clifford operations required to prepare logical magic states render generic simulation inefficient. We introduce Clifford-stabilizer simulation, an exact and efficient algorithm based on updating a Clifford-stabilizer group to simulate noisy preparation protocols for a broad class of logical magic states used to implement non-Clifford gates in the third level of the Clifford hierarchy under circuit-level Pauli errors. Clifford-stabilizer simulation applies to a range of operations that commonly appear in preparation protocols for such logical magic states, including Pauli-stabilizer measurements, logical Clifford measurements, and transversal non-Clifford gates. Our algorithm for Clifford-stabilizer simulation maps a non-Clifford circuit with sampled circuit-level Pauli errors to a Clifford circuit that exactly reproduces its measurement outcome distribution, achieving time and space complexities polynomial in relevant protocol parameters. We perform exact simulation of magic state cultivation up to fault distance 7 by Clifford-stabilizer simulation. Our method provides a route to perform exact benchmarking of large-scale logical magic state preparation protocols required for useful FTQC.
We show that every intermediate state of a broad class of non-Clifford quantum error-correction circuits is a third-order phase-polynomial state, even under stochastic Pauli noise. The class includes magic state distillation and cultivation, code switching and gauge fixing, transversal non-Clifford gates with syndrome extraction, and injection of diagonal magic states. Third-order phase-polynomial states strictly generalize stabilizer states, and we prove that they are exactly the stabilizer states of the diagonal-Clifford-and-Pauli (DCP) stabilizer formalism that we introduce. We characterize these states and show that their representations can be updated in polynomial time. This yields an exact polynomial-time simulation algorithm for these circuits and, more broadly, a framework for reasoning about their internal states and about magic states in general. We provide an open-source implementation, \texttt{merlin}, and benchmark it against existing non-Clifford simulators on distillation, cultivation, and code switching circuits. The benchmarks demonstrate improved runtime and memory scaling as the number of logical outputs grows in Bravyi-Haah distillation, and simulation of a code switching circuit beyond the reach of all other tested simulators.
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.
Encoding quantum information to protect it from errors is essential for performing large-scale quantum computations. Performing a universal set of quantum gates on encoded states demands a potentially large resource overhead and minimizing this overhead is key for the practical development of large-scale fault-tolerant quantum computers. We propose and experimentally implement a magic-state preparation protocol to fault-tolerantly prepare a pair of logical magic states in a [[6,2,2]] quantum error-detecting code using only eight physical qubits. Implementing this protocol on H1-1, a 20 qubit trapped-ion quantum processor, we prepare magic states with experimental infidelity 7−1+3×10−57^{+3}_{-1}\times 10^{-5}7−1+3​×10−5 with a 14.8−1+1%14.8^{+1}_{-1}\%14.8−1+1​% discard rate and use these to perform a fault-tolerant non-Clifford gate, the controlled-Hadamard (CH), with logical infidelity ≤2.3−9+9×10−4\leq 2.3^{+9}_{-9}\times 10^{-4}≤2.3−9+9​×10−4. Notably, this significantly outperforms the unencoded physical CH infidelity of 10−310^{-3}10−3. Through circuit-level stabilizer simulations, we show that this protocol can be self-concatenated to produce extremely high-fidelity magic states with low space-time overhead in a [[36,4,4]] quantum error correcting code, with logical error rates of 6×10−106\times 10^{-10}6×10−10 (5×10−145\times 10^{-14}5×10−14) at two-qubit error rate of 10−310^{-3}10−3 (10−410^{-4}10−4) respectively.
As quantum hardware enters the fault-tolerant regime, algorithms are beginning to be executed on encoded qubits, yet scalable certification of how well they run remains an open problem. Here we introduce magic-free certification, a certification protocol for universal fault-tolerant circuits that consumes no magic, the resource that generally places them beyond efficient classical simulation and is by far the most expensive element of a fault-tolerant computation. The protocol is code- and decoder-agnostic, runs interleaved with the target circuit on the same device, and has a sample complexity that grows linearly with the number of logical qubits and non-Clifford gates while remaining decoupled from the logical error rate itself. Given a predefined error tolerance pL∗p_L^*pL∗​, the protocol determines at a chosen confidence level whether the device executes the target circuit at a logical error rate below pL∗p_L^*pL∗​. The method relies on trap circuits, copies of the target with every magic state replaced by a stabilizer state, whose outcomes are deterministic and which, being indistinguishable from the target to stochastic Pauli noise, fail at the same rate. We illustrate the protocol in Steane-code simulations of a magic state injection gadget and a quantum Fourier transform.
Magic states are a scarce resource for two-dimensional qubit stabilizer codes. Magic state cultivation was recently proposed to reduce the cost of magic state preparation by measuring the transversal Clifford operator of the color code. Cultivation achieves ∼10−9\sim 10^{-9}∼10−9 logical error rates for the d=5d=5d=5 color code, with substantially lower space-time overhead than magic state distillation. However, due to the O(d)\mathcal{O}(d)O(d) depth of the Clifford measurement circuit, magic state cultivation becomes impractical for d>5d>5d>5. Here, we perform logical XS†XS^\daggerXS† measurements on the color code by gauging a transversal Clifford gate, resulting in a constant-depth logical measurement circuit. We employ repeated gauging measurements with post-selection rather than performing error correction on the Clifford stabilizer code that emerges during the gauging protocol, thus gaining simplicity at the cost of scalability. Our protocol requires a regular square grid connectivity and yields logical error rates comparable to magic state cultivation. The d=7d=7d=7 version of our protocol gives access to the 10−1210^{-12}10−12 logical error rate regime at 0.05%0.05\%0.05% physical error rate while retaining more than 1%1\%1% of the shots after the equivalent of the cultivation stage.