---
title: ZX-Calculus Cutting Stabiliser Decomposition
url: https://www.emergentmind.com/topics/cutting-stabiliser-decomposition
type: topic
---

# ZX-Calculus Cutting Stabiliser Decomposition

Cutting stabiliser decomposition is a ZX-calculus-based method for exact classical simulation of non-Clifford quantum circuits in which one identifies small, favorable non-stabiliser subdiagrams, “cuts” them into a sum of simpler diagrams, and interleaves each cut with graphical simplification of the whole diagram. In the quantum-circuit literature, the method is used to reduce the number of stabiliser terms required to simulate Clifford+T circuits, hidden-shift circuits, and postselected magic-state-generation circuits, with the central objective of lowering the total term count \(R\) or \(K\) that governs strong-simulation cost [2202.09202][2109.01076]. Later work generalized the approach to procedurally optimized vertex cuts and “dynamic” T-decompositions that exploit frequent ZX-diagram motifs, and applied it to magic state cultivation circuits where the final states were expressed as sums of \(4\) and \(8\) Clifford ZX-diagrams for the \(d=3\) and \(d=5\) variants respectively [2403.10964][2412.17182][2509.01224].

## 1. Formal basis and simulation objective

A stabiliser decomposition of a pure \(n\)-qubit state is an expansion
\[
|\psi\rangle \;=\; \sum_{i=1}^{K} \alpha_i\,|\phi_i\rangle,
\]
where each \(|\phi_i\rangle\) is a stabiliser state and \(\alpha_i\in\mathbb{C}\); the stabiliser rank is the minimal \(K\) over all such decompositions [2109.01076]. In the equivalent notation used in later work,
\[
|\psi\rangle = \sum_{i=1}^{R} c_i |\phi_i\rangle,
\]
with \(R\) the number of stabiliser terms and \(\chi(|\psi\rangle)\) the minimal such number [2202.09202].

The operational motivation is strong simulation. Because stabiliser states, Clifford circuits, and stabiliser measurements are simulable in polynomial time by Gottesman–Knill, a state written as a finite linear combination of stabiliser states can also be simulated provided the number of terms is not too large [2109.01076]. For exact probabilities, one route is to compute
\[
\|\psi\|^2 \;=\; \sum_{i,j=1}^{K}\alpha_i\,\alpha_j^*\,\langle \phi_j \mid \phi_i\rangle,
\]
with total cost \(O(K^2\,\mathrm{poly}(n))\), so \(K\) is the dominant complexity driver [2109.01076]. In the cost model emphasized in the graphical literature, each stabiliser term costs \(\mathrm{poly}(n)\) to simulate, giving overall cost roughly \(O(\mathrm{poly}(n)\cdot R)\) [2202.09202].

The standard non-Clifford resource is the \(T\) gate,
\[
T = \mathrm{diag}(1,e^{i\pi/4}),
\]
or its associated magic state
\[
|T\rangle = T|+\rangle = \frac{|0\rangle + e^{i\pi/4}|1\rangle}{\sqrt{2}},
\]
equivalently denoted \(|A\rangle\) in the 2021 treatment of magic-state injection [2202.09202][2109.01076]. Naively,
\[
|T\rangle^{\otimes t} = (1/\sqrt{2})^t \sum_{x\in\{0,1\}^t} e^{i\pi/4 \cdot wt(x)} |x\rangle,
\]
which yields \(R=2^t\) stabiliser terms and is generally impractical for strong simulation [2202.09202].

To compare decompositions, the literature uses an exponential rate \(\alpha\). If a block reduction removes \(r\) non-Clifford spiders using \(p\) stabiliser terms, then
\[
R \sim p^{t/r} = 2^{\alpha t},\qquad \alpha = (\log_2 p)/r
\]
[2202.09202]. Equivalently, if a decomposition of a circuit with \(t\) non-Clifford spiders yields \(n\) Clifford terms, then
\[
\alpha = \frac{\log_2 n}{t}
\]
[2412.17182]. Lower \(\alpha\) means fewer terms asymptotically.

