the zx-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · ross duncan quantum...

99
Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University of Strathclyde

Upload: others

Post on 22-Sep-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

The ZX-calculus

diagrams for quantum computing

Ross Duncan

University of Strathclyde

Page 2: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Pessimistic Diagram Convention

PAST / HEAVEN

FUTURE / HELL

Page 3: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

|�Í Input register

Quantum Circuits

|�ÕÍ Output register

Unita

ry g

ates

U : C2n - C2n

“Time”

Page 4: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

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:

Page 5: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

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:

Page 6: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

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

Page 7: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Quantum Circuits

Good Points: + Universal + Clear operational interpretation Bad points: - Inflexible - Mathematically ad hoc - Few nice algebraic properties

Page 8: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

What is the ZX-calculus?

• Abstract diagrammatic theory (GPT)

• Includes a lot of qubit quantum theory

• Based on the properties of the Pauli Z and X observables

Page 9: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

ZX-calculusGood Points: + Universal + Derived from the basic algebra of complementarity + Powerful algebraic theory + Can represent almost anything Bad point: - Need to impose operational meaning post-hoc Meh Point: - Not complete (see Simon Perdrix’s talk later!)

Page 10: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

WARNINGIn this talk:

• ignoring global scalar factors • mostly talking about pure states and processes

Linear maps Linear maps

A new process theory from an old one...

I The theory of pure quantum maps has types:

:=

bA

I and processes:

=bf

ff

for all processes f from linear maps.

Aleks Kissinger (QTFT, Vaxjo 2015) Picturing Quantum Processes June 9, 2015 10 / 33

Page 11: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

WARNINGIn this talk:

• ignoring global scalar factors • mostly talking about pure states and processes

Linear maps Linear maps

A new process theory from an old one...

I The theory of pure quantum maps has types:

:=

bA

I and processes:

=bf

ff

for all processes f from linear maps.

Aleks Kissinger (QTFT, Vaxjo 2015) Picturing Quantum Processes June 9, 2015 10 / 33

Page 12: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

|0i 7! |00i|1i 7! |11i

= = =

= = =

=

1

Page 13: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

|0i 7! |00i|1i 7! |11i

= = =

= = =

=

1

h0|+ ei↵ h1|

= = =

= = =

=

1

Page 14: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

|0i 7! |00i|1i 7! |11i

h0|+ ei↵ h1|

= = =

= = =

=

1

Page 15: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

|0i 7! |00i|1i 7! |11i

h0|+ ei↵ h1|

= = =

= = =

=

1

This is unitary

Page 16: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

|0i 7! |00i|1i 7! |11i

h0|+ ei↵ h1|

= = =

= = =

=

1

This is unitary

✓1 00 ei↵

Page 17: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

|0i 7! |00i|1i 7! |11i

h0|+ ei↵ h1|

= = =

= = =

=

1

This is unitary

✓1 00 ei↵

“Phase”

Page 18: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

=–

–1

–5–3

–2

–4

=q

i

–i

double

A–

B= ≠– –

double

Ak

B= k k k œ {0, fi}

double

Q

a k + fi

2

R

b = k ≠ fi

2 k + fi

2 k œ {0, fi}

k k

= k k œ {0, fi}

+ fi

2 ≠ fi

2

k ≠ fi

2 k + fi

2

=k k

= k k œ {0, fi}

+ fi

2 ≠ fi

2

–i–1 –

n

· · · · · · =q

i

–i

–i

œ [0, 2fi)

1

✓1 00 ei↵

✓1 00 ei�

Page 19: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

✓1 00 ei(↵+�)

= = =

= = =

=

1

Page 20: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

= = =

= = =

=

– + —

=–

1

Lemma: phases form an abelian group

Page 21: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

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

Page 22: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

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⇡)

Page 23: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

ZX-calculus semantics

...

...

–...

...

– 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

|+i⌦n 7! |+i⌦m

|�i⌦n 7! ei↵ |�i⌦m

|0i⌦n 7! |0i⌦m

|1i⌦n 7! ei↵ |1i⌦m

Page 24: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Representing Qubits

Page 25: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Representing Phase shifts

Page 26: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Representing Paulis

Page 27: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Representing CNot

Page 28: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

The ZX-calculus is universal

