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:2009.03218 · Quantum

Fast simulation of planar Clifford circuits

David Gosset, Daniel Grier, Alex Kerzner, Luke Schaeffer

Published Feb 12, 2024• 7 citations
arXivHTMLPDF

Abstract

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.

DOI
10.22331/q-2024-02-12-1251

Related papers

Simulating Clifford Circuits with Gaussian Elimination

Yuchen Pang, Edgar Solomonik

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.

quant-pharXiv:2511.06127•Nov 11, 2025•0 citations

Clifford Simulation: Techniques and Applications

Alex Kerzner

Despite the widespread belief that quantum computers cannot be efficiently simulated classically, efficient simulation is known to be possible in certain restricted regimes. In particular, the Gottesman-Knill theorem states that Clifford circuits can be efficiently simulated. We begin this thesis by reviewing and comparing several known techniques for efficient simulation of Clifford circuits: the stabilizer formalism, CH form, affine form, and the graph state formalism. We describe each simulation method and give four different proofs of the Gottesman-Knill theorem. \n \nNext we review a recent work [15], which shows that restricting the geometry of Clifford circuits can lead to a further speedup. We give an algorithm for simulating Pauli basis measurements on a planar graph state in time $\\widetilde{O}(n^{\\omega/2})$, where $\\omega < 2.373$ is the matrix multiplication exponent. This algorithm achieves a quadratic speedup over using Clifford simulation methods directly. As an application of this algorithm, we consider a depth-$d$ Clifford circuit whose two-qubit gates act along edges of a planar graph and describe how to sample from its output distribution or compute an output probability in time $\\widetilde{O}(n^{\\omega/2}d^\\omega)$. For $d= O(\\log n)$, both of these results are quadratic speedups over using Clifford simulation methods directly. \n \nFinally, we extend these simulation algorithms to universal circuits by using stabilizer rank methods. We follow a previously known gadgetization procedure [9] to show that given a depth-$d$ Clifford+$T$ circuit with $t$ $T$ gates and whose two-qubit gates act along edges of a planar graph, we can sample from its output distribution in time $\\widetilde{O}(2^{0.7926t}n^{5/2}t^{6} d^3)$ and can compute output probabilities in time $\\widetilde{O}(2^{0.3963t}n^{3/2}t^{6} d^3)$. Previous work [9,6], applied to the case $d=O(\\log n)$, gives algorithms for sampling in time $O(2^{0.3963t} n^6 t^6)$ and computation of output probabilities in time $O(2^{0.3963t}n^3t^3)$. Our sampling algorithm offers improved scaling in $n$ but poorer scaling in the exponential term, while our algorithm for computing output probabilities offers improved scaling in $n$ with identical scaling in the exponential term.

•May 28, 2021•2 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

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

Classical simulations of quantum systems using stabilizer decompositions

Hammam Qassim

One of the state of the art techniques for classically simulating quantum circuits relies on approximating the output state of the circuit by a superposition of stabilizer states. \nIf the number of non-Clifford gates in the circuit is small, such simulations can be very effective. \nThis thesis provides various improvements in this framework. First, we describe an improved method of computing approximate stabilizer decompositions, which reduces the time cost of computing a single term in the decomposition from $O(\\ell n^2)$ to $O(m n^2)$, where $\\ell$ is the total number of gates in the circuit, and $m$ is the number of non-Clifford gates. \nSince this subroutine has to be repeated exponentially many times, this improvement can be significant in practice whenever $\\ell \\gg m$. \nOur method uses a certain re-writing of the circuit, which in some cases allows for a significant amelioration of the exponential scaling of the required classical resources. \n \nFurthermore, we describe a method of constructing exact, low-rank stabilizer decompositions of $\\ket{\\psi}^{\\otimes m}$, where $\\ket{\\psi}$ is either a magic state or an equatorial state. \nFor any single qubit magic state $\\ket{\\psi}$, we find stabilizer decompositions of $\\ket{\\psi}^{\\otimes m}$ with $2^{m\\log_2(3)/4}$ terms. This improves on the best known bound of $2^{m \\log_2(7)/6}$. \nSimilarly, for any single qubit equatorial state $\\ket{\\psi}$, we give a stabilizer decomposition of $\\ket{\\psi}^{\\otimes m}$ with $2^{m/2}$ terms. \nTo our knowledge no such decompositions were previously known. \nThese results translate to milder exponential scaling of the classical resources required for estimating probabilities of quantum circuits up to a polynomially small multiplicative error, as well as allowing more types of circuits to be simulated in this way. \n \nWe also consider certain obstructions to classical simulations. \nIt has been argued in various contexts that contextuality and non-locality hamper classical simulations of quantum circuits. \nLinear constraint systems (LCSs) are a generalization of the well-known Peres-Mermin magic square, which has been recently used to prove a separation between the power of constant depth classical and quantum circuits. \n \nWhile binary LCSs have been studied in detail, $d$-ary LCSs are less well-understood. In this thesis we consider linear constraint systems modulo $d > 2$. We give a simple proof, of the previously known fact, that any linear constraint system which admits a quantum solution consisting of generalized Pauli observables in odd dimension must be classically satisfiable. We further prove that, for odd $d$, if a Pauli-like commutation relation between two variables in the LCS arises, then it has no quantum solutions in any dimensions, in stark contrast to the even $d$ case. We apply this result to various examples, for instance showing that many generalizations of the Peres-Mermin magic square do not give rise to a quantum vs. classical satisfiability gap.