A related quantity appears in Monte Carlo-style simulation. For
\[
|\psi\rangle = \sum_{j=1}^{\chi} \alpha_j\, |\phi_j\rangle,
\]
the sum of magnitudes \(S=\sum_j |\alpha_j|\) governs sampling complexity: larger \(S\) implies larger variance and runtime [2509.01224]. Cutting stabiliser decomposition is therefore relevant both to exact strong simulation and to sampling-based estimators.

## 2. ZX-calculus representation and the meaning of a cut

The method is formulated in the ZX-calculus, where circuits are represented as diagrams built from Z-spiders, X-spiders, Hadamards, and wires [2202.09202]. Clifford+T circuits are translated into ZX-diagrams, reduced to graph-like form, and simplified by spider fusion, colour change, bialgebra/Hopf laws, local complementation, pivoting, and phase-gadget transformations [2109.01076]. In reduced graph-like form, all spiders are Z-spiders connected by Hadamard edges, and simplification removes easy Clifford structure while exposing phase gadgets and other motifs [2202.09202][2109.01076].

In this setting, “cutting” means replacing a chosen spider or vertex by a small exact sum. A basic spider-cut identity is
\[
S_Z^{m,n}(\phi) = a(\phi) S_Z^{m,n}(0) + b(\phi) S_Z^{m,n}(\pi),
\]
where
\[
a(\phi) = (1 + e^{i\phi})/2,\qquad b(\phi) = (1 - e^{i\phi})/2
\]
[2403.10964]. Each cut doubles the number of terms, so applying it indiscriminately to every \(T\)-spider produces \(2^t\) terms and \(\alpha=1\) [2403.10964][2412.17182].

The point of the method is not the local cut by itself, but the simplification it unlocks. A strategically placed cut can separate neighborhoods, align target sets of phase gadgets, and allow \(\pi/4\) phases to fuse into Clifford phases or cancel outright [2109.01076][2412.17182]. In the general vertex-cut formalism,
\[
I \;=\; |0\rangle\!\langle 0| \;+\; |1\rangle\!\langle 1|,
\]
and inserting this identity at a vertex splits the diagram into branches that are then reduced independently [2412.17182]. The 2024 dynamic-decomposition paper makes this explicit by distinguishing the local efficiency of the decomposition from the post-simplification effective efficiency \(\alpha_{\mathrm{eff}}\), with
\[
\alpha_{\mathrm{eff}} \le \alpha
\]
[2412.17182].

Several ZX substructures are especially important. A phase gadget is a central Z-spider of phase \(\pi/4\) connected by Hadamard edges to \(k\) neighbours; in reduced form, an \(n\)-legged phase gadget corresponds to a cat state
\[
|cat_n\rangle := (1/\sqrt{2}) (I^{\otimes n} + Z^{\otimes n}) |T\rangle^{\otimes n}
\]
[2202.09202]. Cat gadgets, pairs of overlapping phase gadgets, and “lone phase” hubs became standard cutting targets precisely because ZX simplification can turn their post-cut branches into Clifford diagrams or diagrams with very small residual T-count [2202.09202][2412.17182].

## 3. Major decomposition families

The development of cutting stabiliser decomposition proceeded by enlarging the class of admissible cuts while retaining exactness.

The 2021 reduced-stabiliser-decomposition method combined chunked magic-state decompositions with eager ZX simplification. It began from product decompositions such as the pairwise identity
\[
|A\rangle^{\otimes 2} \;=\; \frac{1}{2}\big(|00\rangle + i\,|11\rangle\big) \;+\; \frac{e^{i\pi/4}}{2}\big(|01\rangle + |10\rangle\big),
\]
and from the Bravyi–Smith–Smolin \(6\)-to-\(7\) decomposition for six magic states, giving \(K\sim 7^{M/6}=2^{\alpha M}\) with \(\alpha\approx 0.468\) [2109.01076]. The core advance was to interleave each chunk decomposition with ZX simplification so that the effective non-Clifford count \(M_{\mathrm{eff}}\) could be much smaller than the raw \(T\)-count \(M\) [2109.01076].

