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:2511.06127

Simulating Clifford Circuits with Gaussian Elimination

Yuchen Pang, Edgar Solomonik

quant-phmath.NASubmitted Nov 8, 2025• Announced Nov 11, 2025• 0 citations• Revised Oct 10, 2026 (v3)
v1 · Nov 8, 2025v2 · Dec 8, 2025v3 · Oct 10, 2026
arXivHTMLPDF

Abstract

Quantum circuits are considered more powerful than classical circuits and require exponential resources to simulate classically. Clifford circuits are a special class of quantum circuits that can be simulated in polynomial time but still show important quantum effects such as entanglement. In this work, we present an algorithm that simulates Clifford circuits by performing Gaussian elimination on a modified adjacency matrix derived from the circuit structure. Our work builds on a ZX-calculus tensor network representation of Clifford circuits that reduces to quantum graph states. We give a concise formula of amplitudes of graph states based on the LDL decomposition of matrices over GF(2), and use it to get efficient algorithms for strong and weak simulation of Clifford circuits using a tree-decomposition-based sparse LDL algorithm. The complexity of our algorithm matches the state of the art for weak graph state simulation and improves the state of the art for strong graph state simulation by taking advantage of Strassen-like fast matrix multiplication. Our algorithm is also efficient when computing many amplitudes or samples of a Clifford circuit. Further, our amplitudes formula provides a new characterization of locally Clifford equivalent graph states as well as an efficient protocol to learn graph states with low-rank adjacency matrices.

Related papers

Efficient Classical Simulation of Low-Rank-Width Quantum Circuits Using ZX-Calculus

Fedor Kuyanov, Aleks Kissinger

In this paper, we introduce a technique for contracting (i.e. numerically evaluating) ZX-diagrams whose complexity scales with their rank-width, a graph parameter that behaves nicely under ZX rewrite rules. Given a rank-decomposition of width $R$, our method simulates a graph-like ZX-diagram in $Õ(4^R)$ time. Applied to classical simulation of quantum circuits, it is no slower than either naive state vector simulation or stabiliser decompositions with $α= 0.5$, and in practice can be significantly faster for suitably chosen rank-decompositions. Since finding optimal rank-decompositions is NP-hard, we introduce heuristics that produce good decompositions in practice. We benchmark our simulation routine against Quimb, a popular tensor contraction library, and observe substantial reductions in floating-point operations (often by several orders of magnitude) for random and structured non-Clifford circuits as well as random ZX-diagrams.

quant-pharXiv:2603.06764•Mar 9, 2026•0 citations

Fast simulation of planar Clifford circuits

David Gosset, Daniel Grier, Alex Kerzner +1 more

A general quantum circuit can be simulated classically in exponential time. If it has a planar layout, then a tensor-network contraction algorithm due to Markov and Shi has a runtime exponential in the square root of its size, or more generally exponential in the treewidth of the underlying graph. Separately, Gottesman and Knill showed that if all gates are restricted to be Clifford, then there is a polynomial time simulation. We combine these two ideas and show that treewidth and planarity can be exploited to improve Clifford circuit simulation. Our main result is a classical algorithm with runtime scaling asymptotically as nω/2 < n1.19 which samples from the output distribution obtained by measuring all n qubits of a planar graph state in given Pauli bases. Here ω is the matrix multiplication exponent. We also provide a classical algorithm with the same asymptotic runtime which samples from the output distribution of any constant-depth Clifford circuit in a planar geometry. Our work improves known classical algorithms with cubic runtime.A key ingredient is a mapping which, given a tree decomposition of some graph G , produces a Clifford circuit with a structure that mirrors the tree decomposition and which emulates measurement of the corresponding graph state. We provide a classical simulation of this circuit with the runtime stated above for planar graphs and otherwise ntω−1 where t is the width of the tree decomposition. Our algorithm incorporates two subroutines which may be of independent interest. The first is a matrix-multiplication-time version of the Gottesman-Knill simulation of multi-qubit measurement on stabilizer states. The second is a new classical algorithm for solving symmetric linear systems over F2 in a planar geometry, extending previous works which only applied to non-singular linear systems in the analogous setting.