Theorem: Let U be a unitary map on n qubits; then there exists a ZX-calculus term D such that:

JDK = U

Page 29: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

The ZX-calculus is universal

Theorem: Let U be a unitary map on n qubits; then there exists a ZX-calculus term D such that:

JDK = U

7!

7!

7!

Page 30: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Equations

Page 31: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

EquationsGeneralised Spider

Page 32: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Equations

Page 33: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Equations“Strong Complementarity”

Page 34: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Equations

· · ·

· · ·

�2

↵+ n�2

�2

�2

�2

· · ·

· · ·

�⇡2

�⇡2 �⇡

2

�⇡2

=

(colour change)

Page 35: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Equations

· · ·

· · ·

�2

↵+ n�2

�2

�2

�2

· · ·

· · ·

�⇡2

�⇡2 �⇡

2

�⇡2

=

(colour change)

A weird one specific to ZX

Page 36: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Example: CNOTS

= = =

= = =

=

– + —

=–

–1

–5–3

–2

–4

=q

i –i

1

= = =

= = =

=

– + —

=–

–1

–5–3

–2

–4

=q

i –i

1

?

Page 37: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Example: CNOTS

= = =

= = = =

– + —

=–

–1

–5–3

–2

–4

=q

i –i

1

Page 38: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Representing Hadamard

fi2

fi2

fi2

H = 1Ô2

31 11 ≠1

4= J K

Page 39: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

More on the Hadamard

fi2

fi2

fi2

H :=

Page 40: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

More on the Hadamard

H H

H H

· · ·

· · ·

Page 41: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

More on the Hadamard

H H

H H

· · ·

· · ·

· · ·

· · ·

↵+ n�2

⇡2

�2

⇡2

�2

⇡2

�2

⇡2

�2

=

Page 42: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

More on the Hadamard

H H

H H

· · ·

· · ·

· · ·

· · ·

↵+ n�2

⇡2

�2

⇡2

�2

⇡2

�2

⇡2

�2

=

· · ·

· · ·

⇡2

⇡2

⇡2

⇡2

�⇡2 �⇡

2

�⇡2 �⇡

2

=

Page 43: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

More on the Hadamard

H H

H H

· · ·

· · ·

· · ·

· · ·

↵+ n�2

⇡2

�2

⇡2

�2

⇡2

�2

⇡2

�2

=

· · ·

· · ·

⇡2

⇡2

⇡2

⇡2

�⇡2 �⇡

2

�⇡2 �⇡

2

=

· · ·

· · ·

↵=

Corollary: total symmetry between red and green

Page 44: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Example: preparing a Bell stateExample 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

Proof. It su�ces to show that there are zx-calculus terms for the matrices Z–,H and ·X. We have

J H K = H, J – K = Z– and J K = ·X

which can be verified by direct calculation. Note that

J K = J K

so the presentation of ·X is unambiguous.

Example 3.12 (The ·Z-gate). The ·Z-gate can be obtained by using aHadamard (H) gate to transform the second qubit of a ·X gate. We obtain asimpler representation using the colour-change rule

H

H

= H

From the presentation of ·Z in the zx-calculus, we can immediately read o�that it is symmetric in its inputs. Furthermore, we can prove one of the basicproperties of the ·Z gate, namely that is self-inverse.

H

H

=H

H

=H

H

=H

H

=H

H

=

Example 3.13 (Bell state). The following is a zx-calculus term representing aquantum circuit which produces a Bell state, |00Í + |11Í. We can verify this factby the equations of the calculus.

H = = =

The corresponding zx-calculus derivation is a proof of the correctness of thiscircuit.

The zx-calculus can represent many things which do not correspond toquantum circuits. We now present a criterion to recognise which diagrams docorrespond to quantum circuits.

21

7!

Page 45: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Example: preparing a Bell state

Proof. It su�ces to show that there are zx-calculus terms for the matrices Z–,H and ·X. We have

J H K = H, J – K = Z– and J K = ·X

which can be verified by direct calculation. Note that

J K = J K

so the presentation of ·X is unambiguous.

Example 3.12 (The ·Z-gate). The ·Z-gate can be obtained by using aHadamard (H) gate to transform the second qubit of a ·X gate. We obtain asimpler representation using the colour-change rule

H

H

= H