The 2022 partial-and-graphical method made the cut itself structural. Instead of decomposing only \(|T\rangle^{\otimes r}\) blocks, it cut favorable entangled subdiagrams detected in the ZX diagram. This included cat-state cuts and a partial \(4\)-to-\(3\) reduction on a \(5\)-qubit magic pack, which removes \(4\) \(T\)-spiders at the cost of \(3\) stabiliser terms and therefore achieves
\[
\alpha = (\log_2 3)/4 \approx 0.396
\]
for any circuit with \(t \ge 5\) [2202.09202]. The same paper gave best-structural-case rates of \(\alpha=1/4=0.25\) for \(|cat_4\rangle\), \(\alpha\approx 0.264\) for \(|cat_6\rangle\), \(\alpha\approx 0.317\) for \(|cat_5\rangle\), and \(\alpha=1/3\) for \(|cat_3\rangle\) [2202.09202].

The 2024 procedural-optimization work reframed the problem as choosing an optimal pattern of vertex cuts in a ZX-diagram to maximize T-count reduction at the cost of the fewest cuts [2403.10964]. It assigned weights to vertices according to how many T-like gates they were blocking from fusing or cancelling, propagated those weights through higher tiers of blockers, and then cut the highest-weight candidates first [2403.10964]. For circuits small enough to verify, this heuristic found the most optimal set of cuts possible \(71\%\) of the time [2403.10964].

The 2024 dynamic T-decomposition work then showed that even the most generalized T-decomposition, namely vertex cutting with baseline \(\alpha=1\), can yield very strong \(\alpha_{\text{eff}\ll1}\) once paired with ZX simplification on appropriate motifs [2412.17182]. It identified four dynamic motif families with efficiencies
\[
\alpha=\frac{1}{n},\qquad \alpha=\frac{1}{2n+1},\qquad \alpha=\frac{1}{2n+2},\qquad \alpha=\frac{1}{n+2}
\]
for lone phase, multi-cat3, pair, and pair-phase decompositions respectively [2412.17182].

| Family | Block or motif | Rate |
|---|---|---|
| Bravyi–Smith–Smolin chunking | \(6\) magic states \(\rightarrow 7\) terms | \(\alpha\approx 0.468\) |
| Partial reduction | \(4\)-to-\(3\) | \(\alpha\approx 0.396\) |
| Cat-state cut | \(|cat_4\rangle\) | \(\alpha=0.25\) |
| Cat-state cut | \(|cat_6\rangle\) | \(\alpha\approx 0.264\) |
| Dynamic lone-phase motif | \(2\) terms eliminate \(n\) T-spiders | \(\alpha=1/n\) |

These families are exact rather than approximate. Their common logic is that one spends a small number of branches to unlock many ZX-calculus cancellations in each branch.

## 4. Algorithmic workflow and heuristics

The basic interleaved workflow is stable across the literature. A Clifford+T circuit \(U\), together with chosen inputs and outputs or postselection effects, is first translated to a ZX-diagram; the diagram is then converted to graph-like form and simplified; a chunk, gadget, or vertex is selected; the selected region is decomposed into a small stabiliser sum; and each child diagram is immediately simplified before further cuts are chosen [2109.01076][2202.09202].

In the 2021 strong-simulation pipeline, the steps are: translate \(U\) to a ZX-diagram, simplify to graph-like form, identify a chunk of \(2\)–\(6\) non-Clifford spiders, unfuse a \(\pi/4\) component on each selected spider, apply a chunked stabiliser decomposition such as the \(6\)-to-\(7\) Bravyi–Smith–Smolin identity, re-simplify each child, and iterate until no non-Clifford spiders remain [2109.01076]. The same paper emphasized that eager simplification improves the dominant term from \(O(2^{\alpha M}M^3)\) to \(O(2^{\alpha M}M^2)\) in amplitude computation, with an initial \(O(N^3)\) graph-like simplification cost where \(N\) is the gate count [2109.01076].

