<s>
The	O
ZX-calculus	B-Device
is	O
a	O
rigorous	O
graphical	O
language	O
for	O
reasoning	O
about	O
linear	B-Architecture
maps	I-Architecture
between	O
qubits	O
,	O
which	O
are	O
represented	O
as	O
string	O
diagrams	O
called	O
ZX-diagrams	O
.	O
</s>
<s>
A	O
ZX-diagram	O
consists	O
of	O
a	O
set	O
of	O
generators	O
called	O
spiders	O
that	O
represent	O
specific	O
tensors	B-Device
.	O
</s>
<s>
These	O
are	O
connected	O
together	O
to	O
form	O
a	O
tensor	B-Device
network	O
similar	O
to	O
Penrose	O
graphical	O
notation	O
.	O
</s>
<s>
moving	O
the	O
generators	O
without	O
changing	O
their	O
connections	O
)	O
does	O
not	O
affect	O
the	O
linear	B-Architecture
map	I-Architecture
it	O
represents	O
.	O
</s>
<s>
In	O
addition	O
to	O
the	O
equalities	O
between	O
ZX-diagrams	O
that	O
are	O
generated	O
by	O
topological	O
deformations	O
,	O
the	O
calculus	O
also	O
has	O
a	O
set	O
of	O
graphical	B-Application
rewrite	I-Application
rules	I-Application
for	O
transforming	O
diagrams	O
into	O
one	O
another	O
.	O
</s>
<s>
The	O
ZX-calculus	B-Device
is	O
universal	O
in	O
the	O
sense	O
that	O
any	O
linear	B-Architecture
map	I-Architecture
between	O
qubits	O
can	O
be	O
represented	O
as	O
a	O
diagram	O
,	O
and	O
different	O
sets	O
of	O
graphical	B-Application
rewrite	I-Application
rules	I-Application
are	O
complete	O
for	O
different	O
families	O
of	O
linear	B-Architecture
maps	I-Architecture
.	O
</s>
<s>
ZX-diagrams	O
can	O
be	O
seen	O
as	O
a	O
generalisation	O
of	O
quantum	B-Application
circuit	I-Application
notation	I-Application
.	O
</s>
<s>
The	O
ZX-calculus	B-Device
was	O
first	O
introduced	O
by	O
Bob	O
Coecke	O
and	O
Ross	O
Duncan	O
in	O
2008	O
as	O
an	O
extension	O
of	O
the	O
categorical	O
quantum	O
mechanics	O
school	O
of	O
reasoning	O
.	O
</s>
<s>
In	O
2009	O
Duncan	O
and	O
Perdrix	O
found	O
the	O
additional	O
Euler	O
decomposition	O
rule	O
for	O
the	O
Hadamard	O
gate	O
,	O
which	O
was	O
used	O
by	O
Backens	O
in	O
2013	O
to	O
establish	O
the	O
first	O
completeness	O
result	O
for	O
the	O
ZX-calculus	B-Device
.	O
</s>
<s>
Namely	O
that	O
there	O
exists	O
a	O
set	O
of	O
rewrite	O
rules	O
that	O
suffice	O
to	O
prove	O
all	O
equalities	O
between	O
stabilizer	B-Device
ZX-diagrams	O
,	O
where	O
phases	O
are	O
multiples	O
of	O
,	O
up	O
to	O
global	O
scalars	O
.	O
</s>
<s>
Following	O
an	O
incompleteness	O
result	O
,	O
in	O
2017	O
,	O
a	O
completion	O
of	O
the	O
ZX-calculus	B-Device
for	O
the	O
approximately	O
universal	O
fragment	O
was	O
found	O
,	O
in	O
addition	O
to	O
two	O
different	O
completeness	O
results	O
for	O
the	O
universal	O
ZX-calculus	B-Device
(	O
where	O
phases	O
are	O
allowed	O
to	O
take	O
any	O
real	O
value	O
)	O
.	O
</s>
<s>
Also	O
in	O
2017	O
the	O
book	O
Picturing	O
Quantum	O
Processes	O
was	O
released	O
,	O
that	O
builds	O
quantum	O
theory	O
from	O
the	O
ground	O
up	O
,	O
using	O
the	O
ZX-calculus	B-Device
.	O
</s>
<s>
ZX-diagrams	O
represent	O
linear	B-Architecture
maps	I-Architecture
between	O
qubits	O
,	O
similar	O
to	O
the	O
way	O
in	O
which	O
quantum	B-Application
circuits	I-Application
represent	O
unitary	B-Algorithm
maps	O
between	O
qubits	O
.	O
</s>
<s>
ZX-diagrams	O
differ	O
from	O
quantum	B-Application
circuits	I-Application
in	O
two	O
main	O
ways	O
.	O
</s>
<s>
The	O
second	O
is	O
that	O
ZX-diagrams	O
come	O
equipped	O
with	O
a	O
set	O
of	O
rewrite	O
rules	O
,	O
collectively	O
referred	O
to	O
as	O
the	O
ZX-calculus	B-Device
.	O
</s>
<s>
The	O
building	O
blocks	O
or	O
generators	O
of	O
the	O
ZX-calculus	B-Device
are	O
graphical	O
representations	O
of	O
specific	O
states	O
,	O
unitary	B-Algorithm
operators	O
,	O
linear	O
isometries	O
,	O
and	O
projections	B-Algorithm
in	O
the	O
computational	O
basis	O
and	O
the	O
Hadamard-transformed	O
basis	O
and	O
.	O
</s>
<s>
+	O
ZX-calculus	B-Device
generators	O
,	O
informallyTypeGeneratorCorresponding	O
linear	O
mapRemarksstatealt	O
=	O
|frameless|50pxFor	O
and	O
,	O
this	O
map	O
corresponds	O
to	O
unnormalised	O
versions	O
of	O
the	O
Hadamard-transformed	O
basis	O
states	O
and	O
,	O
respectively	O
.	O
</s>
<s>
For	O
,	O
this	O
is	O
an	O
unnormalised	O
version	O
of	O
the	O
T	O
magic	O
state	O
.statealt	O
=	O
|frameless|50pxFor	O
and	O
,	O
this	O
map	O
corresponds	O
to	O
unnormalised	O
versions	O
of	O
the	O
computational	O
basis	O
states	O
and	O
,	O
respectively.unitary	O
mapalt	O
=	O
|frameless|80pxThis	O
map	O
is	O
a	O
rotation	O
about	O
the	O
Z-axis	O
of	O
the	O
Bloch	O
sphere	O
by	O
an	O
angle	O
.	O
</s>
<s>
For	O
,	O
it	O
is	O
the	O
Z	O
Pauli	O
matrix.unitary	O
mapalt	O
=	O
|frameless|80pxThis	O
map	O
is	O
a	O
rotation	O
about	O
the	O
X-axis	O
of	O
the	O
Bloch	O
sphere	O
by	O
an	O
angle	O
.	O
</s>
<s>
For	O
,	O
it	O
is	O
the	O
X	O
Pauli	O
matrix.unitary	O
mapalt	O
=	O
|center|50pxThis	O
map	O
is	O
the	O
Hadamard	O
gate	O
often	O
used	O
in	O
quantum	O
circuits.isometryalt	O
=	O
|frameless|80pxFor	O
,	O
this	O
map	O
represents	O
a	O
copy	O
operation	O
in	O
the	O
computational	O
basis	O
.	O
</s>
<s>
These	O
laws	O
correspond	O
to	O
the	O
composition	O
and	O
tensor	B-Device
product	O
of	O
linear	B-Architecture
maps	I-Architecture
.	O
</s>
<s>
Two	O
diagrams	O
represent	O
the	O
same	O
linear	B-Architecture
operator	I-Architecture
if	O
they	O
consist	O
of	O
the	O
same	O
generators	O
connected	O
in	O
the	O
same	O
ways	O
.	O
</s>
<s>
In	O
other	O
words	O
,	O
whenever	O
two	O
ZX-diagrams	O
can	O
be	O
transformed	O
into	O
one	O
another	O
by	O
topological	O
deformation	O
,	O
then	O
they	O
represent	O
the	O
same	O
linear	B-Architecture
map	I-Architecture
.	O
</s>
<s>
The	O
following	O
example	O
of	O
a	O
quantum	B-Application
circuit	I-Application
constructs	O
a	O
GHZ-state	O
.	O
</s>
<s>
Any	O
linear	B-Architecture
map	I-Architecture
between	O
qubits	O
can	O
be	O
represented	O
as	O
a	O
ZX-diagram	O
,	O
i.e.	O
</s>
<s>
A	O
given	O
ZX-diagram	O
can	O
be	O
transformed	O
into	O
another	O
ZX-diagram	O
using	O
the	O
rewrite	O
rules	O
of	O
the	O
ZX-calculus	B-Device
if	O
and	O
only	O
if	O
the	O
two	O
diagrams	O
represent	O
the	O
same	O
linear	B-Architecture
map	I-Architecture
,	O
i.e.	O
</s>
<s>
the	O
ZX-calculus	B-Device
is	O
sound	O
and	O
complete	O
.	O
</s>
<s>
The	O
category	O
of	O
ZX-diagrams	O
is	O
a	O
dagger	O
compact	O
category	O
,	O
which	O
means	O
that	O
it	O
has	O
symmetric	O
monoidal	O
structure	O
(	O
a	O
tensor	B-Device
product	O
)	O
,	O
is	O
compact	O
closed	O
(	O
it	O
has	O
cups	O
and	O
caps	O
)	O
and	O
comes	O
equipped	O
with	O
a	O
dagger	O
,	O
such	O
that	O
all	O
these	O
structures	O
suitably	O
interact	O
.	O
</s>
<s>
The	O
objects	O
of	O
the	O
category	O
are	O
the	O
natural	O
numbers	O
,	O
with	O
the	O
tensor	B-Device
product	O
given	O
by	O
addition	O
(	O
the	O
category	O
is	O
a	O
PROP	O
)	O
.	O
</s>
<s>
Indeed	O
,	O
all	O
ZX-diagrams	O
are	O
built	O
freely	O
from	O
a	O
set	O
of	O
generators	O
via	O
composition	O
and	O
monoidal	O
product	O
,	O
modulo	O
the	O
equalities	O
induced	O
by	O
the	O
compact	O
structure	O
and	O
the	O
rules	O
of	O
the	O
ZX-calculus	B-Device
given	O
below	O
.	O
</s>
<s>
The	O
following	O
table	O
gives	O
the	O
generators	O
together	O
with	O
their	O
standard	O
interpretations	O
as	O
linear	B-Architecture
maps	I-Architecture
,	O
expressed	O
in	O
Dirac	O
notation	O
.	O
</s>
<s>
The	O
-fold	O
tensor-product	O
of	O
the	O
vector	O
is	O
denoted	O
by	O
.	O
</s>
<s>
There	O
are	O
many	O
different	O
versions	O
of	O
the	O
ZX-calculus	B-Device
,	O
using	O
different	O
systems	O
of	O
rewrite	O
rules	O
as	O
axioms	O
.	O
</s>
<s>
two	O
diagrams	O
are	O
considered	O
to	O
be	O
equal	O
if	O
their	O
interpretations	O
as	O
linear	B-Architecture
maps	I-Architecture
differ	O
by	O
a	O
non-zero	O
complex	O
factor	O
.	O
</s>
<s>
The	O
ZX-calculus	B-Device
has	O
been	O
used	O
in	O
a	O
variety	O
of	O
quantum	O
information	O
and	O
computation	B-Architecture
tasks	O
.	O
</s>
<s>
It	O
has	O
been	O
used	O
to	O
describe	O
measurement-based	O
quantum	B-Architecture
computation	I-Architecture
and	O
graph	O
states	O
.	O
</s>
<s>
The	O
ZX-calculus	B-Device
is	O
a	O
language	O
for	O
lattice	O
surgery	O
on	O
surface	O
codes	O
.	O
</s>
<s>
It	O
has	O
been	O
used	O
to	O
find	O
and	O
verify	O
correctness	O
of	O
quantum	B-Device
error	I-Device
correcting	I-Device
codes	I-Device
.	O
</s>
<s>
It	O
has	O
been	O
used	O
to	O
optimize	O
quantum	B-Application
circuits	I-Application
.	O
</s>
<s>
The	O
rewrite	O
rules	O
of	O
the	O
ZX-calculus	B-Device
can	O
be	O
implemented	O
formally	O
as	O
an	O
instance	O
of	O
double-pushout	B-Application
rewriting	I-Application
.	O
</s>
<s>
A	O
LaTeX	B-Application
package	O
zx-calculus	B-Device
]	O
can	O
be	O
used	O
to	O
typeset	O
ZX-diagrams	O
.	O
</s>
<s>
The	O
ZX-calculus	B-Device
is	O
only	O
one	O
of	O
several	O
graphical	O
languages	O
for	O
describing	O
linear	B-Architecture
maps	I-Architecture
between	O
qubits	O
.	O
</s>
<s>
The	O
ZW-calculus	O
was	O
developed	O
alongside	O
the	O
ZX-calculus	B-Device
,	O
and	O
can	O
naturally	O
describe	O
the	O
W-state	O
and	O
Fermionic	O
quantum	B-Architecture
computing	I-Architecture
.	O
</s>
<s>
It	O
was	O
the	O
first	O
graphical	O
language	O
which	O
had	O
a	O
complete	O
rule-set	O
for	O
an	O
approximately	O
universal	O
set	O
of	O
linear	B-Architecture
maps	I-Architecture
between	O
qubits	O
,	O
and	O
the	O
early	O
completeness	O
results	O
of	O
the	O
ZX-calculus	B-Device
use	O
a	O
reduction	O
to	O
the	O
ZW-calculus	O
.	O
</s>
<s>
This	O
adds	O
the	O
H-box	O
as	O
a	O
generator	O
,	O
that	O
generalizes	O
the	O
Hadamard	O
gate	O
from	O
the	O
ZX-calculus	B-Device
.	O
</s>
<s>
It	O
can	O
naturally	O
describe	O
quantum	B-Application
circuits	I-Application
involving	O
Toffoli	O
gates	O
.	O
</s>