From the presentation of ·Z in the zx-calculus, we can immediately read o�that it is symmetric in its inputs. Furthermore, we can prove one of the basicproperties of the ·Z gate, namely that is self-inverse.

H

H

=H

H

=H

H

=H

H

=H

H

=

Example 3.13 (Bell state). The following is a zx-calculus term representing aquantum circuit which produces a Bell state, |00Í + |11Í. We can verify this factby the equations of the calculus.

H = = =

The corresponding zx-calculus derivation is a proof of the correctness of thiscircuit.

The zx-calculus can represent many things which do not correspond toquantum circuits. We now present a criterion to recognise which diagrams docorrespond to quantum circuits.

21

Page 46: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Example: Controlled-Z

Proof. It su�ces to show that there are zx-calculus terms for the matrices Z–,H and ·X. We have

J H K = H, J – K = Z– and J K = ·X

which can be verified by direct calculation. Note that

J K = J K

so the presentation of ·X is unambiguous.

Example 3.12 (The ·Z-gate). The ·Z-gate can be obtained by using aHadamard (H) gate to transform the second qubit of a ·X gate. We obtain asimpler representation using the colour-change rule

H

H

= H

From the presentation of ·Z in the zx-calculus, we can immediately read o�that it is symmetric in its inputs. Furthermore, we can prove one of the basicproperties of the ·Z gate, namely that is self-inverse.

H

H

=H

H

=H

H

=H

H

=H

H

=

Example 3.13 (Bell state). The following is a zx-calculus term representing aquantum circuit which produces a Bell state, |00Í + |11Í. We can verify this factby the equations of the calculus.

H = = =

The corresponding zx-calculus derivation is a proof of the correctness of thiscircuit.

The zx-calculus can represent many things which do not correspond toquantum circuits. We now present a criterion to recognise which diagrams docorrespond to quantum circuits.

21

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

7!

Page 47: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Example: Controlled-Z

Proof. It su�ces to show that there are zx-calculus terms for the matrices Z–,H and ·X. We have

J H K = H, J – K = Z– and J K = ·X

which can be verified by direct calculation. Note that

J K = J K

so the presentation of ·X is unambiguous.

Example 3.12 (The ·Z-gate). The ·Z-gate can be obtained by using aHadamard (H) gate to transform the second qubit of a ·X gate. We obtain asimpler representation using the colour-change rule

H

H

= H

From the presentation of ·Z in the zx-calculus, we can immediately read o�that it is symmetric in its inputs. Furthermore, we can prove one of the basicproperties of the ·Z gate, namely that is self-inverse.

H

H

=H

H

=H

H

=H

H

=H

H

=

Example 3.13 (Bell state). The following is a zx-calculus term representing aquantum circuit which produces a Bell state, |00Í + |11Í. We can verify this factby the equations of the calculus.

H = = =

The corresponding zx-calculus derivation is a proof of the correctness of thiscircuit.

The zx-calculus can represent many things which do not correspond toquantum circuits. We now present a criterion to recognise which diagrams docorrespond to quantum circuits.

21

Page 48: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Which diagrams are circuits?

Defn: a diagram is called circuit-like if:

• All of its , , and boundary vertices can be covered by set of disjoint paths P, each of which ends in an output.

• The subgraph determined by each p in P is acyclic

• Every cycle in the diagram which overlaps with 2 paths in P traverses an edge in the opposite direction to P.

• It is 2-coloured (or 3-coloured, if including H)

Page 49: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Which diagrams are circuits?

H

Page 50: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Which diagrams are circuits?

HYES!

Page 51: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Which diagrams are circuits?

H

H

=

Page 52: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Which diagrams are circuits?

Page 53: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Which diagrams are circuits?