In the cat-based 2022 method, the reduction loop scans internal Clifford spiders of phase \(0\) or \(\pi\) and arity \(m\in\{3,4,5,6\}\), treating the corresponding star-shaped neighborhoods as cat gadgets when possible [2202.09202]. The prescribed preference order is arity \(4\), then \(6\), then \(5\), then \(3\), matching the available \(\alpha\) values \(0.25\), \(0.264\), \(0.317\), and \(1/3\) [2202.09202]. If no cat gadget exists, the fallback is the partial \(4\)-to-\(3\) reduction on a pack of \(5\) T-spiders [2202.09202].

The procedural-optimization heuristic of 2024 made cut selection explicit. Initial weights \(w^0(u)\) are assigned to blocking CNOT endpoints by distributing \(2/k\) over the \(k\) blockers on minimal paths between T-like spiders that could fuse if those blockers were removed [2403.10964]. Weights are then propagated across tiers using
\[
\gamma(w)=\min(w/2,1),
\]
and a candidate vertex is cut only when its score suggests that the cut is likely to unlock at least two T cancellations across the two branches [2403.10964].

The dynamic-decomposition variant can be read as a higher-level policy layer on top of this interleaving. It first checks whether a standard cat-state or magic-\(5\) decomposition is best, then searches for dynamic motifs whose estimated \(\alpha\) beats the best available static alternative, applies the relevant cut, and runs a full ZX rewrite pass before the next decision [2412.17182]. This implies a simulator architecture in which motif detection, branch-local simplification, and adaptive cut selection are coupled rather than separated.

QuiZX is the principal implementation framework named in this literature, providing circuit-to-ZX translation and the reduction strategy used in the 2022 partial-and-graphical work [2202.09202]. The 2025 cultivation study states that the input circuit is converted to a ZX-diagram “e.g., with PyZX,” then simplified and cut procedurally [2509.01224].

## 5. Empirical performance and applications

The 2021 reduced-stabiliser-decomposition paper reported exact norm calculations and strong simulation on random \(50\)- and \(100\)-qubit Clifford+T circuits with up to \(70\) T-gates and on hidden-shift circuits with over \(1000\) T-gates [2109.01076]. For random exponentiated-Pauli circuits under a \(5\)-minute timeout on a \(24\)-core Xeon, the success rates were \(100\%\) up to \(T=30\), \(88\%\) at \(T=40\), \(4\%\) at \(T=50\), and \(0\%\) above for \(50\) qubits; and \(100\%\) up to \(T=50\) with all but one failed at \(T=50\), \(44\%\) at \(T=60\), and \(10\%\) at \(T=70\) for \(100\) qubits [2109.01076]. For \(50\) qubits and \(T=40\), naive strong simulation on doubled circuits required roughly \(N\cdot 7^{2T/6}\approx 9\times 10^{12}\) terms, whereas ZX-interleaved decomposition produced on average \(K\approx 2.6\times 10^6\) terms, a \(6\)-order reduction; at higher T-counts, the reduction reached up to \(15\) orders of magnitude [2109.01076].

The 2022 cat-state paper reported that the new partial-and-graphical method could reliably simulate \(50\)-qubit \(1400\) T-count hidden shift circuits in a couple of minutes on a consumer laptop [2202.09202]. More specifically, \(98\%\) of random hidden-shift instances completed within \(5\) minutes on an Intel Core i5-10400H, \(2.60\) GHz, and the remaining \(2\%\) finished within \(6\) minutes [2202.09202]. On hidden-shift circuits with \(20\) qubits and T-count \(112\), the variance of runtimes on a log scale dropped from approximately \(3.02\) for the previous method to approximately \(0.523\) for the cat-based method [2202.09202]. On random \(20\)-qubit Clifford+T circuits up to \(t=43\), average runtimes were about an order of magnitude better with cat-based cutting [2202.09202].