arXiv:2009.03218•Quantum•Feb 12, 2024•7 citations

Unifying Graph Measures and Stabilizer Decompositions for the Classical Simulation of Quantum Circuits

Julien Codsi, Tuomas Laakkonen

Various algorithms have been developed to simulate quantum circuits on classical hardware. Among the most prominent are approaches based on \emph{stabilizer decompositions} and \emph{tensor network contraction}. In this work, we present a unified framework that bridges these two approaches, placing them under a common formalism. Using this, we present two new algorithms to simulate an $n$-qubit circuit $C$: one that runs in $\tilde{O}(T^{\mathsf{tw}(C)})$ time and the other in $\tilde{O}(T^{γ\cdot \mathsf{tw}(C)})$ time, where $\mathsf{tw}(C)$ and $\mathsf{rw}(C)$ refer to the the tree-width and rank-width, respectively, of a tensor network associated to $C$, $T$ is the number of non-Clifford gates in $C$, and $γ\approx 3.42$. The proposed algorithms are simple, only require a linear amount of memory, are trivially parallelizable, and interact nicely with ZX-diagram simplification routines. Furthermore, we introduce the refined complexity measures \emph{focused tree-width} and \emph{focused rank-width}, which are always at least as efficient as their standard equivalent; these can be directly applied within our simulation algorithms, allowing for a more precise upper bound on the run time.

quant-pharXiv:2603.06377•Mar 9, 2026•0 citations

Dynamic T-decomposition for classical simulation of quantum circuits

Wira Azmoon Ahmad, Matthew Sutcliffe

It is known that a quantum circuit may be simulated with classical hardware via stabilizer state (T-)decomposition in [Formula: see text] time, given t non-Clifford gates and a decomposition efficiency [Formula: see text]. The past years have seen a number of papers presenting new decompositions of lower [Formula: see text] to reduce this runtime and enable simulation of ever larger circuits. More recently, it has been demonstrated that well-placed applications of apparently weaker (higher [Formula: see text]) decompositions can in fact result in better overall efficiency when paired with the circuit simplification strategies of ZX-calculus. In this work, we take the most generalized T-decomposition (namely vertex cutting), which achieves a poor efficiency of [Formula: see text] and identify common structures to which applying this can, after simplification via ZX-calculus rewriting, yield very strong effective efficiencies [Formula: see text]. By taking into account this broader scope of the ZX-diagram and incorporating the simplification facilitated by the well-motivated cuts, we derive a handful of efficient T-decompositions whose applicabilities are relatively frequent. In benchmarking these new ‘dynamic’ decompositions against the existing alternatives, we observe a significant reduction in overall [Formula: see text] and hence overall runtime for classical simulation, particularly for certain common circuit classes.

arXiv:2412.17182•International Journal of Modern Physics C•Jun 13, 2025•1 citation

Classical simulability of Clifford + T circuits with Clifford-augmented matrix product states

Zejun Liu, Bryan K. Clark

