Quantum Software
the code that runs on a quantum computer
INIT 5
CNOT 1 0
H 2
Z 3
H 0
H 1
CNOT 4 2
...
|
↔ |
|
Optimising circuits the old-fashioned way
...
A better idea: the ZX calculus
A complete set of equations for qubit QC
Q: How to we scale up?
≈ 30 spiders
≈ $10^3$ - $10^8$ spiders
A: Automation
ZX Circuit Optimisation
...has 2 phases. First simplify...
$\Rightarrow$
ZX circuit optimisation
...and extract:
T-count reduction
- "Reducing the number of non-Clifford gates in quantum circuits". AK, van de Wetering. Phys Rev A 2020
- "Optimal Compilation of Parametrised Circuits". van de Wetering, Yeung, AK. 2024 arXiv:2401.12877
Who cares about T-count anyway?
- T-count is (probably) very important for fault-tolerant QC
- Q: Why does it matter today?
- A: Simulating quantum circuits on a classical (super)computer.
→
Stabilizer rank
The stabilizer rank of $|\psi\rangle$ is the least $N$ such that:
\[ |\psi\rangle = \sum_{i=1}^N k_i |\xi_i\rangle \]
for all $|\xi_i\rangle$ stabilizer states.
Gottesman-Knill $\implies$ amplitudes can be computed in $N \cdot$ poly time.
Stabilizer rank
- Good stabilizer decompositions $\implies$ fast classical simulation
- Hard to compute in general, but upper bounds exist:
Idea: Do stabilizer decompositions on ZX diagrams!
Why?
- Produces $7^{n/6} \approx 2^{0.468t}$ terms for $t$ T-gates
- Interleaving ZX-simplification can make that significantly less
ZX-stabiliser decompositions
Quantum error correction
...is done by encoding some space of
logical qubits
into a bigger space of
physical qubits:
- $E$ (or just $\textrm{Im}(E)$) is a called a quantum error correcting code
- QECCs are used to:
- encode (and sometimes decode) logical states
- measure physical qubits to detect/correct errors
- do fault-tolerant computations on encoded qubits
Quantum error correction in ZX
two main approaches:
- The graphical encoder approach
$\quad \leadsto \quad$
- The Pauli web approach
Graphical encoder
- The idea: represent the encoder isometry $E$ directly as a ZX diagram
$\quad = \quad$
- Fault-tolerant QC $:=$ pushing through the encoder
Application: transversal non-Cliffords
...when $(L_X, S_X)$ is a triorthogonal code.
» PQS, Chapter 11
QEC in ZX
two main approaches:
- The graphical encoder approach
$\quad \leadsto \quad$
- The Pauli web approach
Pauli webs
the motto: "circuits not codes"
- Think of a (possibly infinite/periodic) sequence of gates and measurements as a "generalised" QECC
- Physical qubits are the wires, logical qubits and QEC properties are defined by certain wire-colouring rules, called Pauli webs
Pauli webs
...can be used to study:
- Stabiliser codes, using the circuit that measures all the stabilisers
- Floquet codes, using a periodic sequence of (possibly non-commuting) Pauli measurements
- More general "codes", where we just do stuff and see what the QEC properties are