Picturing Quantum Software
An Introduction to the ZX-Calculus and Quantum Compilation
[ Preprint Version 1.2.0 August 2025 ]
Aleks Kissinger and John van de Wetering
August 6, 2025
Contents
About This Version
1
Introduction
1.1
How to read this book
1.2
Overview
2
The Quantum Circuit Model
2.1
Preliminaries
2.2
A bluffer’s intro to quantum theory
2.3
Gates and circuits
2.4
A dash of quantum algorithms
2.5
A dash of complexity theory
2.6
Summary: What to remember
2.7
Advanced Material*
2.8
References and further reading
3
The ZX-Calculus
3.1
ZX-diagrams
3.2
The rules of the ZX-calculus
3.3
ZX in action
3.4
Extracting circuits from ZX-diagrams
3.5
Summary: What to remember
3.6
Advanced Material*
3.7
References and further reading
4
CNOT circuits and phase-free ZX-diagrams
4.1
CNOT circuits and parity matrices
4.2
The phase-free ZX calculus
4.3
Phase-free states and
𝔽
2
linear subspaces
4.4
Summary: What to remember
4.5
Advanced Material*
4.6
References and further reading
5
Clifford circuits and diagrams
5.1
Clifford circuits and Clifford ZX-diagrams
5.2
Simplifying Clifford diagrams
5.3
Clifford normal forms
5.4
Classical simulation of Clifford circuits
5.5
Completeness of Clifford ZX-diagrams
5.6
Summary: What to remember
5.7
References and further reading
6
Stabiliser theory
6.1
Paulis and stabilisers
6.2
Stabiliser measurements
6.3
Stabiliser states and the Clifford group
6.4
Stabiliser tableaux
6.5
The Clifford hierarchy
6.6
Summary: What to remember
6.7
References and further reading
7
Universal circuits
7.1
Phase polynomials and path sums
7.2
Scalable ZX notation
7.3
Pauli exponentials
7.4
Pauli exponential compilation
7.5
Hamiltonian simulation
7.6
Simplifying universal diagrams
7.7
Summary: What to remember
7.8
Advanced material*
7.9
References and further reading
8
Cheatsheets
8.1
ZX-calculus cheatsheets
9
Measurement-based quantum computation
9.1
Measurement fragments
9.2
Determinism and gflow
9.3
Optimising deterministic measurement patterns
9.4
From measurement patterns to circuits
9.5
Measurements in three planes
9.6
There and back again
9.7
Summary: What to remember
9.8
References and further reading
10
Controlled gates and classical oracles
10.1
Controlled unitaries
10.2
H-boxes
10.3
Reversible Logic synthesis
10.4
Constructing Toffoli gates with many controls
10.5
Adders
10.6
Summary: what to remember
10.7
Advanced Material*
10.8
References and further reading
11
Clifford+T
11.1
Universality of Clifford+T circuits
11.2
Rewriting Clifford+T diagrams
11.3
Advanced T-count optimisation
11.4
Catalysis
11.5
Summary: What to remember
11.6
Advanced Material*
11.7
References and further reading
12
Quantum error correction
12.1
Classical codes and parameters
12.2
Quantum stabiliser codes
12.3
CSS codes
12.4
Fault-tolerance
12.5
Magic state distillation
12.6
Summary: What to remember
12.7
References and Further Reading
Bibliography
[
next
]