Determining the quantum-classical boundary between quantum circuits that can be efficiently simulated classically and those that cannot remains a fundamental question. One approach to classical simulation is to represent the output of a quantum circuit as a Clifford-augmented matrix product state (CAMPS), which, via a disentangling algorithm, decomposes the wave function into Clifford and MPS components, and from which Pauli expectation values can be computed in time polynomial in the MPS bond dimension. In this work, we develop an optimization-free disentangling (OFD) algorithm for Clifford circuits either doped with T gates or, equivalently, preceded by multiqubit gates of the form α I + β P . We give a simple and easily computed algebraic criterion that characterizes the individual quantum circuits for which OFD generates an efficient CAMPS—the bond dimension is exponential in the null space of a Galois binary field GF(2) matrix induced by a tableau of the twisted Pauli strings P . This significantly increases the number of circuits with rigorous polynomial-time classical simulations. We also give evidence that the typical N qubit random Clifford circuit doped with N uniformly distributed T gates of polylogarithmic depth or greater has a CAMPS with polynomial bond dimension. In addition, we compare OFD against disentangling by optimization. We further explore the representability of CAMPS for random Clifford circuits doped with more than N T gates. We also propose algorithms for sampling, probability, and amplitude estimation of bitstrings, and evaluation of entanglement Rényi entropy from CAMPS, which, though still having exponential complexity, are more efficient than standard MPS simulations. This work establishes a versatile framework for understanding classical simulatability of Clifford + T circuits and explores the interplay between quantum entanglement and quantum magic in quantum systems.

arXiv:2412.17209•Physical Review Research•Apr 18, 2026•4 citations

Quadratic Sums-of-Powers for Fixed-Parameter Tractable Quantum-Circuit Simulation

Alexis de Colnet, Floris Geerts, Rihan Hai +3 more

Strongly simulating a quantum circuit, that is, computing an output amplitude, can be done by summing the circuit's Feynman paths: a weighted count over assignments to Boolean path variables. The circuit's gates induce correlations among these variables, forming a graph whose structure controls several exact simulation routes. This sum-of-powers (SOP) viewpoint underlies recent simulators built on binary decision diagrams and weighted model counting. For a quadratic SOP with $n$ variables, even modulus $r$, and a rank-decomposition of its variable graph of width $k$, our dynamic program (DP) computes an amplitude using only $O(4^kpoly(n))$ arithmetic operations. For Clifford$+T$ circuits, the amplitude is given by an SOP with modulus $8$. Rank-width never exceeds linear rank-width, which governs some decision-diagram approaches, and is at most one greater than the Markov--Shi contraction complexity of the circuit tensor network. Moreover, there are non-Clifford families of bounded rank-width where both competing parameters diverge. We also present a stabilizer-rank optimization, exploiting that the DP tables are stabilizer-type Gauss sums. Each subtree runs at the width price of its cut-ranks or at a magic price that discharges the non-Clifford phases below it. The resulting best total cost never exceeds $O(4^kpoly(n))$, yet is polynomial on mixed families where the pure rank-width and pure $T$-count guarantees are both exponential. Clifford amplitudes take polynomial time on any graph, the exact-amplitude consequence of Gottesman--Knill. A prototype evaluation on standard circuit benchmarks finds treewidth bucket elimination the strongest baseline, with the new rank-width DP complementary: it wins on structured families where treewidth blows up.

