Home

ZXcalculus

ZX-calculus is a graphical language for reasoning about quantum computation and information, using diagrams to represent linear maps between qubits. Diagrams are built from two kinds of nodes, called Z-spiders and X-spiders, each labeled by an angle (a phase). Wires carry quantum systems; composition is sequential or parallel; the Hadamard gate is used to switch between the Z and X bases.

Z-spiders are usually drawn green and X-spiders red; a spider can have multiple legs and a phase

Rewrite rules encode the algebraic properties used to manipulate diagrams. The spider fusion rule merges two

Semantically, each diagram denotes a linear map between finite-dimensional Hilbert spaces; the rules are sound, meaning

History and tools: introduced by Coecke and Duncan in the late 2000s, the calculus has become a

angle
that
modifies
the
map.
A
Hadamard
edge
connects
a
Z-spider
to
an
X-spider,
implementing
a
basis
change.
The
value
of
a
diagram
is
the
linear
map
obtained
by
composing
and
tensoring
the
mapped
components.
same-color
spiders
connected
by
a
wire,
adding
their
phases.
The
color-change
rule
uses
Hadamard
edges
to
switch
between
Z
and
X
spiders.
Additional
rules
express
the
bialgebra
and
Hopf
structure
that
governs
interactions
between
the
two
bases,
ensuring
consistent
composition
and
allowing
simplifications
to
proceed.
equivalent
diagrams
denote
the
same
map.
The
ZX-calculus
is
universal
for
pure
qubit
quantum
mechanics,
and
complete
axiomatisations
exist
for
important
fragments
(notably
Clifford+T);
ongoing
work
extends
completeness
to
broader
classes.
It
is
widely
used
to
reason
about
and
simplify
quantum
circuits
and
protocols.
standard
in
quantum
diagrammatic
reasoning.
It
underpins
tools
such
as
PyZX
and
Quantomatic,
which
automate
diagrammatic
rewrites
for
circuit
optimization
and
verification.
Applications
include
quantum
circuit
synthesis,
teleportation
and
error-correction
proofs,
and
visualization
of
entanglement
structure.