•Feb 19, 2021•4 citations

Efficient fidelity simulation of high-rate magic distillation circuits

Xiao Xiao, Dominik Hangleiter, J. Pablo Bonilla Ataides +4 more

Non-Clifford gates are essential for avoiding classical simulability under the Gottesman-Knill theorem. An error-corrected circuit with non-Clifford gates will therefore be an important element for realizing useful fault-tolerant quantum algorithms. However, accurately understanding the fault-tolerant performance of such circuits faces challenges due to the classical hardness of simulating these circuits. We avoid simulating logical measurements and develop exact and efficient classical methods for benchmarking circuits composed of X, CNOT, and diagonal gates in the Clifford hierarchy, including state and gate teleportation gadgets with feedforward. For circuits with third-level diagonal gates, our benchmarking algorithm efficiently samples syndrome statistics and estimates the output logical fidelity and expectation values of certain Clifford observables, including all Pauli observables. The evaluation of syndrome expectation values also extends to circuits with fourth-level diagonal gates. Our algorithm scales polynomially in the number of physical qubits n and circuit depth T, independent of the number of logical qubits. The benchmarking applications include IQP sampling and magic state preparation/cultivation. We demonstrate the practical utility of our simulation algorithms by using them to optimize high-rate magic state distillation factories based on three copies of a [[27,3,3]] tricycle code.