quant-pharXiv:2605.29944•May 29, 2026•0 citations
Quantum circuits are considered more powerful than classical circuits and require exponential resources to simulate classically. Clifford circuits are a special class of quantum circuits that can be simulated in polynomial time but still show important quantum effects such as entanglement. In this work, we present an algorithm that simulates Clifford circuits by performing Gaussian elimination on a modified adjacency matrix derived from the circuit structure. Our work builds on a ZX-calculus tensor network representation of Clifford circuits that reduces to quantum graph states. We give a concise formula of amplitudes of graph states based on the LDL decomposition of matrices over GF(2), and use it to get efficient algorithms for strong and weak simulation of Clifford circuits using a tree-decomposition-based sparse LDL algorithm. The complexity of our algorithm matches the state of the art for weak graph state simulation and improves the state of the art for strong graph state simulation by taking advantage of Strassen-like fast matrix multiplication. Our algorithm is also efficient when computing many amplitudes or samples of a Clifford circuit. Further, our amplitudes formula provides a new characterization of locally Clifford equivalent graph states as well as an efficient protocol to learn graph states with low-rank adjacency matrices.
In this paper, we introduce a technique for contracting (i.e. numerically evaluating) ZX-diagrams whose complexity scales with their rank-width, a graph parameter that behaves nicely under ZX rewrite rules. Given a rank-decomposition of width RRR, our method simulates a graph-like ZX-diagram in O~(4R)Õ(4^R)O~(4R) time. Applied to classical simulation of quantum circuits, it is no slower than either naive state vector simulation or stabiliser decompositions with α=0.5α= 0.5α=0.5, and in practice can be significantly faster for suitably chosen rank-decompositions. Since finding optimal rank-decompositions is NP-hard, we introduce heuristics that produce good decompositions in practice. We benchmark our simulation routine against Quimb, a popular tensor contraction library, and observe substantial reductions in floating-point operations (often by several orders of magnitude) for random and structured non-Clifford circuits as well as random ZX-diagrams.
A general quantum circuit can be simulated classically in exponential time. If it has a planar layout, then a tensor-network contraction algorithm due to Markov and Shi has a runtime exponential in the square root of its size, or more generally exponential in the treewidth of the underlying graph. Separately, Gottesman and Knill showed that if all gates are restricted to be Clifford, then there is a polynomial time simulation. We combine these two ideas and show that treewidth and planarity can be exploited to improve Clifford circuit simulation. Our main result is a classical algorithm with runtime scaling asymptotically as nω/2 < n1.19 which samples from the output distribution obtained by measuring all n qubits of a planar graph state in given Pauli bases. Here ω is the matrix multiplication exponent. We also provide a classical algorithm with the same asymptotic runtime which samples from the output distribution of any constant-depth Clifford circuit in a planar geometry. Our work improves known classical algorithms with cubic runtime.A key ingredient is a mapping which, given a tree decomposition of some graph G , produces a Clifford circuit with a structure that mirrors the tree decomposition and which emulates measurement of the corresponding graph state. We provide a classical simulation of this circuit with the runtime stated above for planar graphs and otherwise ntω−1 where t is the width of the tree decomposition. Our algorithm incorporates two subroutines which may be of independent interest. The first is a matrix-multiplication-time version of the Gottesman-Knill simulation of multi-qubit measurement on stabilizer states. The second is a new classical algorithm for solving symmetric linear systems over F2 in a planar geometry, extending previous works which only applied to non-singular linear systems in the analogous setting.
Various algorithms have been developed to simulate quantum circuits on classical hardware. Among the most prominent are approaches based on \emph{stabilizer decompositions} and \emph{tensor network contraction}. In this work, we present a unified framework that bridges these two approaches, placing them under a common formalism. Using this, we present two new algorithms to simulate an nnn-qubit circuit CCC: one that runs in O~(Ttw(C))\tilde{O}(T^{\mathsf{tw}(C)})O~(Ttw(C)) time and the other in O~(Tγ⋅tw(C))\tilde{O}(T^{γ\cdot \mathsf{tw}(C)})O~(Tγ⋅tw(C)) time, where tw(C)\mathsf{tw}(C)tw(C) and rw(C)\mathsf{rw}(C)rw(C) refer to the the tree-width and rank-width, respectively, of a tensor network associated to CCC, TTT is the number of non-Clifford gates in CCC, and γ≈3.42γ\approx 3.42γ≈3.42. The proposed algorithms are simple, only require a linear amount of memory, are trivially parallelizable, and interact nicely with ZX-diagram simplification routines. Furthermore, we introduce the refined complexity measures \emph{focused tree-width} and \emph{focused rank-width}, which are always at least as efficient as their standard equivalent; these can be directly applied within our simulation algorithms, allowing for a more precise upper bound on the run time.
It is known that a quantum circuit may be simulated with classical hardware via stabilizer state (T-)decomposition in [Formula: see text] time, given t non-Clifford gates and a decomposition efficiency [Formula: see text]. The past years have seen a number of papers presenting new decompositions of lower [Formula: see text] to reduce this runtime and enable simulation of ever larger circuits. More recently, it has been demonstrated that well-placed applications of apparently weaker (higher [Formula: see text]) decompositions can in fact result in better overall efficiency when paired with the circuit simplification strategies of ZX-calculus. In this work, we take the most generalized T-decomposition (namely vertex cutting), which achieves a poor efficiency of [Formula: see text] and identify common structures to which applying this can, after simplification via ZX-calculus rewriting, yield very strong effective efficiencies [Formula: see text]. By taking into account this broader scope of the ZX-diagram and incorporating the simplification facilitated by the well-motivated cuts, we derive a handful of efficient T-decompositions whose applicabilities are relatively frequent. In benchmarking these new ‘dynamic’ decompositions against the existing alternatives, we observe a significant reduction in overall [Formula: see text] and hence overall runtime for classical simulation, particularly for certain common circuit classes.
Determining the quantum-classical boundary between quantum circuits that can be efficiently simulated classically and those that cannot remains a fundamental question. One approach to classical simulation is to represent the output of a quantum circuit as a Clifford-augmented matrix product state (CAMPS), which, via a disentangling algorithm, decomposes the wave function into Clifford and MPS components, and from which Pauli expectation values can be computed in time polynomial in the MPS bond dimension. In this work, we develop an optimization-free disentangling (OFD) algorithm for Clifford circuits either doped with T gates or, equivalently, preceded by multiqubit gates of the form α I + β P . We give a simple and easily computed algebraic criterion that characterizes the individual quantum circuits for which OFD generates an efficient CAMPS—the bond dimension is exponential in the null space of a Galois binary field GF(2) matrix induced by a tableau of the twisted Pauli strings P . This significantly increases the number of circuits with rigorous polynomial-time classical simulations. We also give evidence that the typical N qubit random Clifford circuit doped with N uniformly distributed T gates of polylogarithmic depth or greater has a CAMPS with polynomial bond dimension. In addition, we compare OFD against disentangling by optimization. We further explore the representability of CAMPS for random Clifford circuits doped with more than N T gates. We also propose algorithms for sampling, probability, and amplitude estimation of bitstrings, and evaluation of entanglement Rényi entropy from CAMPS, which, though still having exponential complexity, are more efficient than standard MPS simulations. This work establishes a versatile framework for understanding classical simulatability of Clifford + T circuits and explores the interplay between quantum entanglement and quantum magic in quantum systems.
Strongly simulating a quantum circuit, that is, computing an output amplitude, can be done by summing the circuit's Feynman paths: a weighted count over assignments to Boolean path variables. The circuit's gates induce correlations among these variables, forming a graph whose structure controls several exact simulation routes. This sum-of-powers (SOP) viewpoint underlies recent simulators built on binary decision diagrams and weighted model counting. For a quadratic SOP with nnn variables, even modulus rrr, and a rank-decomposition of its variable graph of width kkk, our dynamic program (DP) computes an amplitude using only O(4kpoly(n))O(4^kpoly(n))O(4kpoly(n)) arithmetic operations. For Clifford+T+T+T circuits, the amplitude is given by an SOP with modulus 888. Rank-width never exceeds linear rank-width, which governs some decision-diagram approaches, and is at most one greater than the Markov--Shi contraction complexity of the circuit tensor network. Moreover, there are non-Clifford families of bounded rank-width where both competing parameters diverge. We also present a stabilizer-rank optimization, exploiting that the DP tables are stabilizer-type Gauss sums. Each subtree runs at the width price of its cut-ranks or at a magic price that discharges the non-Clifford phases below it. The resulting best total cost never exceeds O(4kpoly(n))O(4^kpoly(n))O(4kpoly(n)), yet is polynomial on mixed families where the pure rank-width and pure TTT-count guarantees are both exponential. Clifford amplitudes take polynomial time on any graph, the exact-amplitude consequence of Gottesman--Knill. A prototype evaluation on standard circuit benchmarks finds treewidth bucket elimination the strongest baseline, with the new rank-width DP complementary: it wins on structured families where treewidth blows up.