NO :(

Page 54: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Which diagrams are circuits?

H H

Page 55: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Which diagrams are circuits?

H HNO :(

Page 56: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Which diagrams are circuits?Thm: if a diagram is circuit-like then is a unitary embedding.

Being circuit-like is a stronger than being a unitary embedding: * particular gate set * particular representation * minimality w.r.t. to some of the rules. * &c …

Page 57: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Graph StatesLet G = (V,E) be a simple, undirected graph. Then define: !!!Viewed as circuit we get this:

|Gi =O

(v,u)2E

CZvu

Ov2V

|+i

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

Page 58: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Graph StatesLet G = (V,E) be a simple, undirected graph. Then define: !!!Viewed as circuit we get this:

|Gi =O

(v,u)2E

CZvu

Ov2V

|+i

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

Page 59: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Graph StatesLet G = (V,E) be a simple, undirected graph. Then define: !!!But we can also view it as a PEPS:

|Gi =O

(v,u)2E

CZvu

Ov2V

|+i

· · · · · ·

kx

1 ky

1 ky

2kx

2 ky

3kx

3

fi

X XYX YX YXY XYY

fi fi

fi fi fi

fi

”= fi

H H H H H H H

2

Page 60: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Graph StatesLet G = (V,E) be a simple, undirected graph. Then define: !!!!

|Gi =O

(v,u)2E

CZvu

Ov2V

|+i

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

Page 61: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Graph StatesLet G = (V,E) be a simple, undirected graph. Then define: !!!Or in 2D:

|Gi =O

(v,u)2E

CZvu

Ov2V

|+i

· · · · · ·

kx

1 ky

1 ky

2kx

2 ky

3kx

3

fi

X XYX YX YXY XYY

fi fi

fi fi fi

fi

”= fi

2

Page 62: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Graph StatesLet G = (V,E) be a simple, undirected graph. Then define: !!!Or in 2D:

|Gi =O

(v,u)2E

CZvu

Ov2V

|+i

· · · · · ·

kx

1 ky

1 ky

2kx

2 ky

3kx

3

fi

X XYX YX YXY XYY

fi fi

fi fi fi

fi

”= fi

2

Page 63: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Hopf Algebra Equivalence

Thm: any Hopf algebra expression can be put into normal form:

Page 64: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Application 1: MBQC

1WQC is a quantum computer design based on single qubit projective measurements on a graph state. !• We can use the ZX-calculus to translate from the 1WQC to

circuit model • Relies on the Hopf algebra normal form • Produces circuits with minimal space complexity

Page 65: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

GFlow Strategy

Page 66: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Flow Strategy

Page 67: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Application 2: QECCZX-calculus can demonstrate the correctness Quantum Error Correcting Codes:

Page 68: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Application 3: Mermin-GHZThe Mermin-GHZ argument is a no-go result for LHV theories which does not rely on probabilities. !We can show:

• The argument can be carried out in the ZX-calculus • Any pair of observables satisfying the assumptions of

the argument are strongly complementary.

Page 69: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Mermin-GHZ|GHZi = |000i+ |111i

X X X

X Y Y

Y X Y

Y Y X

Page 70: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Mermin-GHZ|GHZi = |000i+ |111i

X X X +1

X Y Y -1

Y X Y -1

Y Y X -1

-1

QM

Page 71: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Mermin-GHZ|GHZi = |000i+ |111i

X X X +1

X Y Y -1

Y X Y -1

Y Y X -1

+1 +1 +1 +1 ≠ -1

LHV

Page 72: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Ingredients:

• Doubling (like in Aleks’s talk) • Measurements of X and Y • Parity computation on the outcomes • GHZ state • LHV state

Page 73: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

DoublingQuantum systems —> Double wires Classical systems —> Single wires

Linear maps

Quantum spiders

I A quantum spider is a classical spider, doubled:

...

...:= double

...

...

!=

...

...

I An example is the GHZ state:

GHZ := = double

Pi

i i i

!

I They also fuse:...

...

...

...

... =

...

...

Aleks Kissinger (QTFT, Vaxjo 2015) Picturing Quantum Processes June 10, 2015 21 / 26

–1

–5–3

–2

–4

=q

i –i

double

A–

B= ≠– –

1

Page 74: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

DoublingEigenstates of X and Y

–1

–5–3

–2

–4

=q

i –i

double

A–

B= ≠– –

double

Ak

B= k k k œ {0, fi}

double

Q

a k + fi2

R

b = k ≠ fi2 k + fi

2 k œ {0, fi}

≠k k

= k k œ {0, fi}

1

–1

–5–3

–2

–4

=q

i –i

double

A–

B= ≠– –

double

Ak

B= k k k œ {0, fi}

double

Q

a k + fi2

R

b = k ≠ fi2 k + fi

2 k œ {0, fi}

≠k k

= k k œ {0, fi}

1

–1

–5–3

–2

–4

=q

i –i

double

A–

B= ≠– –

double

Ak

B= k k k œ {0, fi}

double

Q

a k + fi2

R

b = k ≠ fi2 k + fi

2 k œ {0, fi}

≠k k

= k k œ {0, fi}

1

Page 75: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

MeasurementsX Measurement:

–1

–5–3

–2

–4

=q

i –i

1

Sanity check:

–1

–5–3

–2

–4

=q

i –i

double

A–

B= ≠– –

double

Ak

B= k k k œ {0, fi}

double

Q

a k + fi2

R

b = k ≠ fi2 k + fi

2 k œ {0, fi}

k k

= k k œ {0, fi}

1

Page 76: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

MeasurementsY Measurement:

Sanity check:

–1

–5–3

–2

–4

=q

i –i

double

A–

B= ≠– –

double

Ak

B= k k k œ {0, fi}

double

Q

a k + fi2

R

b = k ≠ fi2 k + fi

2 k œ {0, fi}

k k

= k k œ {0, fi}

+ fi2 ≠ fi

2

1

–1

–5–3

–2

–4

=q

i –i

double

A–

B= ≠– –

double

Ak

B= k k k œ {0, fi}

double

Q

a k + fi2

R

b = k ≠ fi2 k + fi

2 k œ {0, fi}

k k

= k k œ {0, fi}

+ fi2 ≠ fi

2

k ≠ fi2 k + fi

2

=k k

= k k œ {0, fi}

+ fi2 ≠ fi

2

1

Page 77: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Parity Computation

–1

–5–3

–2

–4

=q

i –i

double

A–

B= ≠– –

double

Ak

B= k k k œ {0, fi}

double

Q

a k + fi2

R

b = k ≠ fi2 k + fi

2 k œ {0, fi}

k k

= k k œ {0, fi}

+ fi2 ≠ fi

2

k ≠ fi2 k + fi

2

=k k

= k k œ {0, fi}

+ fi2 ≠ fi

2

–i–1 –n· · · · · · =

qi –i

–i œ [0, 2fi)

+ fi2 ≠ fi

2

kik1 kn· · · · · · =

qi ki

ki œ {0, fi}

1

Page 78: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Parity Computation

–1

–5–3

–2

–4

=q

i –i

double

A–

B= ≠– –

double

Ak

B= k k k œ {0, fi}

double

Q

a k + fi2

R

b = k ≠ fi2 k + fi

2 k œ {0, fi}

k k

= k k œ {0, fi}

+ fi2 ≠ fi

2

k ≠ fi2 k + fi

2

=k k

= k k œ {0, fi}

+ fi2 ≠ fi

2

–i–1 –n· · · · · · =

qi –i

–i œ [0, 2fi)

+ fi2 ≠ fi

2

kik1 kn· · · · · · =

qi ki

ki œ {0, fi}

1

Page 79: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Parity Computation

· · · · · ·

2

Page 80: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

GHZ State· · · · · ·

double

3 4=

2

Page 81: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Measuring the GHZ state· · · · · ·

double

3 4=

≠–1+–1 +–2 ≠–2 +–3 ≠–3

≠q

i –iq

i –i

≠q

i –iq

i –i

2

Page 82: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Measuring the GHZ state

+ fi

2 ≠ fi

2

kik1 k

n

· · · · · · =q

i

ki

ki

œ {0, fi}

· · · · · ·

≠–1+–1 +–2 ≠–2 +–3 ≠–3

≠q

i

–i

qi

–i

≠q

i

–i

qi

–i

kx

1 ky

1 ky

2kx

2 ky

3kx

3

2

Page 83: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Measuring the GHZ state

· · · · · ·

double

3 4=

≠–1+–1 +–2 ≠–2 +–3 ≠–3

≠q

i –iq

i –i

≠q

i –iq

i –i

2

Page 84: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Measuring the GHZ state: XXX

· · · · · ·

double

3 4=

≠–1+–1 +–2 ≠–2 +–3 ≠–3

≠q

i –iq

i –i

≠q

i –iq

i –i

2

Page 85: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Measuring the GHZ state: XXX

· · · · · ·

double

3 4=

≠–1+–1 +–2 ≠–2 +–3 ≠–3

≠q

i –iq

i –i

≠q

i –iq

i –i

2

Page 86: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Measuring the GHZ state

· · · · · ·

double

3 4=

≠–1+–1 +–2 ≠–2 +–3 ≠–3

≠q

i –iq

i –i

≠q

i –iq

i –i

2

Page 87: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Measuring the GHZ state: XYY

· · · · · ·

double

3 4=

≠–1+–1 +–2 ≠–2 +–3 ≠–3

≠q

i –iq

i –i

≠q

i –iq

i –i

fi fi

fi

2

Page 88: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Measuring the GHZ state: XYY

· · · · · ·

double

3 4=

≠–1+–1 +–2 ≠–2 +–3 ≠–3

≠q

i –iq

i –i

≠q

i –iq

i –i

fi fi

fi

2

Page 89: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Local Hidden State⇤ = (kx1 , k

y

1 , kx

2 , ky

2 , kx

3 , ky

3)

· · · · · ·

double

3 4=

≠–1+–1 +–2 ≠–2 +–3 ≠–3

≠q

i

–i

qi

–i

≠q

i

–i

qi

–i

fi fi

fi

kx

1 ky

1 ky

2kx

2 ky

3kx

3

2

Page 90: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

kx

1 ky

1 ky

2kx

2 ky

3kx

3

X XYX YX YXY XYY

3

Local Hidden State⇤ = (kx1 , k

y

1 , kx

2 , ky

2 , kx

3 , ky

3)

Page 91: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Parity of LHV outcomeskx

1 ky

1 ky

2kx

2 ky

3kx

3

X XYX YX YXY XYY

kx

1 ky

1 ky

2kx

2 ky

3kx

3

3

Page 92: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Parity of LHV outcomeskx

1 ky

1 ky

2kx

2 ky

3kx

3

3

Page 93: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Parity of LHV outcomeskx

1 ky

1 ky

2kx

2 ky

3kx

3

kx

1 ky

1 ky

2kx

2 ky

3kx

3

3

Page 94: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Parity of QM outcomes· · · · · ·

fi

X XYX YX YXY XYY

fi fi

fi fi fi

fi

2

Page 95: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Parity of QM outcomes

· · · · · ·

fi

X XYX YX YXY XYY

fi fi

fi fi fi

fi

2

Page 96: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Parity of QM outcomes

· · · · · ·

fi

X XYX YX YXY XYY

fi fi

fi fi fi

fi

2

Page 97: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Contradiction!

· · · · · ·

kx

1 ky

1 ky

2kx

2 ky

3kx

3

fi

X XYX YX YXY XYY

fi fi

fi fi fi

fi

”= fi

2

Page 98: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Comments

• The proof relied on the strong complementarity of X and Z • This can be generalised to higher dimensions, with some

other abelian group replacing parity • We have the following converse: The assumptions used by Mermin imply the observables in the proof must be strongly complementary

Page 99: The ZX-calculuspersonal.strath.ac.uk/ross.duncan/talks/2015/vaxjo.pdf · Ross Duncan Quantum Foundations Växjo 2015 The ZX-calculus diagrams for quantum computing Ross Duncan University

Ross Duncan ●Quantum Foundations ● Växjo 2015

Thanks!XZ-calculus: B. Coecke and RD, Interacting Quantum Observables: Categorical Algebra and Diagrammatics; NJP (2011), arXiv:0906.4725 MBQC: RD and S. Perdrix, Rewriting measurement-based quantum computations with generalised flow, ICALP (2010), doi:10.1007/978-3-642-14162-1\_24 RD, A graphical approach to measurement-based quantum computing, Quantum Physics and Linguistics, OUP 2011 arxiv:1203.6242 Steane Code RD and Maxime Lucas, Verifying the Steane code with Quantomatic, QPL 2013, doi:10.4204/EPTCS.171.4 GHZ-Mermin: B. Coecke, RD, A. Kissinger, Q. Wang, Strong Complementarity and Non-locality in Categorical Quantum Mechanics, LiCS 2012, doi: 10.1109/LICS.2012.35 B. Coecke, RD, A. Kissinger, Q. Wang, Generalised Compositional Theories and Diagrammatic Reasoning; forthcoming in Giulio and Rob’s book; arxiv soon!