Magna: simulating magic state factories as cheaply as Clifford circuits
Abstract
Classical simulation of magic state factories, including distillation, cultivation, and code switching, is challenging because of their substantial non-Clifford content. We introduce magna (magic-state-factory assessment via global network algebra), a classical simulator that simulates such protocols as cheaply as Clifford circuits. magna expresses the figures of merit of a protocol, namely the acceptance rate and the fidelity of the accepted states, as tensor networks, which it reduces globally by exploiting a structural correspondence with transversal gates on quantum codes. magna further supports feedforward conditioned on arbitrary functions of mid-circuit measurement outcomes, including decoder outputs. We simulate Bravyi--Haah distillation with up to 100 output magic states at a cost that does not grow exponentially in the number of outputs, and achieve state-of-the-art sampling times for distance-5 magic state cultivation on both color codes and RP2 surface codes. Finally, we validate nonlinear feedforward on a logical-level distillation protocol with 15 rounds of decoder-dependent feedforward. magna aims to contribute to the key infrastructure for the large-scale evaluation and optimization of magic state factories.
Related
- Universal purification dynamics of monitored Clifford circuits
- The quantum Mpemba effect in symmetric random Clifford circuits
- A Complete and Natural Rule Set for Multi-Qudit Clifford Circuits in All Odd Prime Dimensions
- QuWARP: A Workload-Aware Reuse Planner for simulating Quantum Circuits
- The cost of simulating classically tractable quantum circuits and dynamics
BibTeX
@misc{wang2026magna,
title = {{Magna: simulating magic state factories as cheaply as Clifford circuits}},
author = {Yifei Wang and Yingfei Gu},
howpublished = {arXiv},
year = {2026},
month = oct,
doi = {10.48550/arxiv.2610.22315},
eprint = {2610.22315},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2610.22315},
}
RIS
TY - UNPB
TI - Magna: simulating magic state factories as cheaply as Clifford circuits
AU - Yifei Wang
AU - Yingfei Gu
PY - 2026
DA - 2026/10/15
PB - arXiv
DO - 10.48550/arxiv.2610.22315
UR - https://arxiv.org/abs/2610.22315
AB - Classical simulation of magic state factories, including distillation, cultivation, and code switching, is challenging because of their substantial non-Clifford content. We introduce magna (magic-state-factory assessment via global network algebra), a classical simulator that simulates such protocols as cheaply as Clifford circuits. magna expresses the figures of merit of a protocol, namely the acceptance rate and the fidelity of the accepted states, as tensor networks, which it reduces globally by exploiting a structural correspondence with transversal gates on quantum codes. magna further supports feedforward conditioned on arbitrary functions of mid-circuit measurement outcomes, including decoder outputs. We simulate Bravyi--Haah distillation with up to 100 output magic states at a cost that does not grow exponentially in the number of outputs, and achieve state-of-the-art sampling times for distance-5 magic state cultivation on both color codes and RP^2 surface codes. Finally, we validate nonlinear feedforward on a logical-level distillation protocol with 15 rounds of decoder-dependent feedforward. magna aims to contribute to the key infrastructure for the large-scale evaluation and optimization of magic state factories.
ER -