ZX-Flow in Quantum Computing
- ZX-Flow is a flow-theoretic framework in quantum computing that defines determinism and circuit extraction via diagrammatic rewriting.
- It extends traditional Pauli flow into a ZX-native criterion, ensuring deterministic MBQC for arbitrary ZX-diagrams under Clifford rewrites.
- The framework enables efficient circuit extraction and optimisation by decomposing ZX-diagrams into Clifford isometries and Pauli exponentials.
ZX-Flow is a flow-theoretic framework for ZX-diagrams in quantum computing that links diagrammatic rewriting, deterministic measurement-based quantum computation, and efficient circuit extraction. In the available literature, the expression is used for two closely related developments. Earlier work used it for the interplay between Pauli flow in MBQC and ZX-calculus rewrite rules that preserve it, even when rewrites add qubits or change measurement angles (McElvanney et al., 2023). Later work introduced ZX-flow as a new ZX-native flow criterion for arbitrary ZX-diagrams, formulated in terms of Pauli semiwebs, and proved that a diagram has ZX-flow if and only if it is Clifford-equivalent to a graph-like ZX-diagram with Pauli flow (Kissinger et al., 10 Mar 2026).
1. MBQC origins and graph-like flow notions
ZX-Flow is rooted in the one-way model of measurement-based quantum computation, where computation proceeds by measurements on a graph-state-like resource. A standard abstraction is a labelled open graph
with graph , input set , output set , and measurement-type map
Determinism means that, for all branches of measurement outcomes, the same linear map is implemented up to global phase and possibly Pauli corrections on outputs. In this setting, Pauli flow is the most general flow notion used in the 2023 rewrite-rule literature, while flow and gflow arise as restrictions; specifically,
Pauli flow guarantees strong, stepwise and uniform determinism (McElvanney et al., 2023).
The Pauli-flow definition is given in terms of a correction-set map , a partial order , and the odd-neighbourhood operator
Its nine conditions constrain where - and 0-type corrections may land, how 1-measurements behave, and how measurement planes interact with the order relation. The paper also uses focused Pauli flow, and states that every Pauli flow can be converted to a focused one (McElvanney et al., 2023).
In the ZX-calculus, MBQC patterns are represented by MBQC-form or graph-like ZX-diagrams. Earlier circuit-extraction results relied on these restricted forms: a graph-like diagram is essentially a graph-state diagram with phase labels and boundary attachments, and flow structure supplies the temporal or causal information needed for extraction. This graph-state dependence motivated the later search for a genuinely ZX-native notion of flow.
2. From graph-state restrictions to a ZX-native criterion
The 2026 formulation begins from a limitation of earlier flow notions: causal flow, generalised flow, and Pauli flow were all originally formulated for graph states, so they require ZX-diagrams to be in a very particular graph-state-like form. Basic ZX rewrites such as spider fusion and colour change easily leave that fragment by introducing X-spiders, interior Hadamards, or other non-graph-like structure. As a result, one previously had to force diagrams back into graph-like form through specialised, flow-preserving transformations, which constrained the rewrite system and complicated proofs of invariance (Kissinger et al., 10 Mar 2026).
ZX-flow addresses that limitation by defining flow directly on arbitrary ZX-diagrams. The key statement is that it is a "ZX-native" flow criterion that works for diagrams with Z-spiders, X-spiders, and H-gates throughout, is straightforwardly preserved by all Clifford rewrites, and is exactly as expressive as Pauli flow up to Clifford equivalence. Formally, the main structural theorem states that a ZX-diagram 2 has ZX-flow if and only if it is Clifford-equivalent to a graph-like ZX-diagram 3 with Pauli flow (Kissinger et al., 10 Mar 2026).
This equivalence is conceptually important. ZX-flow is not presented as a rival to Pauli flow, nor as a stronger determinism criterion in the graph-state sense. Rather, it is the Clifford-closure of Pauli flow. A common source of confusion is to identify ZX-flow with Pauli flow directly; the literature instead distinguishes them sharply. In graph-like diagrams, strong ZX-flow coincides with Pauli flow, but ZX-flow itself applies to a much broader syntactic class.
3. Pauli semiwebs and the formal definition of ZX-flow
The central technical device is the Pauli semiweb, introduced as a generalisation of Pauli webs. A Pauli web is a Pauli operator on all wires of a ZX-diagram such that each local component is an eigenstate of the restriction of that operator. Semiwebs weaken this by allowing local phase shifts at some nodes, called defects. For a node 4, a Pauli operator 5 is a semiweb when there exist an angle 6 and scalar 7 such that
8
If 9, the node is an 0-defect. For spiders, the twisted local state is obtained by adding 1 to the spider phase; for H-gates, the twist has no effect (Kissinger et al., 10 Mar 2026).
The combinatorial characterization is especially concise. A Pauli operator is a semiweb if and only if it satisfies the H condition and the all-or-nothing condition at all nodes. The H condition requires each H-gate to see one of 2 on its incident wires. The all-or-nothing condition requires opposite-type support at each spider to be either present on all incident legs or on none. In contrast with Pauli webs, semiwebs do not require the parity condition for same-type support, and they do not require opposite-type support to occur only at Clifford spiders. Failures of those dropped conditions appear as defects. The product of semiwebs is again a semiweb (Kissinger et al., 10 Mar 2026).
To organise semiwebs, the paper introduces basic semiwebs and edge semiwebs. A basic semiweb 3 is the smallest semiweb with opposite-type support on a leg adjacent to a spider 4. An edge semiweb colours exactly one edge. The generation theorem states that any semiweb can be written as
5
where 6 is a product of edge semiwebs and 7 is a set of spiders. In graph-like diagrams, this decomposition is unique, and the generating set 8 is precisely what becomes the correction set in Pauli flow (Kissinger et al., 10 Mar 2026).
Using these objects, ZX-flow is defined on a ZX-diagram 9 with non-Clifford spider set 0. A ZX-flow consists of a partial order 1 on 2, logical semiwebs 3 and 4 for each input wire 5, and a flow semiweb 6 for each non-Clifford spider 7, such that 8 has a 9-defect at 0 and all other defects only at non-Clifford spiders 1 with 2. Strong ZX-flow extends the order and flow semiwebs to all spiders. Focused ZX-flow requires the logical semiwebs to satisfy the parity condition everywhere, and each flow semiweb 3 to satisfy parity at every spider other than 4. The focusing theorem states that a diagram admits (strong) ZX-flow if and only if it admits a focused (strong) ZX-flow (Kissinger et al., 10 Mar 2026).
4. Equivalence to Pauli flow and preservation under rewrites
On graph-like diagrams, strong ZX-flow and Pauli flow are equivalent. The paper rewrites Pauli flow in a compact form using correction sets 5 and the anti-commutation sets
6
where 7 is symmetric difference. In this formulation, an open graph has Pauli flow if there exist 8 such that local anticommute and causal conditions hold: 9 and
0
The corresponding lemma then states that a graph-like ZX-diagram has strong ZX-flow if and only if its induced open graph has Pauli flow (Kissinger et al., 10 Mar 2026).
The main equivalence theorem elevates that graph-like correspondence to arbitrary diagrams: 1 Here the relevant rewrite system is the extended Clifford ZX-calculus, including spider fusion, colour change, 2-stabiliser rules, strong complementarity, H-identity, identity rules, and scalar rules, restricted so that Clifford structure is manipulated without introducing new non-Clifford phases from Clifford ones (Kissinger et al., 10 Mar 2026).
Rewrite preservation is one of the criterion’s defining features. The paper states that the rules of the extended Clifford ZX-calculus preserve ZX-flow. It also gives a more specific theorem for spider fusion: fusion of a pair of non-Clifford spiders preserves ZX-flow from left to right, and conversely preserves ZX-flow from right to left as long as one does not unfuse a Clifford spider into two non-Clifford spiders (Kissinger et al., 10 Mar 2026).
This invariance is mediated by a transport property of Pauli webs across Clifford rewrites. If two Clifford-only ZX-diagrams denote the same linear map, then any Pauli web on one can be turned into some Pauli web on the other with the same pattern on boundary wires. On purely Clifford rewrite regions, semiwebs are ordinary Pauli webs and can therefore be moved across the rewrite while preserving boundary action and defect locations. When a rewrite touches non-Clifford spiders, the proof constructs new flow semiwebs explicitly and checks the defect-order constraints case by case (Kissinger et al., 10 Mar 2026).
5. Computational interpretation and circuit extraction
ZX-flow has two computational interpretations. The first is as a deterministic MBQC semantics for arbitrary ZX-diagrams. Each non-Clifford spider is treated as a measurement in an appropriate basis, and its flow semiweb 3 describes how an unwanted 4-shift induced by a measurement outcome can be removed at 5 and pushed forward as phase changes on later non-Clifford spiders or outputs. Because all other defects of 6 lie at 7, the corresponding feed-forward dependencies are acyclic, and the computation is deterministic in the MBQC sense (Kissinger et al., 10 Mar 2026).
The second interpretation is as a decomposition into a Clifford isometry followed by Pauli exponentials. For a Pauli string 8 and angle 9, a Pauli exponential is
0
If 1, then
2
so Pauli exponentials commute through Clifford structure in the same way as Pauli operators. Using focused ZX-flow, one repeatedly selects a 3-maximal non-Clifford spider, unfuses it into a one-legged spider, and pushes it to the outputs as a Pauli exponential. What remains is a Clifford ZX-diagram 4. The resulting theorem states: 5 where the 6 are determined by the output colourings of the flow semiwebs and the logical operators of 7 are given by the output colourings of the logical semiwebs 8 and 9 (Kissinger et al., 10 Mar 2026).
This yields an explicit extraction route. The Clifford isometry 0 is specified by a stabiliser tableau and can be turned into a Clifford circuit in polynomial time. Each Pauli exponential 1 can be realised by a standard parity-collection construction using CNOT chains and a single-qubit rotation. The paper therefore concludes that existence of ZX-flow implies efficient circuit extraction with at most polynomial blow-up in diagram size (Kissinger et al., 10 Mar 2026).
6. Earlier flow-preserving rewrites, optimisation, and limitations
Before the 2026 criterion, the main flow-focused line of work operated on MBQC-form or graph-like diagrams and preserved Pauli flow or causal flow by explicitly designed rewrites. The 2023 paper "Flow-preserving ZX-calculus Rewrite Rules for Optimisation and Obfuscation" introduced several ZX-calculus rewrite rules that increase the number of qubits and preserve the existence of Pauli flow, including rules converting 2 measurements to 3, converting 4 measurements to 5, subdividing an edge with two new 6-measured qubits, and a vertex splitting transformation that gives the first Pauli-flow-preserving rule allowing arbitrary changes of measurement angles. It also proved that neighbour unfusion preserves Pauli flow and showed that any MBQC pattern with Pauli flow can be transformed into one where every measurement lies in 7 (McElvanney et al., 2023).
That work established a practical precursor to ZX-flow in the narrower graph-like setting. It showed that one can perform qubit-increasing, angle-changing, and plane-changing rewrites while maintaining deterministic implementability and circuit extractability. It also exposed an important limitation: these transformations preserve Pauli flow, but not necessarily gflow. The paper gives a concrete example where gflow breaks after introducing an 8 leaf while Pauli flow survives, and it leaves the exact characterization of gflow preservation for neighbour unfusion open (McElvanney et al., 2023).
A related but stricter framework appears in "Causal flow preserving optimisation of quantum circuits in the ZX-calculus", which preserves causal flow on graph-like diagrams during optimisation. There the payoff is trivial extraction and an exact two-qubit-gate count
9
Using causal-flow-preserving local simplifications, phase teleportation, and generalised neighbour unfusion, the reported algorithm reduced the two-qubit gate count by an average of 19.8%, improving on the prior ZX-based strategy at 14.6% and the non-ZX strategy at 18.5% (Holker, 2023).
These results clarify the position of ZX-flow within the broader ZX-calculus literature. It is not merely a collection of local optimisation rules, nor only a translation of MBQC flow conditions into diagrammatic language. Rather, it is a criterion that identifies exactly those arbitrary ZX-diagrams that remain within the deterministically executable, efficiently extractable fragment after unrestricted Clifford rewriting. At the same time, several open problems remain. The 2026 paper states that semiweb computation reduces to linear algebra over 0 and mentions that a naive greedy algorithm for finding ZX-flow would be 1, suggesting room for better algorithms. The earlier Pauli-flow-preserving rewrite literature identifies unresolved questions about gflow preservation, extraction quality, and the integration of Pauli-gadget optimisation with Pauli-flow-based extraction (Kissinger et al., 10 Mar 2026, McElvanney et al., 2023).