ZX-Flow: A Flexible Criterion for Deterministic Computation with ZX-Diagrams

Aleks Kissinger and John van de Wetering

QPL, Amsterdam 2026

ZX-calculus

ZX := a handy tool for working with quantum
computations using graph rewriting



Optimisation Simulation & Verification Error Correction

ZX Diagrams

...give a compact, flexible way to write computations:

$\Rightarrow$

Q: How do you run one?

A1: Circuit extraction

A2: MBQC

The problem

arXiv:2202.09194

...in fact, it is highly unlikely* that there is any efficient way to "run" a ZX diagram on a quantum computer


* unless QCs can solve NP-complete problems!

Solution

Restrict to ZX-diagrams satisfying some extra sufficient conditions, called flow criteria that make circuit extract efficient.

causal flow  →  generalised flow  →  Pauli flow


Some issues with flow

Flow criteria are defined for graph states, so ZX diagrams must be kept in graph-like form

Consequence: all of the basic ZX rules...

...break flow criteria!

  • Derived rules like local complementation preserve flow criteria
  • ...but need to be checked 1-by-1, and proofs can get nasty

ZX-flow

A ZX-native flow criterion, based on Pauli semiwebs

  • Preserved by all Clifford rewrites, with simple proofs
  • $D$ has ZX-flow $\iff$ Clifford-equivalent to $D'$ with Pauli flow
  • Intuitive circuit extraction

Pauli webs

Def: A Pauli string $\vec w \in \mathcal P_{|W|}$ is a Pauli web for a diagram $D$ if every node is an eigenstate for the Pauli operator colouring its neighbourhood


$\Rightarrow$
$(Z \otimes Y)|$$\rangle = -|$$\rangle$
$(Z \otimes Z \otimes I \otimes I)|$$\rangle = |$$\rangle$
$(Z \otimes X)|$$\rangle = |$$\rangle$
$(Z \otimes Y \otimes Y)|$$\rangle = |$$\rangle$
$(X \otimes Y)|$$\rangle = |$$\rangle$

Pauli webs and stabilisers

Theorem: A Pauli $\vec P$ stabilises a Clifford ZX-diagram $D$ iff there exists a Pauli web coloring the boundary of $D$ according to $P$.



For states, the Pauli webs give stabiliser generators:

Pauli webs and stabilisers

For Clifford unitaries, Pauli webs give the stabiliser tableau:

Pauli webs and stabilisers

For Clifford isometries, a.k.a. stabiliser codes, Pauli webs give stabilisers + logical operators:

  

Problem: webs stop at non-Clifford spiders

Idea: generalise to allow local violations web condition, called defects

Pauli semiwebs

Def: A Pauli string $\vec w \in \mathcal P_{|W|}$ is a Pauli semiweb for a diagram $D$ if every node is an eigenstate for the Pauli operator colouring its neighbourhood, up to a phase.


$\Rightarrow$
$(Z \otimes Y)|$$\rangle = -|$$\rangle$
$(Z \otimes Z \otimes I \otimes I)|$$\rangle = |$$\rangle$
$(Z \otimes X)|$$\rangle = |$$\rangle$
$(Z \otimes Y \otimes Y)|$$\rangle = |$$\rangle$
$(X \otimes Y)|$$\rangle = \lambda|$$\rangle$

ZX-flow

Def: A ZX-flow for diagram $D$ consists of a partial order $\preceq$ on the non-Clifford spiders, plus the following semiwebs:

  • for each input $i$: semiwebs $\ell_Z(i)/\ell_X(i)$ that color just the
    $i$-th input $Z/X$ and only have defects at non-Clifford spiders
    (logical semiwebs)

  • for each non-Clifford spider $\nu$: a semiweb $f(\nu)$ with a $\pi$-defect at $\nu$ and all other defects at future non-Clifford spiders $\nu' \succeq \nu$
    (flow semiwebs)

Example

$($ $\preceq$ $)$

Reading it as MBQC

non-Clifford spider = adaptive single-qubit measurement

wrong outcome?  fire $f(\nu)$

the $\pi$ cancels; future angles get adapted at the defects

Clifford rewrites preserve ZX-flow

Semiwebs have no defects near Clifford spiders,
so they update locally:

The extended Clifford ZX-calculus

All of these preserve ZX-flow.

Main theorem 1


$D$ has ZX-flow

$\iff$

$D$ is Clifford-equivalent to a graph-like $D'$ with Pauli flow


idea:

  • Use preservation of ZX-flow by Clifford rules to reduce to graph-like ZX-diagrams.
  • Flow semiwebs in graph-like diagrams cannoically give correction sets for Pauli flow, and vice-versa.

Focusing

Like other kinds of flow criteria, ZX-flow can be focused, which means defects are pushed as far into the future as possible:

$($ $\preceq$ $)$

Focusing

Like other kinds of flow criteria, ZX-flow can be focused, which means defects are pushed as far into the future as possible:

$($ $\preceq$ $)$

Main theorem 2

Let $D$ be a diagram with a focused ZX-flow,
then it can be written as a circuit as follows:

where:

  • $\nu_1, \ldots, \nu_k$ ordered according to $\preceq$
  • $\alpha_k :=$ the phase of $\nu_k$
  • $\vec P_k :=$ restriction of $f(\nu_k)$ to outputs
  • $C$ = Clifford isometry with tableau given by $\ell_Z, \ell_X$

Extraction

Take $\nu$ maximal, unfuse it, then push it out along $f(\nu)$:

  $\implies$  

Repeat: strictly fewer non-Clifford spiders each time

Summary

  • ZX-flow is a flow criterion made for ZX diagrams
  • Simple preservation and extraction arguments
  • Paradigm-agnostic notion of "runnability"
  • TODO: interpretation in other paradigms (lattice surgery, Pauli-based computation, ...)
  • TODO: $O(n^3)$ ZX-flow finding (Backens/Mitosek style algorithm)

Thanks!

Paper: arXiv:2603.09580
   
https://zxcalc.github.io/book (free book!)
https://zxcalculus.com (300+ tagged papers, Discord, online seminar)