The 2024 procedural-optimization paper focused on pseudo-structured circuits produced from CNOTs, phase gates, and Toffolis. It reported “consistent improvements of orders of magnitude,” with effective efficiency \(0.1\lesssim\alpha\lesssim0.2\), and stated that there is no upper bound for the efficiency achieved by the method, allowing in principle \(\alpha\rightarrow0\) for highly structured circuits [2403.10964].

The 2025 cultivation application demonstrated the relevance of cutting beyond generic circuit benchmarks. For the \(d=3\) magic state cultivation variant, the initial circuit has T-count \(15\); after two cuts and ZX simplification, each branch has a single \(T\) or \(T^\dagger\) spider, and the final expansion yields a \(4\)-term stabiliser decomposition [2509.01224]. For the \(d=5\) variant, the initial circuit has T-count \(53\); reusing the \(d=3\) decomposition inside the larger circuit and applying further cuts yields an \(8\)-term stabiliser decomposition [2509.01224]. In both cases, the paper attributes the reduction to cut placement aligned with the postselected measurement structure.

## 6. Limits, related methods, and terminological scope

The method is exact. The cuts are exact stabiliser decompositions, not sampling approximations, and the 2021 framework notes exact amplitudes and marginals with exact numbers in \(\mathbb{D}[e^{i\pi/4}]\); probabilities take the form
\[
\frac{1}{2^k}(x+y\sqrt{2})
\]
[2109.01076]. This distinguishes cutting stabiliser decomposition from quasiprobability sampling, Monte Carlo stabiliser-extent methods, and other approximate techniques whose costs depend on negativity or on the number of samples required for a target error [2109.01076][2509.01224].

A common misconception is that the method amounts to decomposing every \(T\) gate independently. In the ZX-based literature, the opposite is emphasized: one cuts only those vertices, spiders, or subdiagrams whose removal is expected to trigger substantial fusion, cancellation, gadget merging, or elimination of Clifford substructure [2202.09202][2403.10964]. Another misconception is that the best available asymptotic \(\alpha\) always dominates practical performance. The dynamic-decomposition results were introduced precisely to show that apparently weaker local decompositions can yield better overall efficiency once post-cut ZX simplification is taken into account [2412.17182].

The main limitation is that exponential dependence remains. The 2021 paper states that worst-case circuits with dense, “incompressible” non-Clifford interactions still scale poorly, and the 2022 paper gives \(\alpha\approx 0.396\) as the worst-case guarantee when one repeatedly applies the partial \(4\)-to-\(3\) cut in diagrams with few or no usable cat gadgets [2109.01076][2202.09202]. The best gains occur when ZX reduction exposes phase gadgets, especially arity \(4\) or \(6\), when repeated neighborhoods permit gadget merging, or when doubled diagrams create cancellations between \(U\) and \(U^\dagger\) [2109.01076][2202.09202].

The method sits alongside several other classical-simulation paradigms. The literature contrasts it with quasiprobability sampling, tensor-network contraction, and path-sum or ZH-calculus methods [2109.01076]. Tensor networks can excel on low-depth or low-connectivity circuits, but exact contraction can remain exponential and may perform poorly on global highly entangling circuits [2109.01076]. Path-sum and ZH-calculus methods are described as powerful for Toffoli- or CCZ-heavy circuits, though hyperedge growth can be problematic if not carefully managed [2109.01076]. Cutting stabiliser decomposition is therefore best understood as a structure-sensitive exact alternative rather than a universal replacement.

The phrase also has a distinct terminological scope outside this quantum-simulation setting. In an unrelated optimisation paper, “Cutting Stabiliser Decomposition” is used for a stabilised cutting-plane scheme based on Benders decomposition with adaptive oracles for multi-horizon stochastic programming in power-system investment planning [2209.03471]. In adjacent quantum-error-correction work, “cutting” refers instead to distance-preserving rewrites that decompose high-weight stabiliser measurements into single- and two-qubit operations while preserving distance and logical count [2410.17240]. Within quantum-circuit simulation, however, the term denotes the ZX-calculus program of targeted cuts plus aggressive graphical simplification to minimise stabiliser-term growth.

Source: https://www.emergentmind.com/topics/cutting-stabiliser-decomposition