Clifft: Fast Exact Simulation of Near-Clifford Quantum Circuits

Bradley Chase, Farrokh Labib · 2026

Read Clifft: Fast Exact Simulation of Near-Clifford Quantum Circuits by Bradley Chase, Farrokh Labib (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2604-27058.txt.

Introduction

Chase and Labib introduce Clifft, an open-source simulator for exact classical runs of fault-tolerant quantum circuits. It shifts the dominant exponential cost from total qubit count to a dynamic active subspace, factoring the state into an offline Clifford frame, an online Pauli frame, and a sized active vector. Costs then track peak active virtual dimension, growing on non-Clifford steps and shrinking on measurement. Clifft nears standard tools in pure limits while beating GPU near-Clifford simulators by orders of magnitude on low-magic benchmarks.

Catalog record

CREATORBradley Chase, Farrokh Labib
YEAR2026
COLLECTIONPAPERS
FORMATTXT
FILE SIZE77244
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2604.27058

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Clifft: Fast Exact Simulation of Near-Clifford Quantum Circuits Bradley Chase, Farrokh Labib Abstract Exact classical simulation of fault-tolerant quantum circuits remains limited by a tradeoff between exponential state vector scaling, exponential T T -count scaling in stabilizer-rank approaches, and per-shot tracking overhead in sparse generalized stabilizer simulators. In this work, we introduce Clifft, an open-source simulator that shifts the dominant exponential cost from the total qubit count to a dynamic active subspace by factoring the quantum state into an offline Clifford frame, an online Pauli frame, and a dynamically sized active state vector. This architecture resolves deterministic Clifford coordinate transformations ahead of time, generalizing Stim’s compile-once, sample-many execution model to circuits with non-Clifford operations. Consequently, exponential simulation costs are determined by the peak active virtual dimension, which expands during non-Clifford operations and contracts during measurements. Clifft remains within a constant factor of standard tools in the pure-Clifford and non-Clifford limits, while delivering up to orders-of-magnitude throughput gains over GPU-accelerated near-Clifford simulators on low-magic fault-tolerant benchmarks. Executing on commodity CPUs and exposing a Stim-like API, Clifft enables, to our knowledge, the first exact end-to-end simulation of magic state cultivation including the escape stage, over hundreds of billions of shots. These simulations show that escape-stage failures suppress the discrepancy between the true T T -gate circuit and its S S -proxy at low decoder-gap thresholds, while at high thresholds the full-protocol behavior approaches the larger discrepancy observed in the cultivation stages alone. 1 Introduction Classical simulation plays a central role in the development of fault-tolerant quantum computing. It is used to design and validate fault-tolerant protocols, estimate logical error rates, study decoder behavior, and compare architectural tradeoffs before hardware can reach the relevant scale [ 1 , 2 , 3 , 4 , 5 , 6 ] . For circuits composed entirely of Clifford operations and Pauli measurements, this workflow is enabled by high-throughput stabilizer simulators such as Stim [ 7 ] . By combining efficient tableau methods of Aaronson and Gottesman [ 8 ] with a compile-once, sample-many Pauli-frame workflow and highly optimized kernels, Stim made it practical to sample the billions and trillions of shots needed to evaluate the performance of protocols with increasingly lower logical error rates. Its wide adoption illustrates how rapidly the field can advance when provided with a purpose-built simulator capable of operating at scale. However, many important fault-tolerant protocols are not purely Clifford [ 9 , 10 , 11 , 12 ] . Universal quantum computation requires non-Clifford resources [ 13 , 14 ] , and the corresponding circuits quickly leave the regime where stabilizer methods apply directly. Existing simulation strategies each address part of this problem, but with different tradeoffs. Dense state vector methods are exact and flexible, but their memory cost grows exponentially with the total qubit count [ 15 , 16 ] . Tensor-network and matrix-product-state methods can be effective when entanglement remains limited, but the deep, highly connected operations of some fault-tolerant gadgets incur heavy costs [ 17 , 18 , 19 , 20 ] . Low-magic simulation methods based on stabilizer-rank decompositions, Pauli-propagation and generalized stabilizer approaches, instead try to exploit the fact that many fault-tolerant circuits remain close to the Clifford regime [ 21 , 22 , 23 , 24 , 25 , 26 ] . In practice, implementing these methods exposes practical software engineering tradeoffs across total non-Clifford count, qubit count, dynamic tracking overhead, and shot throughput. This challenge is especially clear in magic-state preparation protocols. Magic State Cultivation (MSC) [ 9 ] has emerged as a particularly compelling target because it promises low-overhead preparation of high-fidelity logical |T\rangle states, and has already motivated both simulation and experimental follow-on work [ 27 , 28 , 29 , 30 , 31 , 32 ] . At the same time, MSC is a demanding standalone benchmark for simulation. It is representative of an important near-Clifford regime common for quantum error correction (QEC): circuits whose dominant propagation, measurement, and noise structure is Clifford, but whose correctness and performance depend on a relatively small set of non-Clifford operations. Answering the key fault-tolerance questions in this regime requires not only exact treatment of the true non-Clifford circuit, but also sampling at the scale of millions to trillions of shots to evaluate performance at increasingly lower physical noise rates. In the original MSC study, large-scale evaluation relied on an S -gate proxy circuit amenable to simulation in Stim, because an exact simulator for the full noisy non-Clifford circuit was not yet available at useful scale [ 9 ] . Recent work has made major progress on this frontier. Li et al. developed SOFT [ 33 ] which implemented a generalized stabilizer representation on GPUs to obtain the first ground-truth large-scale simulations of the d=5 cultivation circuit. Tuloup and Ayral’s Pauli Frame Sparse Representation (PFSR) [ 34 ] used a similar sparse non-Clifford structure along with stabilizer-frame tracking, similarly finding that the true T -gate cultivation circuit can differ substantially from the S -proxy approximation. Tsim [ 25 ] brings a compile-once, sample-many approach to universal noisy QEC circuits using ZX-calculus reductions and stabilizer-rank methods [ 35 , 36 ] . For easier adoption, Tsim is compatible with the Stim API and extends the Stim circuit format with non-Clifford instructions. Together, these tools demonstrate that the gap beyond pure Clifford simulation is beginning to close. However, these methods still face practical limits as system sizes and shot count increase. For MSC in particular, prior studies omit the final escape stage, leaving a critical gap in end-to-end analysis. In this work, we introduce Clifft , an open-source simulator designed for this regime. Clifft 1 1 1 Clifft is a play on ”Clifford+T” and pronounced as one syllable. combines a Stim-like ahead-of-time compilation philosophy with an execution model that confines dense quantum evolution to the active non-Clifford subspace. Like Tsim, Clifft accepts Stim-compatible circuits, including noise, mid-circuit measurements, detector annotations, and classically controlled operations, and adds support for non-Clifford gates. At a high level, Clifft factors the simulated state into a deterministic offline Clifford frame, a virtual Pauli frame for lightweight shot-dependent updates, and a dense active state vector that tracks only the current non-Clifford degrees of freedom. This separates deterministic coordinate transformations from coherent amplitude evolution, bounding dense runtime array operations by \mathcal{O}(2^{k}) , where k represents the active dimension of the state vector. k is dynamic; it expands when non-Clifford gates are applied and contracts when stabilizer measurements collapse the superposition. For many near-Clifford QEC protocols like MSC, frequent interleaved measurements keep these non-Clifford effects spatially and temporally localized. For example, even though the end-to-end MSC protocol involves 463 physical qubits through the escape stage, the peak active dimension never exceeds k_{\max}=10 . While sparse simulators like SOFT and PFSR also scale exponentially with the active dimension, they face online tracking overhead. Their dynamic \mathcal{O}(N^{2}) tableau eliminations and canonicalization steps become increasingly costly each shot at the full N=463 end-to-end scale, helping explain why prior MSC studies stopped after the 42-qubit cultivation stage. In contrast, Clifft evaluates all \mathcal{O}(N^{2}) tableau updates entirely ahead of time. Runtime, or sample time, execution is thus reduced to lightweight bitwise frame updates and CPU-friendly sweeps over the active state

Read the complete text