Introduction to Categorical Quantum mechanics
Ross Duncan
0.Motivations
Transistors are shrinkingFe
atur
e Si
ze (n
m) L
og-s
cale
1
10
100
1000
10000
1970 1980 1990 2000 2010 2020
Diameter of a virus
Thickness of spider silk
1972 1988 2005 2016
Transistors are shrinkingFe
atur
e Si
ze (n
m) L
og-s
cale
1
10
100
1000
10000
1970 1980 1990 2000 2010 2020
Diameter of a virus
Thickness of spider silk
1972 1988 2005 2016
Quantum effects become important
Quantum Computing
• IDEA: exploit quantum effects for computation
• Fast algorithms (Shor, Grover)
• Simulate physical systems (chemistry, materials)
• Novel cryptographic protocols (QKD, blind computing)
• …. and more.
Quantum Computing
target: 49 qubit machine in the lab by end of 2017
Quantum Computing
target: 50 qubit machine for sale by 2021
5 qubits now; 16 later this year
Quantum Computingtarget: 400 qubits by 2020
Motivations
Motivations
Motivations
Motivations
Motivations�x.�y.�z.xz(yz)
Motivations
Motivations
Motivations
Hilbert space, unitary transforms,
self-adjoint operators....
Motivations
Hilbert space, unitary transforms,
self-adjoint operators....
????
The need for abstraction:
D ~ 2^1764
This is an 8-bit adder
What’s so special about quantum?
Seek a mathematical answer.
What’s so special about quantum?
Superposition?
Superposition?
Superposition?
Classical waves can exhibit superposition too!
unless and are orthogonal [Wooters & Zurek 1982]
Theorem: There are no unitary operations D such that
D : |⇥⌅ ⇤⇥ |⇥⌅ � |⇥⌅D : |�⌅ ⇤⇥ |�⌅ � |�⌅
No-Cloning and No-Deleting
unless and are orthogonal [Pati & Braunstein 2000]
Theorem: There are no unitary operations E such that
E : |⇥⇤ ⇥� |0⇤E : |�⇤ ⇥� |0⇤
|��
|��
|��
|��
Separate classical and quantum data in a hybrid machine
Linear types have been proposed* to capture this:
!A A�B
No-Cloning and No-Deleting
But we need additional axioms to get the QM-like behaviour
*vanTonder 2003, Selinger and Valiron 2005, Arrighi and Dowek 2003, Altenkirch & Grattage 2005
** Hensinger et al Nature 2005
Non-locality or Contextuality?
* Aspect et al PRL 1981
Non-locality or Contextuality?
* Aspect et al PRL 1981
But! !
“generalised probabilistic theories” display even stronger non-locality than quantum theory! !Many aspects of contextuality appear in classical settings like databases and NLP!
Complementarity
Quantum systems have properties which are not accessible at the same time. They are not even simultaneously well-defined!
Quantum Theory
Categorical Quantum Theory
Hilbert spacesOperators
Monoidal categories(co)AlgebrasCommutation rules
abst
ract
ion
Categorical Quantum TheoryMonoidal categories(co)AlgebrasCommutation rules
CQT as an “algebraic theory”PROPsDistributive laws
form
alis
atio
n
Categorical Quantum Theory
Quantum theory as an internal theory in a monoidal category
• No assumption of linear structure • Algebra : • Coalgebra : • And laws for their interaction.
A⌦A - A
A - A⌦A
1.Monoidal Categories
1bis.Monoidal Categories
(Graphically)
PAST / HEAVEN
FUTURE / HELL
Why Diagrams?
Why Diagrams?12
⇤
⌥⌥⇧
�11
⇥⇥
⇤
⌥⌥⇧
1 0 0 00 1 0 00 0 1 00 0 0 ei⇤
⌅
��⌃⇥�
0 11 0
⇥⌅
��⌃
⇤
⇤
⌥⌥⇧
⇤
⌥⌥⇧
��1 0 0 00 0 0 1
⇥⇥
�1 11 �1
⇥⇥⇤
⇤
⌥⌥⇧
�0 11 0
⇥⇥
⇤
⌥⌥⇧
1 0 0 00 0 1 00 1 0 00 0 0 1
⌅
��⌃
⌅
��⌃ ⇤
⇤
⌥⌥⇧
⇤
⌥⌥⇧
1 0 0 00 1 0 00 0 0 10 0 1 0
⌅
��⌃⇥�
1 00 1
⇥⌅
��⌃
⌅
��⌃⇥�
1 00 1
⇥⌅
��⌃
⇤
⇤
⌥⌥⇧
⇤
⌥⌥⇧
1 0 0 00 1 0 00 0 0 10 0 1 0
⌅
��⌃ ⇤��
cos ⌅6
i sin ⌅6
⇥⇥
�1 00 ei⇥
⇥⇥⌅
��⌃⇥
⇤
⌥⌥⇧
1 0 0 00 1 0 00 0 1 00 0 0 ei�
⌅
��⌃
= ?
Why Diagrams?
• Great when we have parallel and sequential composition
• Essential for talking about interacting algebraic and coalgebraic things
• Different kinds of diagram give different kinds of monoidal category
Historical Examples
Circuits (classical and quantum) :
Historical Examples
Feynmann Diagrams:
Historical Examples“Applications of Negative Dimensional Tensors” (Penrose)
Historical Examples
Proofs-Nets in Linear Logic (Girard, Danos-Regnier, Tortoro de Falco, many others)
Historical Examples
Proofs-Nets in Linear Logic (Blute-Cocket-Seely-Trimble, 1996)
Historical Examples
Interaction Combinators (Lafont, 1997)
Historical Examples“Coherence for Compact Closed Categories” (Kelly-Laplaza, 1980)
Historical Examples“Coherence for Compact Closed Categories” (Kelly-Laplaza, 1980)
?
Historical Examples“Geometry of Tensor Calculus I” (Joyal-Street, 1991)
Historical Examples“Traced Monoidal Categories” (Joyal-Street-Verity, 1996)
More Recently:
Unit (U ⌦W );X = (W ⌦ U);X = W .
X X= =
Commutativity �A;X = X.
X = X
Retract T ;X = W .
XT =
2. (A,C, P ) is a commutative monoid with U an absorbing element.
Associativity (W ⌦ C);C = (C ⌦W );C.
C
C
C
C=
Unit (P ⌦W );C = (W ⌦ P );C = W
CC
= =
P
P
Commutativity �A;C = C.
C C=
Absorbing element (W ⌦ U);C = (U ⌦W );C = U
C C= =
3. (A,F,E) is a co-commutative co-monoid, with C a section of F .
Co-associativity F ; (F ⌦W ) = F ; (W ⌦ F ).
=
Co-unit F ; (W ⌦ E) = F ; (E ⌦W ).
= =
Co-commutativity F ; �A = F .
=
Section F ;C = W
C =
Ghica (2013) - Asynchronous Circuits
More Recently:Melliès (2014) - Local State
Grov Kissinger Lin (2013) - Proof Planning
More Recently:Baez and Fong (2014) — Passive Linear Circuits
More Recently:Bonchi Sobocinski Zanasi (2014) — Signal Flow Graphs
Diagrams
D
A B
E
j
C
j : A�B ⇥ C �D � E
Input Systems
Diagrams
D
A B
E
j
C
j : A�B ⇥ C �D � E
Input Systems
Diagrams
D
A B
E
j
C
Output Systems
j : A�B ⇥ C �D � E
Input Systems
Diagrams
D
A B
E
j
C
Output Systems
Interaction, or process, or state change, or ...
j : A�B ⇥ C �D � E
f : A� B g : B � C h : C � D
Monoidal Categories
f gA
B
B
C
C
h
D
f : A� B g : B � C h : C � D
f : A� B g : B � C h : C � D
Monoidal Categories
f gA
B
B
C
C
h
D
f : A� B g : B � C h : C � D
g � f : A ⇥ C
f
g
A
B
C
f : A� B g : B � C h : C � D
Monoidal Categories
f gA
B
B
C
C
h
D
f : A� B g : B � C h : C � D
g � f : A ⇥ C
f
g
A
B
C
f � h : A� C ⇥ B �D
f h
D
A
B
C
Monoidal Categories
f
g
A
B
C
h
D
gf
A
B
h
D
C
C
B f h
D
A
B
C
g k
C E
No lines are drawn for I in the graphical notation:
Monoidal categories have a special unit object called I which is a left and right identity for the tensor:
⇥ : I ⇥ A �† : A ⇥ I �† � ⇥ : I ⇥ I
I �A = A = A� I
idI � f = f = f � idI
Monoidal Categories
⇥ : I ⇥ A �† : A ⇥ I �† � ⇥ : I ⇥ I⇥ : I ⇥ A �† : A ⇥ I �† � ⇥ : I ⇥ I
⇥ : I ⇥ A �† : A ⇥ I �† � ⇥ : I ⇥ I
⇥ : I ⇥ A �† : A ⇥ I �† � ⇥ : I ⇥ I
idA : A� A
Categories
idA : A� A
Categories
idA : A� A
B
f
f � idA : A ⇥ B
Categories
idA : A� A
B
f
idB � f : A ⇥ B
Categories
idA : A� A
B
f
f : A� B
�A,B : A�B ⇥ B �A
Symmetric Monoidal Categories
A B
A
B A
B
=
A
BA
B
�A,B : A�B ⇥ B �A
Symmetric Monoidal Categories
A
B
Bgf
B
C
C
�A,B : A�B ⇥ B �A
Symmetric Monoidal Categories
A
B
B
g f
B
C
C
d : I ⇥ A� �A e : A�A� ⇥ I
Compact ClosureA symmetric monoidal category is called compact if, for every object A, there exists a dual object A* and arrows:
d : I ⇥ A� �A e : A�A� ⇥ I
Compact ClosureA symmetric monoidal category is called compact if, for every object A, there exists a dual object A* and arrows:
d : I ⇥ A� �A e : A�A� ⇥ I
Compact Closure
=
A symmetric monoidal category is called compact if, for every object A, there exists a dual object A* and arrows:
A category is a †-category if it is equipped with an involutive functor, which reverses the arrows while leaving the objects unchanged.
f : A� B f† : B � A
†-Categories
(·)†
f
A
B A
B
f
An arrow is called unitary when:
†-Categories
f : A⇥ B f† : B ⇥ A
(f � g)† = f† � g† �†A,B = �B,A
BA
f
A
f
f
f
B
An arrow is called unitary when:
†-Categories
f : A⇥ B f† : B ⇥ A
(f � g)† = f† � g† �†A,B = �B,A
BA
A
f
f
B
An arrow is called unitary when:
†-Categories
f : A⇥ B f† : B ⇥ A
(f � g)† = f† � g† �†A,B = �B,A
BA
A B
Thm: one diagram can be deformed to another iff their denotations are equal by the structural equations of the category.
Graphical Calculus Theorem
f
hD
A
B
C
g
k
C
E
c
Thm: one diagram can be deformed to another iff their denotations are equal by the structural equations of the category.
Graphical Calculus Theorem
f
hD
A
B
C
g
k
C
E
c
= c
f
A
B
C
D
g
C
k
E
h
The Category FDHilbFDHilb is the category of finite dimensional complex Hilbert spaces. It is †-monoidal with the following structure.
• Objects: finite dimensional Hilbert spaces, A, B, C etc
• Arrows: all linear maps • Tensor: usual (Kronecker) tensor product; • is the usual adjoint (conjugate transpose)
A linear map picks out exactly one vector. It is a ket and is the corresponding bra. Hence is the inner product .
I = Cf†
� : I � A�† : A� I
⇥† � � : I ⇥ I �⇥ | �⇥
2.Quantum Theory in 5 minutes
2.Quantum Theory in 5* minutes
*Might be more than 5
1. Quantum states are represented by unit vectors in a complex Hilbert space.
|0⇤ , |1⇤ , 1�2(|0⇤ + |1⇤) � 2 =: Q
|0�
|1�
|0� + ei� |1�
!
2. The state space formed by combining two or more systems is the tensor product of their individual state spaces !
|010⌅ := |0⌅ � |1⌅ � |0⌅ ⇥ 2 � 2 � 2 = Q3
3. For each discrete time step, an undisturbed quantum system evolves according to a unitary operator acting on its state space !
!
!
...but the quantum state is not directly accessible... more on this later!
X, Z, H : Q� Q ⇤X,⇤Z : Q2 � Q2
Example: Z-Rotation
|0�
|1�
Example: X-Rotation
|+i|�i
|�Í Input register
Quantum Circuits
|�ÕÍ Output register
Unita
ry g
ates
U : C2n - C2n
“Time”
Universality
We say that a model of quantum computation is universal if it can represent all unitary maps.The circuit model requires a small set of gates to be universal:
Universality
We say that a model of quantum computation is universal if it can represent all unitary maps.The circuit model requires a small set of gates to be universal:
Quantum CircuitsExample 3.9 (Bell state). A Bell state, |00Í + |11Í, is prepared by the circuitbelow, on the left.
T
Q
cccca
|0Í |0Í
H
R
ddddb= H úæ úæ úæ
The corresponding zx-calculus derivation is a proof of the correctness of thiscircuit.
To simplify the next example, we introduce some shorthand for some usefulcircuit elements.
Z :=H
H
|+Í:=
|0Í
H
Example 3.10 (1D-cluster state). A 1-dimensional cluster state consists of acollection qubits 1, . . . , n initialised in the state |+Í = |0Í + |1Í, which are thenentangled by applying a ·Z operation to qubits i and i ≠ 1, and to i and i + 1.The corresponding circuit is shown below:
T
Q
cccca
|+Í |+Í |+Í |+Í
Z Z Z
Z Z
... ...
... ...
R
ddddb= H H H
H H...
...
...
...
The zx-calculus translation can be radically simplified by repeated use of thespider rule:
H H H
H H...
...
...
...
úæ H H H H H... ...
The 1D-cluster is a special case of a more general class of states: graph states.These states are the basis of measurement-based quantum computation, and willplay an important role later in the paper.
3.2 Circuit-like diagrams
While the preceding has demonstrated the ease with quantum circuits can betranslated into diagrams, there are many diagrams which do not correspond to
16
Preparing a Bell state
Example 3.9 (Bell state). A Bell state, |00Í + |11Í, is prepared by the circuitbelow, on the left.
T
Q
cccca
|0Í |0Í
H
R
ddddb= H úæ úæ úæ
The corresponding zx-calculus derivation is a proof of the correctness of thiscircuit.
To simplify the next example, we introduce some shorthand for some usefulcircuit elements.
Z :=H
H
|+Í:=
|0Í
H
Example 3.10 (1D-cluster state). A 1-dimensional cluster state consists of acollection qubits 1, . . . , n initialised in the state |+Í = |0Í + |1Í, which are thenentangled by applying a ·Z operation to qubits i and i ≠ 1, and to i and i + 1.The corresponding circuit is shown below:
T
Q
cccca
|+Í |+Í |+Í |+Í
Z Z Z
Z Z
... ...
... ...
R
ddddb= H H H
H H...
...
...
...
The zx-calculus translation can be radically simplified by repeated use of thespider rule:
H H H
H H...
...
...
...
úæ H H H H H... ...
The 1D-cluster is a special case of a more general class of states: graph states.These states are the basis of measurement-based quantum computation, and willplay an important role later in the paper.
3.2 Circuit-like diagrams
While the preceding has demonstrated the ease with quantum circuits can betranslated into diagrams, there are many diagrams which do not correspond to
16
Controlled-Z gate
Quantum Observables
4. Each observable quantity O is represented as self-adjoint operator :
•The possible values of O are the eigenvalues of
•When we observe O for a system in state , there is probability of observing .
•If is the outcome of the measurement, the system is then in state .
O =�
i �i |ei⇥ �ei|�i O
|���ei | �⇥2 �i
�i|ei�
Z =�
1 00 �1
⇥X =
�0 11 0
⇥
X and Z Spins
� |0⇥+ ⇥ |1⇥
|0⇥�
p=�2
|1⇥
�p=
⇥2
|+⇥
p=
(�+
⇥)/
2 2⇥
|�⇥
p=(��
⇥)/2 2
⇥
We can measure the spin of qubit |⇤� = � |0� + ⇥ |1�
Z =�
1 00 �1
⇥X =
�0 11 0
⇥
X and Z SpinsWe can measure the spin of qubit |⇤� = � |0� + ⇥ |1�
|0⇥
|0⇥�
p=1
|1⇥
�p=
0
|+⇥
p=
1/2
⇥
|�⇥
p=1/2
⇥
Quantum Observables
Measuring A then B may give a different answer than measuring B first then A! !
Not all observables are well defined at the same time: • Two observables are compatible if their operators commute • Two operators commute if they have the same eigenvectors • Identify a non-degenerate observable with its eigenbasis
Incompatible Observablesa0
a1
b1
b0
Complementary Observablesa0
a1
b1 b0
|�ai | bj⇥| =1⌅D
Complementary Observablesa0
a1
b1 b0
|�ai | bj⇥| =1⌅D
“Mutually Unbiased Bases”
3.Categorical Quantum Mechanics
unless and are orthogonal [Wooters & Zurek 1982]
Theorem: There are no unitary operations D such that
D : |⇥⌅ ⇤⇥ |⇥⌅ � |⇥⌅D : |�⌅ ⇤⇥ |�⌅ � |�⌅
No-Cloning and No-Deleting
unless and are orthogonal [Pati & Braunstein 2000]
Theorem: There are no unitary operations E such that
E : |⇥⇤ ⇥� |0⇤E : |�⇤ ⇥� |0⇤
|��
|��
|��
|��
“Classical” Quantum States
When can a quantum state be treated as if classical?
• no-go theorems allow copying and deleting of orthogonal states;
In other words: • A quantum state may be copied and deleted if it is an
eigenstate of some known observable. We’ll use this property to formalise observables in terms of copying and deleting operations.
Observables� =
=
=
Comonoid Laws
= =
� =
Observables� = �† = �† =
=
=
Comonoid Laws
= =
� =
Observables� = �† = �† =
=
=
= =
Monoid Laws
� =
Observables� = �† = �† =
Frobenius LawIsometry Law
= = =
� =
Observables� = �† = �† =� =
In other words: an observable is a special commutative †-Frobenius algebra
ObservablesGiven any finite dimensional Hilbert space we can define a Frobenius algebra by
� : A⇥ A�A :: ai ⇤⇥ ai � ai
⇥ : A⇥ I ::�
i
ai ⇤⇥ 1
ObservablesGiven any finite dimensional Hilbert space we can define a Frobenius algebra by
� : A⇥ A�A :: ai ⇤⇥ ai � ai
⇥ : A⇥ I ::�
i
ai ⇤⇥ 1
Example: !define a Frobenius algebra over qubits; the standard basis is copied and erased.
� : |0⇤ ⇥� |00⇤|1⇤ ⇥� |11⇤ ⇥ : |0⇤+ |1⇤ ⇥� 1
ObservablesGiven any finite dimensional Hilbert space we can define a Frobenius algebra by
� : A⇥ A�A :: ai ⇤⇥ ai � ai
⇥ : A⇥ I ::�
i
ai ⇤⇥ 1
Theorem: in FDHilb, †-SCFAs are in bijective correspondence to bases. [Coecke, Pavlovic, Vicary]
Example: !define a Frobenius algebra over qubits; the standard basis is copied and erased.
� : |0⇤ ⇥� |00⇤|1⇤ ⇥� |11⇤ ⇥ : |0⇤+ |1⇤ ⇥� 1
Theorem: any maps constructed from δ and ε , and their adjoints, whose graph is connected, is determined uniquely by the number of inputs and outputs.
Spider Theorem
Coecke & Paquette 2006
Theorem: any maps constructed from δ and ε , and their adjoints, whose graph is connected, is determined uniquely by the number of inputs and outputs.
Spider Theorem
Coecke & Paquette 2006
Theorem: any maps constructed from δ and ε , and their adjoints, whose graph is connected, is determined uniquely by the number of inputs and outputs.
Spider Theorem
Coecke & Paquette 2006
PhasesDefn. a map 𝛼:A⟶A is called a pre-phase if: !!!!!A pre-phase is a phase if it is unitary. Defn: a point 𝜓:I⟶A is called unbiased if the map !!!!is a phase.
by the spider theorem, which makes 1 self-dual; the required cup and cap forthe other objects can be easily constructed (although see [31] for the coherenceconditions) to make all of F compact. For †-compactness, we require
( )† =
which again follows from the spider theorem.
Obviously, compactness of F implies that any F-algebra is also compact, inparticular the inclusion of F into another PROP. Given a map f : A æ A, wecan construct its “ -transpose”, by conjugating with d and e:
f = f
The -transpose extends to an involutive contravariant functor on any F-algebraA, and since F is †-compact, the adjoint and the -transpose commute, andhence we can define a covariant involution, the -conjugate:
f = (f†) = (f )† ;
we say that f is -real if f = f , or equivalently if f† = f . Evidently, thedefining maps of the Frobenius algebra are -real, as is the symmetry of themonoidal structure, hence in F itself f† = f for all f . This is not true forF-algebras in general.
Now let A be an F-algebra in some category C; we let ”, µ etc stand for theirimages in C.
Definition 3.3. A pre-phase for the †-SCFA (A, ”, µ) is a map – : A æ A whichacts as a strength for the multiplication:
–=
–(�)
A pre-phase is a phase if it is unitary.
Definition 3.4. Let  : I æ A and define »(Â) : A æ A by
»(Â) : Â ‘æ µ ¶ (Â ¢ id)Â
‘æÂ
.
It follows immediately from this definition that »(Â) is a pre-phase. If »(Â) is infact a phase, then we say that  is -unbiased.
by the spider theorem, which makes 1 self-dual; the required cup and cap forthe other objects can be easily constructed (although see [31] for the coherenceconditions) to make all of F compact. For †-compactness, we require
( )† =
which again follows from the spider theorem.
Obviously, compactness of F implies that any F-algebra is also compact, inparticular the inclusion of F into another PROP. Given a map f : A æ A, wecan construct its “ -transpose”, by conjugating with d and e:
f = f
The -transpose extends to an involutive contravariant functor on any F-algebraA, and since F is †-compact, the adjoint and the -transpose commute, andhence we can define a covariant involution, the -conjugate:
f = (f†) = (f )† ;
we say that f is -real if f = f , or equivalently if f† = f . Evidently, thedefining maps of the Frobenius algebra are -real, as is the symmetry of themonoidal structure, hence in F itself f† = f for all f . This is not true forF-algebras in general.
Now let A be an F-algebra in some category C; we let ”, µ etc stand for theirimages in C.
Definition 3.3. A pre-phase for the †-SCFA (A, ”, µ) is a map – : A æ A whichacts as a strength for the multiplication:
–=
–(�)
A pre-phase is a phase if it is unitary.
Definition 3.4. Let  : I æ A and define »(Â) : A æ A by
»(Â) : Â ‘æ µ ¶ (Â ¢ id)Â
‘æÂ
.
It follows immediately from this definition that »(Â) is a pre-phase. If »(Â) is infact a phase, then we say that  is -unbiased.
We say that f is -real if f = f , or equivalently if f† = f . Evidently, thedefining maps of the Frobenius algebra are -real, as is the symmetry of themonoidal structure, hence in F itself f† = f for all f . This is not true forF-algebras in general.
Before moving on we state a useful lemma.
Lemma 4.2. If a morphism f commutes with both the monoid and comonoidparts of a Frobenius algebra, then it is invertible and f�1 = f .
We are now ready to develop the abstract theory of phases.
Definition 4.3. A pre-phase for the †-SCFA (A, �, µ) is a map ↵ : A ! A whichacts as a strength for the multiplication:
↵=
↵(�)
A pre-phase is a phase if it is unitary.
Definition 4.4. Let : I ! A and define ⇤( ) : A ! A by
⇤( ) : 7! µ � ( ⌦ id)
7!
.
It follows immediately from this definition that ⇤( ) is a pre-phase. If ⇤( ) is infact a phase, then we say that is -unbiased.
Lemma 4.5. Let ↵ : A ! A be a phase. Then there exists : I ! A such that
1. ↵ = ⇤( );2. ↵ = ↵;3. ↵† = ⇤( );4. µ( ⌦ ) = ⌘.
Corollary 4.6. If ↵ is a phase, then so is ↵†.
Lemma 4.7. Let � denote the set of phases, and U denote the unbiased points;then (�, �, id, ()†) and (U , µ, ⌘, () ) are isomorphic abelian groups.
We will now consider the †-PROP which is generated by a †-SCFA with aprescribed group of phases i.e. where (�, �, id, ()†) ⇠= G for some abelian groupG. As in example 2.4, given the abelian group G we can construct the PROPPG. We might then hope to compose the PROPs F and PG using a distributivelaw [38], but this is impossible. However, we can form the desired PROP viaan iterated distributive law [47] (see Appendix C). To combine F and PG wecompose the PROPs M, C and PG pairwise via distributive laws, and then showthat these distributive laws interact nicely with one another in such a way toyield the desired PROP.
PhasesLemma. let 𝛼:A⟶A be a phase; then there exists an unbiased point 𝜓:I⟶A such that: !!!!!!!
Corollary: 𝛼 is a phase iff 𝛼† is a phase.
Notation. If – : A æ A and  : I æ A are respectively a -phase and an-unbiased point then are the same colour as their Frobenius algebra, e.g.
– = – Â =Â
Lemma 3.5. Let – : A æ A be a phase. Then there exists  : I æ A such that1. – = »(Â);2. – = –;3. –† = »( );4. µ( ¢  ) = ÷.
Corollary 3.6. If – is a phase, then so is –†.
Lemma 3.7. Let Õ denote the phases, and U denote the unbiased points; then(Õ, ¶, id, ()†) and (U , µ, ÷, () ) are isomorphic abelian groups.
Theorem 3.8 (Generalised Spider). Let f : A¢m æ A¢n be a morphismbuilt from ”, ‘, µ, ÷, and some collection of phases –i by composition and tensor;if the graphical form of g is connected then f = ”n ¶ – ¶ µm where
– = –1
¶ · · · ¶ –k
Proof. This follows from the above lemmas and the spider theorem.
Therefore a Frobenius algebra and its group of phases generate a category ofÕ-labelled spiders. Composition is given by fusing connected spiders and summingtheir labels.
Note that every F-algebra has a group of phases, although it may be trivial.We now construct the PROP of Frobenius algebras with a given phase groupG. Take any abelian group G and consider the †-PROP PG as earlier; then theequations (�) give a distributive law ⁄Õ : F;PG æ PG;F. As before this extendsto a functor
F : Ab æ †-PROP ,
where F1 is the original PROP of Frobenius algebras. Note that since F itself isa composite we can profitably think of FG as a composite of M, C, and G◊ viaan iterated distributive law [32]. This yields an abstract counterpart to Theorem3.8 as the following factorisation.
Theorem 3.9. Let f : n æ nÕ in FG; then
f = nÒ- m
g- m∆- nÕ
where Ò : n æ m is in M, ∆ : m æ nÕ is in C, g : m æ m is in G◊andm Æ n, nÕ.
In particular, if n = nÕ = 1 in the above then f is either a phase map or a“projector” „ ¶ † for a pair of unbiased points „,  : 0 æ 1. The following is aconsequence of Theorem 3.8.
Lemma 3.10. Suppose f : n æ n is unitary in FG; then f œ PG
PhasesLemma. let 𝛼:A⟶A be a phase; then there exists an unbiased point 𝜓:I⟶A such that: !!!!!!!
Corollary: 𝛼 is a phase iff 𝛼† is a phase.
Notation. If – : A æ A and  : I æ A are respectively a -phase and an-unbiased point then are the same colour as their Frobenius algebra, e.g.
– = – Â =Â
Lemma 3.5. Let – : A æ A be a phase. Then there exists  : I æ A such that1. – = »(Â);2. – = –;3. –† = »( );4. µ( ¢  ) = ÷.
Corollary 3.6. If – is a phase, then so is –†.
Lemma 3.7. Let Õ denote the phases, and U denote the unbiased points; then(Õ, ¶, id, ()†) and (U , µ, ÷, () ) are isomorphic abelian groups.
Theorem 3.8 (Generalised Spider). Let f : A¢m æ A¢n be a morphismbuilt from ”, ‘, µ, ÷, and some collection of phases –i by composition and tensor;if the graphical form of g is connected then f = ”n ¶ – ¶ µm where
– = –1
¶ · · · ¶ –k
Proof. This follows from the above lemmas and the spider theorem.
Therefore a Frobenius algebra and its group of phases generate a category ofÕ-labelled spiders. Composition is given by fusing connected spiders and summingtheir labels.
Note that every F-algebra has a group of phases, although it may be trivial.We now construct the PROP of Frobenius algebras with a given phase groupG. Take any abelian group G and consider the †-PROP PG as earlier; then theequations (�) give a distributive law ⁄Õ : F;PG æ PG;F. As before this extendsto a functor
F : Ab æ †-PROP ,
where F1 is the original PROP of Frobenius algebras. Note that since F itself isa composite we can profitably think of FG as a composite of M, C, and G◊ viaan iterated distributive law [32]. This yields an abstract counterpart to Theorem3.8 as the following factorisation.
Theorem 3.9. Let f : n æ nÕ in FG; then
f = nÒ- m
g- m∆- nÕ
where Ò : n æ m is in M, ∆ : m æ nÕ is in C, g : m æ m is in G◊andm Æ n, nÕ.
In particular, if n = nÕ = 1 in the above then f is either a phase map or a“projector” „ ¶ † for a pair of unbiased points „,  : 0 æ 1. The following is aconsequence of Theorem 3.8.
Lemma 3.10. Suppose f : n æ n is unitary in FG; then f œ PG
Proposition 6: 1. The phases are an abelian group 2. The unbiased points are an abelian group 3. They’re isomorphic
Generalised SpiderThm: Any connected monochrome diagram with phases is determined completely by its arity and the sum of its phases.
= = =
= = =
=
–
– + —
=–
—
–1
–5–3
–2
–4
=q
i –i
1
Example: qubits
|0�
|1�
Example: qubits
π
Example: qubits
Unbiased pointsπ
|0� + ei� |1�
Example: qubits
Unbiased pointsπ
�
Example: qubits
Unbiased pointsπ
�
�1 00 ei�
⇥=
Two kinds of points� = �† = �† =� =
Two kinds of points� = �† = �† =
Classical Points
� =
i
Those points which can be copied by �
Two kinds of points� = �† = �† =
Classical Points
� =
i= i i
Those points which can be copied by �
* to keep the pictures tidy, a scalar factor has been omitted (and everywhere
from here on)
Two kinds of points� = �† = �† =
Classical Points
� =
i= i i
Those points which can be copied by �
Two kinds of points� = �† = �† =
Unbiased PointsClassical Points
� =
i= i i
α
Those points which can be copied by �
Two kinds of points� = �† = �† =
Unbiased PointsClassical Points
� =
i= i i =
α
αThose points which can be copied by �
Two kinds of points� = �† = �† =
Unbiased PointsClassical Points
� =
i= i i =
Those points which can be copied by �
Classical points are eigenvectors
αi
Classical points are eigenvectors
α i
Classical points are eigenvectors
αi
i
Complementary Observables
�X = �X =�Z = �Z =
|i⇤ ⇥� |ii⇤ |±⌅ ⇤⇥ |±±⌅|+⇤ ⇥� 1 |0⇤ ⇥� 1
i= i i �
i
i=
Complementary Observables
�X = �X =�Z = �Z =
i= �
i
i=i i
Complementary Observables
�X = �X =�Z = �Z =
Complementary Observables
�X = �X =�Z = �Z =
= =
Example: qubits
Classical points
Unbiased pointsπ
Example: qubits
Classical points
Unbiased pointsπ
π|0� =
|1� =
�1 00 ei�
⇥=α
Example: qubits
Classical points
Unbiased pointsπ
�π
|0� =
|1� =
�1 00 ei�
⇥=α
Example: qubits
Classical points
Unbiased pointsπ
�π
|0� =
|1� =
�1 00 ei�
⇥=α
Example: qubits
Classical points
Unbiased pointsπ
�π
|0� =
|1� =
�1 00 ei�
⇥=α
=�
cos �2 i sin �
2i sin �
2 cos �2
⇥α π
|+� =
|�⇥ =
Strong Complementarity
A pair of complementary observables are called strongly complementary when they satisfy this equation:
�X = �X =�Z = �Z =
Strong Complementarity
Corollary: strongly complementary observables form a bialgebra
Strong Complementarity
Corollary: strongly complementary observables form a bialgebra
=
=
The antipode
Define the map S by:
�X = �X =�Z = �Z =
S = :=
The antipode
* If we have “enough classical points” this can be proved without strong complementarity
Strongly complementary observables form Hopf algebras
Theorem:
==
Strong Complementarity
The following are equivalent characterisations of strong complementarity:
Comonoid Homomorphism
ii
�X = �X =�Z = �Z =
The classical maps are comonoid homomorphisms
Comonoid Homomorphism
i i
�X = �X =�Z = �Z =
The classical maps are comonoid homomorphisms
Classical Phases Commute�X = �X =�Z = �Z =
The classical maps satisfy canonical commutation relations
ij i
j ij
Closedness Property�X = �X =�Z = �Z =
Closedness Property�X = �X =�Z = �Z =
�i
= i i
j= j j
=i� j i� j i� j
Closedness Property�X = �X =�Z = �Z =
�i
= i i
j= j j
=i� j i� j i� j
Closedness Property�X = �X =�Z = �Z =
Theorem: In fdHilb, strongly complementary observables exist for every dimension.
... but in big enough dimension, it is possible to construct MUBs which are not closed.
arXiv:1601.04964 LiCS 2016.
Interacting Frobenius Algebras are Hopf” RD + Kevin Dunne
“
4.The ZX-calculus
ZX-calculus
Good Points: + Graphical language for reasoning about QC + Universal + Derived from the basic algebra of complementarity + Powerful algebraic theory + Complete! Bad point: - Need to impose operational meaning post-hoc
ZX-calculus syntax
Defn: A diagram is an undirected open graph generated by the above vertices.
...
...
–...
...
– H
Figure 2: Interior vertices of diagrams
• X vertices with m inputs and n outputs, labelled by an angle – œ [0, 2fi);these are these are denoted Xm
n (–), and shown graphically as (dark) redcircles,
• H (or Hadamard) vertices, restricted to degree 2; shown as squares.
If a X or Z vertex has – = 0 then the label is entirely omitted. The allowedvertices are shown in Figure ??.
Since the inputs and outputs of of a diagram are totally ordered, we canidentify them with natural numbers and speak of the kth input, etc.
Remark 3.4. When a vertex occurs inside the graph, the distinction betweeninputs and outputs is purely conventional: one can view them simply as verticesof degree n + m; however, this distinction allows the semantics to be stated moredirectly, see below.
The collection of diagrams forms a compact category in the obvious way: theobjects are natural numbers and the arrows m æ n are those diagrams withm inputs and n outputs; composition g ¶ f is formed by identifying the inputsof g with the outputs of f and erasing the corresponding vertices; f ¢ g is thediagram formed by the disjoint union of f and g with If ordered before Ig, andsimilarly for the outputs. This is basically the free (self-dual) compact categorygenerated by the arrows shown in Figure ??.
We can make this category †-compact by specifying that f† is the samediagram as f , but with the inputs and outputs exchanged, and all the anglesnegated.
This construction yields a category that does not incorporate the algebraicstructure of strongly complementary observables. To obtain the desired categorywe must quotient by the equations shown in Figure ??. We denote the categoryso-obtained by D.
Remark 3.5. The equations shown in Figure ?? are not exactly those describedin Sections ?? and ??, however they are equivalent to them. We shall therefore,on occasion, use properties discussed earlier as derived rules in computations.
Since D is a monoidal category we can assign an interpretation to any diagramby providing a monoidal functor from D to any other monoidal category. Sincewe interested in quantum mechanics, the obvious target category is fdHilb.
Definition 3.6. Let J·K : D æ fdHilb be a symmetric monoidal functor definedon objects by
J1K = C2
18
...
...
–...
...
– H
Figure 2: Interior vertices of diagrams
• X vertices with m inputs and n outputs, labelled by an angle – œ [0, 2fi);these are these are denoted Xm
n (–), and shown graphically as (dark) redcircles,
• H (or Hadamard) vertices, restricted to degree 2; shown as squares.
If a X or Z vertex has – = 0 then the label is entirely omitted. The allowedvertices are shown in Figure ??.
Since the inputs and outputs of of a diagram are totally ordered, we canidentify them with natural numbers and speak of the kth input, etc.
Remark 3.4. When a vertex occurs inside the graph, the distinction betweeninputs and outputs is purely conventional: one can view them simply as verticesof degree n + m; however, this distinction allows the semantics to be stated moredirectly, see below.
The collection of diagrams forms a compact category in the obvious way: theobjects are natural numbers and the arrows m æ n are those diagrams withm inputs and n outputs; composition g ¶ f is formed by identifying the inputsof g with the outputs of f and erasing the corresponding vertices; f ¢ g is thediagram formed by the disjoint union of f and g with If ordered before Ig, andsimilarly for the outputs. This is basically the free (self-dual) compact categorygenerated by the arrows shown in Figure ??.
We can make this category †-compact by specifying that f† is the samediagram as f , but with the inputs and outputs exchanged, and all the anglesnegated.
This construction yields a category that does not incorporate the algebraicstructure of strongly complementary observables. To obtain the desired categorywe must quotient by the equations shown in Figure ??. We denote the categoryso-obtained by D.
Remark 3.5. The equations shown in Figure ?? are not exactly those describedin Sections ?? and ??, however they are equivalent to them. We shall therefore,on occasion, use properties discussed earlier as derived rules in computations.
Since D is a monoidal category we can assign an interpretation to any diagramby providing a monoidal functor from D to any other monoidal category. Sincewe interested in quantum mechanics, the obvious target category is fdHilb.
Definition 3.6. Let J·K : D æ fdHilb be a symmetric monoidal functor definedon objects by
J1K = C2
18
↵ 2 [0, 2⇡)
Example: CNOTS
= = =
= = = =
–
– + —
=–
—
–1
–5–3
–2
–4
=q
i –i
1
Example: CNOTS
= = =
= = = =
–
– + —
=–
—
–1
–5–3
–2
–4
=q
i –i
1
Equational Reasoning= = =
= = = =
–
– + —
=–
—
–1
–5–3
–2
–4
=q
i –i
1
Equational Reasoning= = =
= = = =
–
– + —
=–
—
–1
–5–3
–2
–4
=q
i –i
1
Equational Reasoning= = =
= = = =
–
– + —
=–
—
–1
–5–3
–2
–4
=q
i –i
1
Equational Reasoning= = =
= = = =
–
– + —
=–
—
–1
–5–3
–2
–4
=q
i –i
1
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
=
1
Equational Reasoning
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
=
1
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
=
1
Equational Reasoning
= = =
= = = =
–
– + —
=–
—
–1
–5–3
–2
–4
=q
i –i
1
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
=
1
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
=
1
Equational Reasoning
= = =
= = = =
–
– + —
=–
—
–1
–5–3
–2
–4
=q
i –i
1
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
=
1
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
=
1
= = =
= = = =
–
– + —
=–
—
–1
–5–3
–2
–4
=q
i –i
1
Equational Reasoning
= = =
= = = =
–
– + —
=–
—
–1
–5–3
–2
–4
=q
i –i
1
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
=
1
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
=
1
= = =
= = = =
–
– + —
=–
—
–1
–5–3
–2
–4
=q
i –i
1
= = =
= = = =
–
– + —
=–
—
–1
–5–3
–2
–4
=q
i –i
1
Equational Reasoning
= = =
= = = =
–
– + —
=–
—
–1
–5–3
–2
–4
=q
i –i
1
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
=
1
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
=
1
= = =
= = = =
–
– + —
=–
—
–1
–5–3
–2
–4
=q
i –i
1
= = =
= = = =
–
– + —
=–
—
–1
–5–3
–2
–4
=q
i –i
1
Double Pushout Rewriting
Advertising
http://quantomatic.github.io
Graphical tool for doing graphical calculations:
Application: QECCZX-calculus can demonstrate the correctness Quantum Error Correcting Codes:
5.Compiling.
Oh look category theory can do something useful
Circuit Perspective
Z– Z–
X–
X–
1
Circuit Perspective
Z– Z–
X–
X–
1
Inputs
Outputs
Circuit PerspectiveZ– Z—
X“
X”
“
”
– —
1
Inputs
Outputs
Circuit PerspectiveZ– Z—
X“
X”
“
”
– —
1
Circuit PerspectiveZ– Z—
X“
X”
“
”
– —
1
??? Perspective
Z– Z—
X“
X”
“
”
– —
“”
– —
1
??? Perspective
Z– Z—
X“
X”
“
”
– —
“”
– —
1
??? Perspective
Z– Z—
X“
X”
“
”
– —
“”
– —
1
Hopf algebra expression
??? Perspective
Hopf algebra normal form
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
1
MBQC Perspective
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
1
Physicalqubits
MBQC Perspective
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
1
Prepared qubits
MBQC Perspective
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
1
Prepared qubits
Measured qubits
MBQC Perspective
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
1
Prepared qubits
Measured qubits
MBQC Perspective
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
1
Any ZX-calculus term can be interpreted as an MBQC in this way
NQIT Perspective
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
1
NQIT Perspective
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
1
NQIT Perspective
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
1
Few qubit ion traps
NQIT Perspective
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
1
Few qubit ion traps
Optical interconnect
NQIT Perspective
Z– Z—
X“
X”
“
”
– —
“”
– —“”
– —
1
Architecture
Few qubit ion traps
Optical interconnect
SUMMARY• Quantum computing needs a different logico-
algebraic basis to classical computing.
• Categorical analysis of concepts of QM reveals the key structures behind algorithms etc
• Diagrammatic syntax and DPO rewriting give tools to work efficiently with this theory
• New structural insights give new approaches and techniques to working with quantum computers