quant-pharXiv:2610.03605•Oct 5, 2026•0 citations
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.
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.
Despite the widespread belief that quantum computers cannot be efficiently simulated classically, efficient simulation is known to be possible in certain restricted regimes. In particular, the Gottesman-Knill theorem states that Clifford circuits can be efficiently simulated. We begin this thesis by reviewing and comparing several known techniques for efficient simulation of Clifford circuits: the stabilizer formalism, CH form, affine form, and the graph state formalism. We describe each simulation method and give four different proofs of the Gottesman-Knill theorem. \n \nNext we review a recent work [15], which shows that restricting the geometry of Clifford circuits can lead to a further speedup. We give an algorithm for simulating Pauli basis measurements on a planar graph state in time widetildeO(nomega/2)\\widetilde{O}(n^{\\omega/2})widetildeO(nomega/2), where omega<2.373\\omega < 2.373omega<2.373 is the matrix multiplication exponent. This algorithm achieves a quadratic speedup over using Clifford simulation methods directly. As an application of this algorithm, we consider a depth-ddd Clifford circuit whose two-qubit gates act along edges of a planar graph and describe how to sample from its output distribution or compute an output probability in time $\\widetilde{O}(n^{\\omega/2}d^\\omega)$. For d=O(logn)d= O(\\log n)d=O(logn), both of these results are quadratic speedups over using Clifford simulation methods directly. \n \nFinally, we extend these simulation algorithms to universal circuits by using stabilizer rank methods. We follow a previously known gadgetization procedure [9] to show that given a depth-ddd Clifford+TTT circuit with ttt TTT gates and whose two-qubit gates act along edges of a planar graph, we can sample from its output distribution in time widetildeO(20.7926tn5/2t6d3)\\widetilde{O}(2^{0.7926t}n^{5/2}t^{6} d^3)widetildeO(20.7926tn5/2t6d3) and can compute output probabilities in time widetildeO(20.3963tn3/2t6d3)\\widetilde{O}(2^{0.3963t}n^{3/2}t^{6} d^3)widetildeO(20.3963tn3/2t6d3). Previous work [9,6], applied to the case d=O(logn)d=O(\\log n)d=O(logn), gives algorithms for sampling in time O(20.3963tn6t6)O(2^{0.3963t} n^6 t^6)O(20.3963tn6t6) and computation of output probabilities in time O(20.3963tn3t3)O(2^{0.3963t}n^3t^3)O(20.3963tn3t3). Our sampling algorithm offers improved scaling in nnn but poorer scaling in the exponential term, while our algorithm for computing output probabilities offers improved scaling in nnn with identical scaling in the exponential term.
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.
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.
One of the state of the art techniques for classically simulating quantum circuits relies on approximating the output state of the circuit by a superposition of stabilizer states. \nIf the number of non-Clifford gates in the circuit is small, such simulations can be very effective. \nThis thesis provides various improvements in this framework. First, we describe an improved method of computing approximate stabilizer decompositions, which reduces the time cost of computing a single term in the decomposition from O(elln2)O(\\ell n^2)O(elln2) to O(mn2)O(m n^2)O(mn2), where ell\\ellell is the total number of gates in the circuit, and mmm is the number of non-Clifford gates. \nSince this subroutine has to be repeated exponentially many times, this improvement can be significant in practice whenever ellggm\\ell \\gg mellggm. \nOur method uses a certain re-writing of the circuit, which in some cases allows for a significant amelioration of the exponential scaling of the required classical resources. \n \nFurthermore, we describe a method of constructing exact, low-rank stabilizer decompositions of ketpsiotimesm\\ket{\\psi}^{\\otimes m}ketpsiotimesm, where ketpsi\\ket{\\psi}ketpsi is either a magic state or an equatorial state. \nFor any single qubit magic state ketpsi\\ket{\\psi}ketpsi, we find stabilizer decompositions of ketpsiotimesm\\ket{\\psi}^{\\otimes m}ketpsiotimesm with 2mlog2(3)/42^{m\\log_2(3)/4}2mlog2​(3)/4 terms. This improves on the best known bound of 2mlog2(7)/62^{m \\log_2(7)/6}2mlog2​(7)/6. \nSimilarly, for any single qubit equatorial state ketpsi\\ket{\\psi}ketpsi, we give a stabilizer decomposition of ketpsiotimesm\\ket{\\psi}^{\\otimes m}ketpsiotimesm with 2m/22^{m/2}2m/2 terms. \nTo our knowledge no such decompositions were previously known. \nThese results translate to milder exponential scaling of the classical resources required for estimating probabilities of quantum circuits up to a polynomially small multiplicative error, as well as allowing more types of circuits to be simulated in this way. \n \nWe also consider certain obstructions to classical simulations. \nIt has been argued in various contexts that contextuality and non-locality hamper classical simulations of quantum circuits. \nLinear constraint systems (LCSs) are a generalization of the well-known Peres-Mermin magic square, which has been recently used to prove a separation between the power of constant depth classical and quantum circuits. \n \nWhile binary LCSs have been studied in detail, ddd-ary LCSs are less well-understood. In this thesis we consider linear constraint systems modulo d>2d > 2d>2. We give a simple proof, of the previously known fact, that any linear constraint system which admits a quantum solution consisting of generalized Pauli observables in odd dimension must be classically satisfiable. We further prove that, for odd ddd, if a Pauli-like commutation relation between two variables in the LCS arises, then it has no quantum solutions in any dimensions, in stark contrast to the even ddd case. We apply this result to various examples, for instance showing that many generalizations of the Peres-Mermin magic square do not give rise to a quantum vs. classical satisfiability gap.
Non-Clifford gates are essential for avoiding classical simulability under the Gottesman-Knill theorem. An error-corrected circuit with non-Clifford gates will therefore be an important element for realizing useful fault-tolerant quantum algorithms. However, accurately understanding the fault-tolerant performance of such circuits faces challenges due to the classical hardness of simulating these circuits. We avoid simulating logical measurements and develop exact and efficient classical methods for benchmarking circuits composed of X, CNOT, and diagonal gates in the Clifford hierarchy, including state and gate teleportation gadgets with feedforward. For circuits with third-level diagonal gates, our benchmarking algorithm efficiently samples syndrome statistics and estimates the output logical fidelity and expectation values of certain Clifford observables, including all Pauli observables. The evaluation of syndrome expectation values also extends to circuits with fourth-level diagonal gates. Our algorithm scales polynomially in the number of physical qubits n and circuit depth T, independent of the number of logical qubits. The benchmarking applications include IQP sampling and magic state preparation/cultivation. We demonstrate the practical utility of our simulation algorithms by using them to optimize high-rate magic state distillation factories based on three copies of a [[27,3,3]] tricycle code.