elements of quantum computation · elements of quantum computation quantum physics and concepts...

56
Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky [email protected] BISS Spring School Bertinoro 2018 1 / 112 Overview Topics we will cover in this course will include: 1. Quantum Computation I Basic Quantum Physics I Mathematical Structure I Quantum Circuit Model I Quantum Cryptography 2. Quantum Algorithms I Deutsch Problem I Quantum Teleportation I Gover’s Search Algorithm I Shor’s Quantum Factorisation 3. Further Topics 2 / 112

Upload: others

Post on 28-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Elements of Quantum ComputationQuantum Physics and Concepts

Herbert [email protected]

BISS Spring SchoolBertinoro 2018

1 / 112

Overview

Topics we will cover in this course will include:

1. Quantum ComputationI Basic Quantum PhysicsI Mathematical StructureI Quantum Circuit ModelI Quantum Cryptography

2. Quantum AlgorithmsI Deutsch ProblemI Quantum TeleportationI Gover’s Search AlgorithmI Shor’s Quantum Factorisation

3. Further Topics

2 / 112

Page 2: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Text Books

I Noson S. Yanofsky, Mirco A. Mannucci: QuantumComputing for Computer Scientists, Cambridge, 2008

I Michael A. Nielsen, Issac L. Chuang: QuantumComputation and Quantum Information, Cambridge, 2000

I Phillip Kaye, Raymond Laflamme, Michael Mosca: AnIntroduction to Quantum Computing, Oxford 2007

I N. David Mermin: Quantum Computer Science,Cambridge University Press, 2007

I A. Yu. Kitaev, A. H. Shen, M. N. Vyalyi: Classical andQuantum Computation, AMS, 2002

I Eleanor Rieffel, Wolfgang Polak: Quantum Computing, AGentle Introduction. MIT Press, 2014

I Richard J. Lipton, Kenneth W. Regan: Quantum Algorithmsvia Linear Algebra. MIT Press, 2014

3 / 112

Electronic ResourcesIntroductory Texts

I E.Rieffel, W.Polak: An introduction to quantum computingfor non-physicists. ACM Computing Surveys, 2000doi:10.1145/367701.367709

I N.S.Yanofsky: An Introduction to Quantum Computinghttp://arxiv.org/abs/0708.0261

Preprint Repository http://arxiv.org

Physics Background

I Chris J. Isham: Quantum Theory – Mathematical andStructural Foundations, Imperial College Press 1995

I Richard P. Feynman, Robert B. Leighton, Matthew Sands:The Feynman Lectures on Physics, Addison-Wesley 1965

4 / 112

Page 3: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Quantum Money (Stephen Wiesner 1960s)Quantum Postulates: (i) It is impossible to clone a quantumstates, (ii) in general, an inspection of a quantum state isirreversible and destructive.

Bank of Quantum issue bank notes with a unique quantumcode.

Quantum Forger tries to make a copy of quantum money,however

I she can’t copy/clone a banknote directly, andI when she inspects it, she destroys the code.

Bank of Quantum can inspect the quantum code on abanknote

I to confirm it is authentic, and thenI issue a replacement quantum banknote.

Simon Singh: Code Book, Forth Estate, 1999.5 / 112

Quantum Physics

6 / 112

Page 4: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Quantum History

Quantum Mechanics was ‘born’ or proposed by M.Plank on

14 December 1900, 5:15pm (Berlin)

1900 Max Plank: Black Body Radiation1905 Albert Einstein: Photoelectric Effect1925 Werner Heisenberg: Matrix Mechanics1926 Erwin Schrödinger: Wave Mechanics1932 John von Neumann: Quantum Mechanics

Manjit Kumar: Quantum – Einstein, Bohr and Their GreatDebate about the Nature of Reality, Icon Books 2009

7 / 112

Photoelectric Effect – Millikan Experiment

Experimental Setup:

ν

Observed: The velocity, and thus kinetic energy, of the emittedelectrons depends not on the intensity of the incoming light butonly on its “colour”, i.e. frequency ν.

8 / 112

Page 5: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Radiation Law

Observed relationship:

Wk = hν −We

Wk . . . Kinetic Energy of ElectronWe . . . Escape Energy of Materialν . . . Frequency of Lighth . . . Plank’s Constant

h = 6.62559 · 10−34Js

~ =h

2π= 1.05449 · 10−34Js

9 / 112

Quantum Physical ProblemsAround 1900 there were a number of experiments andobservations which could not be explained using classicalphysics/mechanics, among them:

Spectra of ElementsEmission/absorption only at particular “colours”.

Stern-Gerlach ExperimentInterference in double slit experiment.

Black Body RadiationRadiation law involves “quantised” energy levels.

Photo-Electric EffectEinstein’s explanation got him the Nobel prize.

These were the perhaps most exciting years in the history oftheoretical physics, at the same time there were alsobreakthroughs in special and general relativity, etc.

10 / 112

Page 6: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Einstein’s ExplanationAlbert Einstein 1905: Not all energy levels are possible, theyonly come in quantised portions. In Bohr’s (incomplete) “model”of the atom this corresponds to allowing only particular “orbits”.

In this way one can also explain the spectral emissions (andabsorption) of various elements, e.g. to analyse the materialcomposition of stars (and to make great fireworks).

11 / 112

Quantum Paradoxes and Myths

There are a number of physical problems which requirequantum mechanical explanations. Unfortunately, QM is not‘really intuitive’. This leads to various Gedanken experimentswhich point to a contradiction with so-called common sense.

I Black Body RadiationI Double Slit ExperimentI Spectral EmissionsI Schrödinger’s CatI Einstein-Podolsky-RosenI Quantum Teleportation

7. Whereof one cannot speak, thereof one must be silent.Ludwig Wittgenstein: Tractatus Logico-Philosophicus, 1921

12 / 112

Page 7: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

From Quantum Physics to Computation

There are a number of disciplines which play an important rolein trying to understand quantum mechanics and in particularquantum computation.

Philosophy: What is the nature and meaning reality?Logic: How can one reason about events, objects etc.?

Mathematics: How does the formal model look like?Physics: Why does it work and what does it imply?

Computation: What can be computed and how?Engineering: How can it all be implemented?

Each area has its own language which however often appliesonly to classical entities – for the quantum world we often havesimply the wrong vocabulary.

13 / 112

Natural Philosophy

Arguably, physics is ultimately about explaining experimentsand forecasting measurement results.

Observable: Entities which are (actually) measured when anexperiment is conducted on a system.

State: Entities which completely describe (or model) thesystem we are interested in.

Measurement brings together/establishes a relation betweenstates and observables of a given system. Dynamics describeshow observables and/or the state changes over time.

Related Questions: What is our knowledge of what? How dowe obtain this information? What is a description on how thesystem changes?

14 / 112

Page 8: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Harmonic Oscillator or just a “Shadow”One can observe the same “behaviour” of the shadow of arotating object or an object on a spring.

x

y

φ

m

Observable: Shadow mState: Position (x , y) or: Phase φ

Measurement: m((x , y)) = y , or: m(φ) = sin(φ)

Dynamics: (x , y)(t) = (cos(t), sin(t)) or also: φ(t) = t

15 / 112

Postulates for Quantum Mechanics (C*-algebra)

I Observables and states of a system are represented byhermitian (i.e. self-adjoint) elements a of a C*-algebra Aand by states w (i.e. normalised linear functionals) overthis algebra.

I Possible results of measurements of an observable a aregiven by the spectrum Sp(a) of an observable. Theirprobability distribution in a certain state w is given by theprobability measure µ(w) induced by the state w on Sp(a).

Walter Thirring: Quantum Mathematical Physics, Springer 2002

Key Notions: A quantum systems is (may be) in a certain state,but physicists have to decide which properties they want toobserve before a measurement is made (which instrument?).

16 / 112

Page 9: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Postulates for Quantum Mechanics (ca. 1950)I The quantum state of a (free) particle is described by a

(normalised) complex valued [wave] function:

~ψ ∈ L2 i.e.∫|~ψ(x)|2dx = 1

I Two quantum states can be superimposed, i.e.

ψ = α1 ~ψ1 + α2 ~ψ2 with |α1|2 + |α2|2 = 1

I Any observable A is represented by a linear, self-adjointoperator A on L2.

I Possible measurement results are (only) the eigen-valuesλi of A corresponding to eigen-vectors/states ~φi ∈ L2 with

A~φi = λi ~φi

I Probability to measure (the possible eigenvalue) λn if thesystem is in the state ~ψ =

∑i ψi ~φi is

Pr(A = λn | ~ψ) = |ψn|2

17 / 112

Mathematical Framework

Quantum mechanics has a well-established and precisemathematical formulation (though its ‘common sense’interpretation might be non-intuitive, probabilistic, etc.).

The (standard) mathematical model of quantum system uses:I Complex Numbers C,I Vector Spaces, e.g. Cn,I Hilbert Spaces, i.e. inner products 〈.|.〉,I Unitary and Self-Adjoint Matrices/Operators,I Tensor Products C2 ⊗ C2 ⊗ . . .⊗ C2.

There are additional mathematical details in order to deal with“real” quantum physics, e.g. systems an infinite degree offreedom; for quantum computation it is however enough tostudy finite-dimensional Hilbert spaces.

18 / 112

Page 10: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Quantum Postulates I – States and Observables

The standard mathematical model of (closed) quantumsystems is relatively simple and just requires some basicnotions in (complex) linear algebra.

I The information describing the state of an (isolated)quantum mechanical system is representedmathematically by a (normalised) vector in a complexHilbert space H.

I An observable is represented mathematically by a self-adjoint matrix (operator) A acting on the Hilbert space H.

Two states can be combined to form a new state α |x〉+ β |y〉as long as |α|2 + |β|2 = 1, by superposition.

Consequence: We can compute with many inputs in parallel.

19 / 112

Quantum States and NotationThe state of a quantum mechanical system is usually denotedby |x〉 ∈ H (rather than maybe ~x ∈ H). This notation is‘inherited’ from the inner product 〈x |y〉 of vectors x and y in aHilbert space – which can be seen as describing the “geometricangle” between the two vectors in H.

P.A.M. Dirac “invented” the bra-ket notation (most likelyinspired by the limitations of old mechanical type-writers);Simply “take the inner product apart” to denote vectors in H:

inner product 〈x |y〉 = product 〈x | · |y〉

For indexed sets of vectors xi (maybe because typographic“typing” was problematic) different notations are used:

xi = ~xi = xi = |i〉

20 / 112

Page 11: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Quantum States and Vectors

Finite quantum states can be described by vectors in Cn, e.g.

~ψ = |ψ〉 =

(1/√

21/√

2

)=

1√2

(11

)or 〈φ| =

(1 0

)Observables are defined by matrices A inM(Cn) = Cn×n.

A =

(1 00 2

)with eigenvalues λ0 = 1, λ1 = 2

Note: There are sometimes two types of indicesI for enumerating, for example, all eigenvectors of an

operator like A with |0〉 =

(01

)and |1〉 =

(10

)I to enumerate coordinates of one vector, e.g. ~ψ1 = 1/

√2,

or better perhaps: |0〉1 = 0.

21 / 112

Quantum Postulates II – Measurement

I The expected result (average) when measuring observableA of a system in state |x〉 ∈ H is given by:

〈A〉x = 〈x |A |x〉 = 〈x | |Ax〉

I The only possible results are eigen-values λi of A.I The probability of measuring λn in state |x〉 is

Pr(A = λn|x) = 〈x |Pn |x〉

with Pn the orthogonal projection onto the n-th eigen-space of A generated by eigen-vector |λn〉

Pn = |λn〉 〈λn|

then we have: A =∑

i λiPi (Spectral Theorem).

22 / 112

Page 12: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Heisenberg’s Uncertainty Relation

TheoremFor two observables A1 and A2 we have:

(∆|x〉A1)(∆|x〉A2) ≥ 12|(〈x | [A1,A2] |x〉)|

where the uncertainty (classically: variance) is defined by

(∆|x〉A)2 = 〈x | A2 |x〉 − 〈x | A |x〉2

and the commutator is defined as:

[A1,A2] = A1A2 − A2A1

see e.g. Isham: Quantum Theory, ICP 1995, Section 7.3.3.

23 / 112

Classical vs Quantum MechanicsThe usual interpretation of Heisenberg’s uncertainty relation isthis: When one tries to measures two observables A1 and A2then – if the commutator [A1,A2] is non-zero – a small ∆|x〉A1implies a large ∆|x〉A2, and vice versa.

A standard example of so-called incomensurable observablesare position A1 = x and momentum A2 = p (on an infinite-dimensional Hilbert Space H) for which [x ,p] = i~ and thus:

∆x∆p ≥ ~/2.

In classical physics observables always commute, arecomensurable, i.e. [A1,A2] = 0. In quantum physics for mostobservables [A1,A2] 6= 0, i.e. the observable algebra is typicallynon-commutative or non-abelian (cf. multiplication of (complex)numbers vs multiplication of matrices).

24 / 112

Page 13: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Quantum DynamicsI The dynamics of a (closed) system is described by the

Schrödinger Equation:

i~d |x〉

dt= H |x〉

for the (self-adjoint) Hamiltonian operator H (energy).I The solution is a unitary operator Ut (e.g. Isham 6.4)

Ut = exp(− i~

tH)

TheoremFor any self-adjoint operator A the operator

exp(iA) = eiA =∞∑

n=0

(iA)n

n!

is a unitary operator.25 / 112

Irreversible vs ReversibleThere are a number of immediate consequence of thepostulates.

1. The state develops reversibly, i.e. |xt〉 = Ut |x0〉 for someunitary matrix (operator).Consequence: No cloning theorem, i.e. no duplication ofinformation.

2. Measurement is partial (Heisenberg Uncertainty Relation).Consequence: The full state of a quantum computer is notobservable.

3. Measurement is irreversible.Consequence: The state of a quantum system isirrevocably destroyed if we inspect it.

The mathematical structure has also consequences for anyQuantum Logic, e.g. De Morgan fails, ‘Tertium non datur’ isnot guaranteed, etc.

26 / 112

Page 14: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Quantum States and Evolution

27 / 112

Quantum Physics vs Quantum Computation

Quantum PhysicsGiven a quantum system (device).What is its dynamics?

I Heisenberg Picture:

A 7→ At = A(t) = eitHAe−itH

I Schrödinger Picture:

|x〉 7→ |x〉t = |x(t)〉 = e−itH |x〉

Quantum ComputationGiven a desired computation (dynamics).What quantum device (e.g. circuit) is needed to obtain this?

28 / 112

Page 15: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Quantum ComputationQuantum computation tries to utilise quantum systems/devicesin order to perform computational tasks or to implement(secure) quantum communication protocols.

1973 C. Bennett: Reversible Computation1980 P.A. Benioff: Quantum Turing Machine1982 R. Feynman: Quantum Simulation1985 D. Deutsch: Universal QTM1994 P. Shor: Factorisations1996 L. Grover: Database Search2008 Harrow, Hassidim, Lloyd: Linear Equations

When will (cheap) quantum computers be available? What willbe a killer application for quantum computation? When will wereach quantum supremacy?

29 / 112

Quantum Postulates

I The state of an (isolated) quantum system is representedby a (normalised) vector in a complex Hilbert space H.

I An observable is represented by a self-adjoint matrix(operator) A acting on the Hilbert space H.

I The expected result (average) when measuring observableA of a system in state |x〉 ∈ H is given by:

〈A〉x = 〈x |A |x〉 = 〈x | |Ax〉

I The only possible results are eigen-values λi of A.I The probability of measuring λn in state |x〉 is given by:

Pr(A = λn|x) = 〈x |Pn |x〉 = 〈x | |Pnx〉

with Pn = |λn〉〈λn| the orthogonal projection onto the spacegenerated by eigen-vector |λn〉 = |n〉 of A.

30 / 112

Page 16: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Complex NumbersQuantitative information, e.g. measurement results, is usuallyrepresented by real numbers R. For quantum systems we needto consider also complex numbers C.

A complex number z ∈ C is a (formal) combinations of tworeals x , y ∈ R:

z = x + iy

with i2 = −1 or i =√−1. The complex conjugate of a complex

number z = x + iy ∈ C is:

z∗ = z = x + iy = x − iy = z†

Hauptsatz of AlgebraComplex numbers are algebraically closed: Every polynomialof order n over C has exactly n roots.

31 / 112

Polar CoordinatesOne can represent numbers z ∈ C using the complex plane.

x

y φ

r

Conversion:x = r · cos(φ) y = r · sin(φ)

r =√

x2 + y2 φ = arctan(yx

)

Another representation:

(r , φ) = r · eiφ eiφ = cos(φ) + i sin(φ),

32 / 112

Page 17: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Computational Quantum StatesConsider a simple systems with two degrees of freedom.

|0〉 |1〉

DefinitionA qubit (quantum bit) is a quantum state of the form

|ψ〉 = α |0〉+ β |1〉

where α and β are complex numbers with |α|2 + |β|2 = 1.Qubits live in a two-dimensional complex vector, moreprecisely, Hilbert space C2 and are normalised, i.e.‖ |ψ〉 ‖ = 〈ψ | ψ〉 = 1.

33 / 112

Vector SpacesA Vector Space (over a field K, e.g. R or C) is a set V togetherwith two operations:

Scalar Product . ·. : K× V 7→ VVector Addition .+. : V × V 7→ V

such that ∀x,y, z ∈ V and α, β ∈ K:

1. x + (y + z) = (x + y) + z2. x + y = y + x3. ∃o : x + o = x4. ∃−x : x + (−x) = o

5. α(x + y) = αx + αy6. (α + β)x = αx + βx7. (αβ)x = α(βx)

8. 1x = x (1 ∈ K)

34 / 112

Page 18: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Tuple Spaces

TheoremAll finite dimensional vector spaces are isomorphic to the (finite)Cartesian product of the underlying field Kn (i.e. Rn or Cn).

~x = (x1, x2, x3, . . . , xn) represents x =n∑

i=1

xibi

~y = (y1, y2, y3, . . . , yn) represents y =n∑

i=1

yibi

Finite dimensional vectors can be represented as tuples viatheir coordinates with respect to a base bini=1.

α~x = (αx1, αx2, αx3, . . . , αxn)

~x + ~y = (x1 + y1, x2 + y2, x3 + y3, . . . , xn + yn)

35 / 112

Hilbert Spaces

A complex vector space H is called an Inner Product Space or(Pre-)Hilbert Space if there is a complex valued function 〈., .〉on H×H that satisfies ∀x,y, z ∈ H and ∀α ∈ C:

1. 〈x,x〉 ≥ 02. 〈x,x〉 = 0 ⇐⇒ x = o3. 〈αx,y〉 = α 〈x,y〉4. 〈x + y, z〉 = 〈x, z〉+ 〈y, z〉5. 〈x,y〉 = 〈y,x〉

The function 〈., .〉 is called an inner product on H.

36 / 112

Page 19: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Caveat: Linear in first or second argument?Mathematical Convention:

〈αx,y〉 = α 〈x,y〉

Physical Convention:

〈x | αy〉 = α 〈x | y〉

In mathematics we have:

〈x, αy〉 = 〈αy,x〉 = α〈y,x〉 = α 〈x,y〉

For physicists it is simply:

〈x | αy〉 = α 〈x | y〉

37 / 112

Basis VectorsA set of vectors xi is said to be linearly independent iff∑

λixi = o implies that ∀ i : λi = 0

Two vectors in a Hilbert space are orthogonal iff

〈x,y〉 = 0

An orthonormal system in a Hilbert space is a set of linearlyindependent set of vectors with:⟨

bi ,bj⟩

= δij =

1 iff i = j0 iff i 6= j

TheoremFor a Hilbert space there exists an orthonormal basis b. Therepresentation of each vector is unique:

x =∑

i

xibi =∑

i

〈x,bi〉bi

38 / 112

Page 20: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

The Finite-Dimensional Hilbert Spaces Cn

We represent vectors and their transpose using coordinates:

~x =

x1...

xn

= |x〉 , ~y = (y1, . . . , yn) =

y1...

yn

T

= 〈y |

The adjoint of ~x = (x1, . . . , xn) is given by

~x† = (x1, . . . , xn)T = (x∗1 , . . . , x∗n )T

The inner product is then represented by:⟨~y , ~x

⟩=∑

i

yixi =∑

i

y∗i xi

We can also define a norm (length) ‖~x‖ =√⟨

~x , ~x⟩.

39 / 112

Dual and Adjoint States

A linear functional on a vector space V is a map f : V → K suchthat (i) f (x + y) = f (x) + f (y) and (ii) f (αx) = αf (x) for allx,y ∈ V, α ∈ K.The space of all linear functionals on V form the dual space V∗.

Theorem (Riesz Representation Theorem)Every linear functional f : H → C on a Hilbert space H can berepresented by a vector yf in H, such that

f (x) = 〈yf ,x〉 = fy (x)

Dual Hilbert spaces H∗ are isomorphic to the original Hilbertspace H∗; in particular we have: (Cn)∗ = Cn.

We represent vectors or ket-vectors as column vectors; andfunctionals, dual vector or bra-vectors as row vectors.

40 / 112

Page 21: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Dirac Notation and Einstein ConventionWe will use throughout P.A.M. Dirac’s bra-(c)-ket notation:⟨

xi ,yj⟩

=⟨~xi , ~yj

⟩denoted as 〈xi |

∣∣yj⟩

= 〈i | |j〉

We will enumerate the (eigen-)base vectors (of an operator):

~bi = bi or ~ei = ei are denoted by |i〉

but we may need also to specify the coordinates of a vector:I Ket-Vectors (column): |x〉 = (xj)

nj=1 in Cn.

I Bra-Vectors (row): 〈x | = (x j)nj=1 in (Cn)∗ = Cn.

A. Einstein: If in an expression there are matching sub- andsuper-scripts then this implicitely indicates a summation,

xiy i =∑

i

xiy i =⟨~x , ~y

⟩and xiy i∗ =

∑i

xi y i =⟨~x | ~y

⟩41 / 112

Qubit

The postulates of Quantum Mechanics simply require that acomputational quantum state is represented by a normalisedvector in Cn. A qubit is a two-dimensional quantum state in C2

We represent the coordinates of a qubit (state) or ket-vectoras a column vector:

|ψ〉 =

(αβ

)= α

(10

)+ β

(01

)= α |0〉+ β |1〉

with respect to the (orthonormal) basis |0〉 , |1〉, i.e. theso-called standard base:

|0〉 =

(10

)and |1〉 =

(01

)

42 / 112

Page 22: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Representing a Qubit [∗]A qubit |ψ〉 = α |0〉+ β |1〉 with |α|2 + |β|2 = 1 can berepresented:

|ψ〉 = cos(θ/2) |0〉+ eiϕ sin(θ/2) |1〉 ,

where θ ∈ [0, π] and ϕ ∈ [0,2π]. Using polar coordinates wehave:

|ψ〉 = r0eiφ0 |0〉+ r1eiφ1 |1〉 ,

with r20 + r2

1 = 1. Take r0 = cos(ρ) and r1 = sin(ρ) for some ρ.Set θ/2 = ρ, then |ψ〉 = cos(θ/2)eiφ0 |0〉+ sin(θ/2)eiφ1 |1〉 , with0 ≤ θ ≤ π, or equivalently

|ψ〉 = eiγ(cos(θ/2) |0〉+ eiϕ sin(θ/2) |1〉),

with ϕ = φ1 − φ0 and γ = φ0, with 0 ≤ ϕ ≤ 2π. The globalphase shift eiγ is physically irrelevant (unobservable).

43 / 112

Bloch Sphere [∗]

|0〉

|1〉

cos(θ/2) |0〉+ eiϕ sin(θ/2) |1〉

θ

ϕ

44 / 112

Page 23: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Change of BasisWe can represent (the coordinates of) any vector in Cn withrespect to any basis we like.

For example, we can consider for qubits in C2 the (alternative)orthonormal basis:

|+〉 =1√2

(|0〉+ |1〉) |−〉 =1√2

(|0〉 − |1〉)

and thus, vice versa:

|0〉 =1√2

(|+〉+ |−〉) |1〉 =1√2

(|+〉 − |−〉)

A qubit is therefore represented in the two bases as:

α |0〉+ β |1〉 =α√2

(|+〉+ |−〉) +β√2

(|+〉 − |−〉)

=α + β√

2|+〉+

α− β√2|−〉

45 / 112

Linear Operators

Arguably, the best understood type of functions or mapsbetween two vector spaces V andW are those preseving theirbasic algebraic structure.

DefinitionA map T : V → W between two vector spaces V andW iscalled a linear map if

1. T(x + y) = T(x) + T(y) and2. T(αx) = αT(x)

for all x,y ∈ V and all α ∈ K (e.g. K = C or R).

For V =W we talk about a (linear) operator on V.

46 / 112

Page 24: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Images of the Basis

Like vectors, we can represent a linear operator T via its“coordinates” as a matrix. Again these depend on theparticular basis we use.

Specifying the image of the base vectors determines – bylinearity – the operator (or in general a linear map) uniquely.

Suppose we know the images of the basis vectors |0〉 and |1〉

T(|0〉) = T00 |0〉+ T01 |1〉T(|1〉) = T10 |0〉+ T11 |1〉

then this is enough to know the Tij ’s to know what T is doing toall vectors (as they are representable as linear combinations ofthe basis vectors).

47 / 112

MatricesUsing a “mathematical” indexing (starting from 1 rather ten 0),using the first index to indicate a row position and second for acolumn position, we can identify T with a matrix:

T =

(T11 T12T21 T22

)= (Tij)

ni,j=1 = (Tij)

The application of T to a general vector (qubit) then becomes asimple matrix (pre-)multiplication:

T((

αβ

))=

(T11 T12T21 T22

)(αβ

)=

(T11α + T12βT21α + T22β

)

One can also express this, for |ψ〉 = α |0〉+ β |1〉 also as:

T(|ψ〉) = T(α |0〉+ β |1〉) = αT(|0〉) + βT(|1〉) = T |ψ〉

48 / 112

Page 25: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Matrix MultiplicationsThe application of a linear opertor T (represented by a matrix)to a vector x (represented via its coordinates) becomes:

T(x) = Tx = (Tij)(xi) =∑

i

Tijxi

The standard convention is pre-multiplication so as thesequence is the same as with application.

The composition of linear opertators T and S becomes also amatrix/matrix pre-multiplications:

T S = TS = (Tij)(Ski) =∑

i

TijSki

Some authors use the more “computational” pre-multiplication.

Finite-dimensional linear operators (matrices) form a vectorspace and with the multiplication a (linear) algebra. Adding theadjoint operation (see below) turns this into a C∗-algebra.

49 / 112

TransformationsWe can define a linear map B which implements the basechange |0〉 , |1〉 and |+〉 , |−〉:

B =1√2

(1 11 −1

)Transforming the coordinates (xi) with respect to |0〉 , |1〉 intocoordinates (yi) using |+〉 , |−〉 can be obtained by:

B(xi)i = (yi)i and B−1(yi)i = (xi)i

The matrix representation T of an operator using |0〉 , |1〉 canbe transformed into the representation S in |+〉 , |−〉 via:

S = BTB−1

Problem: It is not easy to compute inverse B−1, defined onimplicitly by BB−1 = B−1B = I the identity (existence?!).

50 / 112

Page 26: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Adjoint OperatorFor a matrix T = (Tij) its transpose matrix TT is defined as

TT = (T Tij ) = (Tji)

the conjugate matrix T∗ is defined by

T∗ = (T ∗ij ) = (Tij)∗ = (Tji)

and the adjoint matrix T† is given via

T† = (T †ij ) = (T ∗ji ) or T† = (T∗)T = (TT )∗

Note that (TS)T = ST TT and thus (TS)† = S†T†.

In mathematics the adjoint operator is usually denoted by T∗

(cf. conjugate in physics) and defined implicitly via:

〈T(x),y〉 = 〈x,T∗(y)〉 or 〈T†x | y〉 = 〈x | Ty〉

51 / 112

Adjoint Vectors

Bra and ket vectors are also related using the adjoint:

|x〉† = 〈x |

or using their coordinates:

(xi)† =

x1...

xn

=(

x1 · · · xn)

= (x i)

The adjoint operator specifies the effect on dual vectors:

(T |x〉)† = |x〉† T† = 〈x |T†

52 / 112

Page 27: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Unitary Operators

A square matrix/operator U is called unitary if

U†U = I = UU†

That means U’s inverse is U† = U−1. It also implies that U isinvertible and the inverse is easy to compute.

Quantum Mechanics requires that the dynamics or timeevolution of a quantum state, e.g. qubit, is implemented via aunitary operator (as long as there is no measurement).

The unitary evolution of an (isolated) quantum state/system is amathematical consequence of being a solution of theSchrödinger equation for some Hamiltonian operator H.

53 / 112

Properties of Unitary OperatorsUnitary operators generalise in some sense permutations (infact every permutation of base vectors gives rise to a simpleunitary map). They can also be seen as generalised rotations.

Unitary operators also preserve the “geometry” of a Hilbertspace, i.e. they preserve the inner prduct:

〈x |U†U |y〉 = 〈x | y〉 .

Any single qubit operation, i.e. unitary 2× 2 matrix U can beexpressed as via 4 (real) parameters:

U =

(ei(α−β/2−δ/2) cos γ/2 ei(α+β/2−δ/2) sin γ/2−ei(α−β/2+δ/2) sin γ/2 ei(α+β/2+δ/2) cos γ/2

)where α, β, δ and γ are real numbers.

54 / 112

Page 28: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Basic 1-Qubit Operators

Pauli X-Gate X =

(0 11 0

)X

Pauli Y-Gate Y =

(0 −ii 0

)Y

Pauli Z-Gate Z =

(1 00 −1

)Z

Hadamard Gate H = 1√2

(1 11 −1

)H

Phase Gate Φ =

(1 00 eiφ

Φ

The Pauli-X gate is often referred to as NOT gate. Note that thenotation for Hamiltonian and Hadamard gate are both H.

55 / 112

Graphical “Notation”The product (combination) of unitary operators results in aunitary operator, i.e. with U1, . . . ,Un unitary, the productU = Un . . .U1 is also unitary (Note: (TS)† = S†T†).

|x〉 U |x〉H

π2

H X Z

A simple example: |y〉 = HH |x〉 or (|x〉 ; H; H = |y〉):

|x〉 |y〉H H ≡ |x〉 |y〉 = |x〉I

because H2 = I, i.e.

1√2

(1 11 −1

)1√2

(1 11 −1

)=

(1 00 1

)56 / 112

Page 29: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Quantum Measurement

57 / 112

Quantum Postulates

I The state of an (isolated) quantum system is representedby a (normalised) vector in a complex Hilbert space H.

I An observable is represented by a self-adjoint matrix(operator) A acting on the Hilbert space H.

I The expected result (average) when measuring observableA of a system in state |x〉 ∈ H is given by:

〈A〉x = 〈x |A |x〉 = 〈x | |Ax〉

I The only possible results are eigen-values λi of A.I The probability of measuring λn in state |x〉 is given by:

Pr(A = λn|x) = 〈x |Pn |x〉 = 〈x | |Pnx〉

with Pn = |λn〉〈λn| the orthogonal projection onto the spacegenerated by eigen-vector |λn〉 = |n〉 of A.

58 / 112

Page 30: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Basic Measurement Principle

The values α and β describing a qubit are often calledprobability amplitudes. If we measure a qubit

|φ〉 = α |0〉+ β |1〉 =

(αβ

)in the computational basis |0〉 , |1〉 then we observe state|0〉 with probability |α|2 and |1〉 with probability |β|2.

Furthermore, the state |φ〉 changes: it collapses into state |0〉with probability |α|2 or |1〉 with probability |β|2, respectively.

59 / 112

Self Adjoint Operators

An operator A is called self-adjoint or hermitian iff

A = A†

The postulates of Quantum Mechanics require that a quantumobservable A is represented by a self-adjoint operator A.

Possible measurement results are eigenvalues λi of A (alwaysreal for self-adjoint operators) defined as

A |i〉 = λi |i〉 or A~ai = λi~ai or Aai = λiai

Probability to observe λk in state |x〉 =∑

i αi |i〉 is

Pr(A = λk , |x〉) = |αk |2

Physicist refer to αk as probability amplitude.

60 / 112

Page 31: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Spectrum

The set of eigen-values λ1, λ2, . . . of an operator T is calledits spectrum σ(T).

σ(T) = λ | λI− T is not invertible

It is possible that for an eigen-value λi in the equation

T |i〉 = λi |i〉

we may have more than one eigen-vector |i〉 for an eigen-valueλi , i.e. the dimension of the eigen-space d(i) > 1.We will not consider these degenerate cases here.

Terminology: “eigen” means “self” or “own” in German (cf alsoItalian “auto-valore”), it characterises a matrix/operator.

61 / 112

ProjectionsProjectionsAn operator P on Cn is called projection (or idempotent) iff

P2 = PP = P

Orthogonal ProjectionAn operator P on Cn is called (orthogonal) projection iff

P2 = P = P†

We say that an (orthogonal) projection P projects onto itsimage space P(Cn), which is always a linear sub-spaces of Cn.

Birkhoff-von Neumann: Projections on Hilbert space form an(ortho-)lattice which gives rise to non-classical “quantum logic”.

62 / 112

Page 32: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Outer ProductThe outer product |x〉〈y | for vectors |x〉 = (x1, . . . , xn)T and〈y | = (y1, . . . , yn) is an operator/matrix (actually: |x〉 ⊗ 〈y |):

(|x〉〈y |)ij = xiyj

e.g. |0〉〈1| =

(10

)(0 1

)=

(0 10 0

)It could be treated just as a formal combination, e.g. we canexpress the identity as I = |0〉〈0|+ |1〉〈1| because

(|0〉〈0|+ |1〉〈1|) |ψ〉 = (|0〉〈0|+ |1〉〈1|)(α |0〉+ β |1〉)= α |0〉〈0||0〉+ α |1〉〈1||0〉+

β |0〉〈0||1〉+ β |1〉〈1||1〉= α |0〉+ β |1〉

63 / 112

Spectral Theorem

In the bra-ket notation we can represent a projection onto thesub-space generated by |x〉 by the outer product Px = |x〉〈x |.

TheoremA self-adjoint operator A (on a finite dimensional Hilbert space,e.g. Cn) can be represented uniquely as a linear combination

A =∑

i

λiPi

with λi ∈ R and Pi the (orthogonal) projection onto theeigen-space generated by the eigen-vector |i〉, i.e.

Pi = |i〉〈i |

64 / 112

Page 33: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Measurement Process

If we perform a measurement of the observable represented by:

A =∑

i

λi |i〉〈i |

with eigen-values λi and eigen-vectors |i〉 in a state |x〉 we haveto decompose the state according to the observable, i.e.

|x〉 =∑

i

Pi |x〉 =∑

i

|i〉〈i |x〉 =∑

i

〈i |x〉 |i〉 =∑

i

αi |i〉

With probability |αi |2 = | 〈i |x〉 |2 two things happenI The measurement instrument will the display λi .I The state |x〉 collapses to |i〉.

65 / 112

Do-It-Yourself Observable

We can take any (orthonormal) basis |i〉n0 of Cn+1 to act ascomputational basis. We are free to choose (different)measurement results λi to indicate different states in |i〉.

|x〉 =∑

i 〈i |x〉|i〉 A =∑

i λi |i〉〈i |

|〈n|x〉|2

λn

|n〉

...

|〈0|x〉|2λ0

|0〉

The “display” values λi are essential for physicists, in aquantum computing context they are just side-effects.

66 / 112

Page 34: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Reversibility

Quantum DynamicsFor unitary transformations describing qubit dynamics:

U† = U−1

The quantum dynamics is invertible or reversible

Quantum MeasurementFor projection operators in quantum measurement (typically):

P† 6= P−1

i.e. the quantum measurement is not reversible. However

P2 = P

i.e. the quantum measurement is idempotent.

67 / 112

Composite Quantum Systems

68 / 112

Page 35: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Beyond Qubits – Quantum Registers

Operations on a single Qubit are nice and interesting but don’tgive us much computational power.

We need to consider “larger” computational states whichcontain more information. There could be two options:

I Quantum Systems with a larger number of freedoms.I Quantum Registers as a combination of several Qubits.

Though it might one day be physically more realistic/cheaper tobuild quantum devices based on not just binary basic states,even then it will be necessary to combine these larger “Qubits”.

69 / 112

Free Vector Spaces

In the theory of formal languages we have the construction ofwords out of some (finite) set of letters, i.e. alphabet Σ or S.

For vector spaces there is similar construction: Take any (finite)set of objects B and “declare” it a base. The free vector spaceis the set of all linear combinations of elements inB = b1,b2, . . ., i.e.

V(B) =

∑i

λibi | λi ∈ C and bi ∈ B

or

V(B) =

∑i

λi |i〉 | λi ∈ C and |i〉 ∈ B

with the obvious algebraic operations (incl. inner product).

70 / 112

Page 36: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Multi Qubit State

We encountered already the state space of a single qubit withB = 0,1 but also with B = +,−.

The state space of a two qubit system is given by

V(0,1 × 0,1) or V(+,− × +,−)

i.e. the base vectors are (in the standard base):

B2 = (0,0), (1,0), (0,1), (1,1)

or we use a “short-hand” notation B2 = 00,01,10,11

Issue: What about V(B × B × B)? What is its dimension, orhow many base vectores are there in B3?

71 / 112

Tensor Product

Given a n ×m matrix A and a k × l matrix B:

A =

a11 . . . a1m...

. . ....

an1 . . . anm

B =

b11 . . . b1l...

. . ....

bk1 . . . bkl

The tensor or Kronecker product A⊗ B is a nk ×ml matrix:

A⊗ B =

a11B . . . a1mB...

. . ....

an1B . . . anmB

Special cases are square matrices (n = m and k = l) andvectors (row n = k = 1, column m = l = 1).

72 / 112

Page 37: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Tensor Product of VectorsThe tensor product of (ket) vectors fulfils a number of nicealgebraic properties, such as

1. The bilinearity property:

(αv + α′v′)⊗ (βw + β′w′) == αβ(v⊗w) + αβ′(v⊗w′) + α′β(v′ ⊗w) + α′β′(v′ ⊗w′)

with α, α′, β, β′ ∈ C, and v,v′ ∈ Ck , w,w′ ∈ Cl .2. For v,v′ ∈ Ck and w,w′ ∈ Cl we have:⟨

v⊗w,v′ ⊗w′⟩

=⟨v,v′

⟩ ⟨w,w′

⟩3. We denote by bm

i ∈ Bm ⊆ Cm the i ’th basis vector in Cm

thenbk

i ⊗ blj = bkl

(i−1)l+j

73 / 112

Tensor Product of MatricesFor the tensor product of square matrices we also have:

1. The bilinearity property:

(αM + α′M′)⊗ (βN + β′N′) == αβ(M⊗ N) + αβ′(M⊗ N′) + α′β(M′ ⊗ N) + α′β′(M′ ⊗ N′)

α, α′, β, β′ ∈ C, M,M′ m ×m matrices N,N′ n × n matrices.2. We have, with v ∈ Cm and w ∈ Cn:

(M⊗ N)(v⊗w) = (Mv)⊗ (Nw)(M⊗ N)(M′ ⊗ N′) = (MM′)⊗ (NN′)

3. If M and N are unitary (or invertible) so is M⊗ N, and:

(M⊗ N)T = MT ⊗ NT and (M⊗ N)† = M† ⊗ N†

74 / 112

Page 38: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

The Two Qubit States

Given two Hilbert spaces H1 with basis B1 and H2 with basisB2 we can define the tensor product of spaces as

H1 ⊗H2 = V(bi ⊗ bj | bi ∈ B1,bj ∈ B2)

Using the notation |i〉 ⊗ |j〉 = |i〉 |j〉 = |ij〉 the standard base ofthe state space of a two qubit system C4 = C2 ⊗ C2 are:

|00〉 =

1000

, |01〉 =

0100

, |10〉 =

0010

, |11〉 =

0001

Often one also represents them using a “decimal” notation, i.e.|00〉 ≡ |0〉, |01〉 ≡ |1〉, |10〉 ≡ |2〉, and |11〉 ≡ |3〉.

75 / 112

Entanglement

The important relation between V(B), e.g. V(0,1), andV(Bn), e.g. V(0,1n) is given by V(Bn) = (V(B))⊗n, i.e.:

V(B × B × . . .× B) = V(B)⊗ V(B)⊗ . . .⊗ V(B)

Every n qubit state in C2ncan be represented as a linear

combination of the base vectors |0 . . . 00〉 , |0 . . . 10〉 , . . . ,|1 . . . 11〉 or decimal |0〉 , |1〉 , |2〉 , . . . , . . . , |2n − 1〉.

A two-qubit quantum state |ψ〉 ∈ C22is said to be separable iff

there exist two single-qubit states |ψ1〉 and |ψ2〉 in C2 such that

|ψ〉 = |ψ1〉 ⊗ |ψ2〉

If |ψ〉 is not separable then we say that |ψ〉 is entangled.

76 / 112

Page 39: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Entanglement and Classical Probabilities

In quantum physics the state is given by a vector in a complexHilbert space. Instead of probability amplitudes in Cn let usconsider probability distributions in a real vector space, i.e. Rd .

All the normalised (using the 1-norm, i.e. ‖(pi)i‖1 =∑

i |pi |)elements ρ in Rd represent probability distributions on a delement probability space Ωd = ω1, ω2, . . . , ωd i.e.ρ = (ρi) ∈ D(Ωd ) with ρi = P(ωi) ∈ [0,1].

The normalised elements in Rd1 ⊗ Rd2 correspond to the jointprobability distributions on Ωd1 × Ωd1 , with ρij = P(ωi ∧ ωj), i.e.

D(Ωd1 × Ωd1) = D(Ωd1)⊗D(Ωd1)

77 / 112

Classical CorrelationsIf the events in Ωd1 and Ωd2 are independent (“uncorrelated”)then their joint distribution is given as a product of distributionson Ωd1 and Ωd1 , i.e. ρ = ρ1 ⊗ ρ2 or P(ωi ∧ ωj) = P(ωi) · P(ωj).

If there is a “correlation” or “dependency” then it is impossibleto express a certain joint distribution as a simple (tensorproduct) but only as a sum of (tensor) products.

Consider, for example, two coins which “miraculously” alwaysfall on the same side, i.e. a joint distribution:

ρij H TH 1

2 0T 0 1

2

ρ =12

(1,0)⊗ (1,0)T +12

(0,1)⊗ (0,1)T 6= ρ1 ⊗ ρ2

78 / 112

Page 40: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Classical Gates

At heart of classical (electronic) circuits we have to considergates like for example:

AND ≡ ∧0 0 00 1 01 0 01 1 1

XOR ≡ ⊕0 0 00 1 11 0 11 1 0

NAND0 0 10 1 11 0 11 1 0

The idea is to define similar quantum gates, taking two (or n)qubits at input and producing some output. Contrary toclassical gates we have to use unitary, i.e. reversible, gates inquantum circuits.

79 / 112

The Controlled-NOT or CNOT GateThe quantum analog of a classical XOR-gate is the CNOT-gate.The behaviour of the CNOT-gate (on two qubits, i.e. C2 ⊗ C2),is for base vectors |x〉 , |y〉 ∈ |0〉 , |1〉:

|x , y〉 7→ |x , y ⊕ x〉 with y ⊕ x = (y + x) mod 2

i.e. |00〉 7→ |00〉 , |01〉 7→ |01〉 , |10〉 7→ |11〉 , |11〉 7→ |10〉.

We represent the CNOT-gate graphically and as a matrix (withrespect to the standard basis |00〉 , |01〉 , |10〉 , |11〉) as:

|x〉 |x〉

|y〉 |x ⊕ y〉

CNOT =

1 0 0 00 1 0 00 0 0 10 0 1 0

80 / 112

Page 41: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Swapping GateWe can exploit the CNOT-Gate to SWAP two qubits:

|x〉 |y〉

|y〉 |x〉

is depicted by (shorthand):

|x〉 |y〉

|y〉 |x〉

Exercise: Check that this really maps |x〉 ⊗ |y〉 into |y〉 ⊗ |x〉(for all |x〉 and |y〉 not just base vectors?).

81 / 112

Controlled Phase GateThe controlled phase-gate is depicted as follows (for basevectors |x〉 , |y〉 ∈ |0〉 , |1〉):

|x〉 |x〉

|y〉 eixyφ |y〉Φ

Its matrix/operator representation is given by:

Φ =

1 0 0 00 1 0 00 0 1 00 0 0 eiφ

on any two qubits, i.e. vectors in C2 ⊗ C2.

82 / 112

Page 42: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

General Controlled Gate

In general, we can control any single qubit transformationU : C2 → C2 by another qubit, i.e. such that for all |y〉 ∈ C2:

|0〉 ⊗ |y〉 7→ |0〉 ⊗ |y〉|1〉 ⊗ |y〉 7→ |1〉 ⊗ U |y〉

The diagrammatic representation is:

|x〉 |x〉

|y〉 U |y〉U

83 / 112

Toffoli Gate

The Toffoli-gate is a 3-qubit quantum gate on C2 ⊗ C2 ⊗ C2 == C8 with the following behaviour T : |x , y , z〉 7→ |x ′, y ′, z ′〉 andmatrix representation (standard base enumeration):

input outputx y z x ′ y ′ z ′

0 0 0 0 0 00 0 1 0 0 10 1 0 0 1 00 1 1 0 1 11 0 0 1 0 01 0 1 1 0 11 1 0 1 1 11 1 1 1 1 0

T =

1 0 0 0 0 0 0 00 1 0 0 0 0 0 00 0 1 0 0 0 0 00 0 0 1 0 0 0 00 0 0 0 1 0 0 00 0 0 0 0 1 0 00 0 0 0 0 0 0 10 0 0 0 0 0 1 0

84 / 112

Page 43: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Toffoli Gate UsageThe Toffoli gate can be used can be used to implement areversible version of NAND and a FANOUT gate.

|x〉 |x〉

|y〉 |y〉

|z〉 |z ⊕ xy〉

Toffoli

|x〉 |x〉

|y〉 |y〉

|1〉 |¬xy〉

NAND

|1〉 |1〉

|y〉 |y〉

|0〉 |y〉

FANOUT

This works only with x , y ∈ 0,1.85 / 112

Linear Maps from FunctionsIn general, we can take any (binary) function

f : 0,1n → 0,1m

and define a corresponding linear map Tf

Tf : (V(0,1))⊗n → (V(0,1))⊗m or Tf : (C2)⊗n → (C2)⊗m

We just have to read the map f as an instruction on how basevectors should be transformed under Tf (into base vectors).

Once we know or specify the image of all base vectors weknow the (matrix representation) of Tf via

Tf |x〉 = |f (x)〉

E.g. with f (011) = 10101 we have Tf : |011〉 7→ |10101〉.

Problem: Tf is, in general, not unitary, i.e. reversible.86 / 112

Page 44: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Reversible Operators from General FunctionsReversibility makes it impossible to have a quantum device Ufwhich just computes a general function f , i.e. Uf : |x〉 7→ |f (x)〉.

However, we can always “pack” up a function f as a unitaryoperator Uf using an ancilla qubit to remember the initial state,e.g. |x〉 ⊗ |0〉 7→ |x〉 ⊗ |f (x)〉 . The standard implementation off : 0,1n → 0,1m as unitary operator Uf on C2n ⊗ C2m

is:

Uf : |x〉 ⊗ |y〉 7→ |x〉 ⊗ |y ⊕ f (x)〉

Graphically represented by the diagram/quantum circuit:

|x〉 |x〉

|y〉 |y ⊕ f (x)〉

Uf

87 / 112

Quantum Computation

88 / 112

Page 45: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Quantum Circuit ModelWe can specify a quantum algorithm on qubit registers – i.e. aunitary operator U : (C2)⊗n → (C2)⊗n – using a combination of(standardised) quantum gates – like Hadamard, Pauli, etc. –and maybe “oracles” like Uf as well as measurements.

For example, the quantum circuit for teleportation (withoutcorrection) as an operator on (C2)⊗3 is given as follows:

|ψ1〉 |φ1〉

|ψ2〉 |φ2〉

|ψ3〉 |φ3〉

H

H

89 / 112

Calculations for Small Quantum Circuits

Circuits with few qubits can “implemented”, e.g. in octave, etc.

q0 = [1,0]’q1 = [0,1]’

H = (1/sqrt(2))*[1, 1;1,-1]CX = [1, 0, 0, 0; 0, 1, 0, 0;

0, 0, 0, 1; 0, 0, 1, 0]

S1 = kron(eye(2),H,eye(2))S2 = kron(eye(2),CX)S3 = kron(CX,eye(2))S4 = kron(H,eye(2),eye(2))

T = S1*S2*S3*S4

90 / 112

Page 46: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Computational Expressivness

The question arises: What we can compute with a given set ofbasic quantum gates? What can we compute with a quantumcircuit?

For permutations it is well known that all permutations can bedecomposed into elementary so-called transpositions whichonly exchange two elements. Similar results also exist forrotations.

For general unitary operators U on Cn – in particular on mqubits, i.e. C2m

= (C2)⊗m – an analogue results gurantees that2× 2 unitary matrices make up all unitary operators.

See e.g.: A. Yu. Kitaev, A. H. Shen, M. N. Vyalyi: Classical andQuantum Computation, AMS, 2002, p70.

91 / 112

Unitary Operators on Cn

TheoremAn arbritary unitary operator U on the space Cn can berepresented as a product of n(n−1)

2 matrices of the form:

1 . . . 0 . . . . . . . . . . . . 0...

. . ....

...

0 . . . 1...

... a b...

... c d...

... 1 . . . 0

......

. . ....

0 . . . . . . . . . . . . 0 . . . 1

with

(a bc d

)a 2× 2 unitary matrix (on C2).

92 / 112

Page 47: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Approximation of Unitary Operators

If we are only interested in “about the right result” we have:

Given two unitary transformations U and V. The error ofapproximation is defined by

e(U,V) = sup|φ〉‖(U− V) |φ〉 ‖

DefinitionA set of gates G = G1, . . . is said to be approximatly universalif any n-qubit operator U (with n ≥ 1) can be approximated toarbitrary accuracy, i.e. for all ε > 0 there exists a circuit V whichis constructed of gates in G and their controlled versions suchthat we have e(U,V) < ε.

93 / 112

(Approximatly) Universal GatesA possible set of approximatly universal gates (e.g. Kaye,Laflamme, Mosca: Introduction to Quantum Computing, p71):

H =1√2

(1 11 −1

)Φ(π

4

)=

(1 00 ei π4

)

CNOT =

1 0 0 00 1 0 00 0 0 10 0 1 0

TheoremThe set G = H,Φ(π4 ) is universal for 1-qubits.

TheoremThe set G = CNOT,H,Φ(π4 ) is a universal set of gates.

94 / 112

Page 48: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Cloning of Qubits?Is it possible to create a second copy of a general qubit |ψ〉using a unitary operation U.

|ψ〉 |ψ〉

|0〉 |ψ〉

U

Theorem (No Cloning Theorem)The exists no unitary transformation U such that

U |ψ〉 |0〉 = |ψ〉 |ψ〉

for all qubits |ψ〉 ∈ C2.

95 / 112

Argument

Consider two qubits |ψ〉 and |φ〉.Then by linearity:

U(α |ψ〉+ β |φ〉) |0〉 = αU(|ψ〉) |0〉+ βU(|φ〉) |0〉= α |ψ〉 |ψ〉+ β |φ〉 |φ〉

but also if U is a cloning operator:

U(α |ψ〉+ β |φ〉) |0〉 = (α |ψ〉+ β |φ〉)(α |ψ〉+ β |φ〉)= α2 |ψ〉 |ψ〉+ β2 |φ〉 |φ〉

+αβ |ψ〉 |φ〉+ αβ |φ〉 |ψ〉

Only for α = 0 or β = 0 we have

α |ψ〉 |ψ〉+ β |φ〉 |φ〉 = α2 |ψ〉 |ψ〉+ β2 |φ〉 |φ〉+αβ |ψ〉 |φ〉+ αβ |φ〉 |ψ〉

96 / 112

Page 49: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Approximate Cloning?

Is it not even possible to approximately clone a qubit.

Consider two qubits |ψ〉 and |φ〉 with 0 < 〈ψ|φ〉 < 1 such that

U(|ψ〉 ⊗ |0〉) ≈ |ψ〉 ⊗ |ψ〉 and U(|φ〉 ⊗ |0〉) ≈ |φ〉 ⊗ |φ〉

By unitarity – U preserving inner products – we get

(|ψ〉 |0〉)†(|φ〉 |0〉) = 〈ψ|φ〉 〈0|0〉 = 〈ψ|φ〉 ≈ 〈ψ|φ〉2

Thus 〈ψ|φ〉 ≈ 0 or 〈ψ|φ〉 ≈ 1.

97 / 112

Quantum Cryptography

98 / 112

Page 50: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Communication on Insecure Channels

Alice Bob

Eve

ENC DEC

ENC(T ,KA) = MDEC(M,KB) = T

DEC(ENC(T ,KA),KB) = T

99 / 112

One-Time-Pad or Vernam Cipher

Gilbert Sandford Vernam, 1917

Step 0. Alice and Bob share a common, random key K .Step 1. Alice calculates M = T ⊕ K .Step 2. Message M is sent along the insecure channel.Step 3. Bob retrieves plain text T = M ⊕ K .

K = KA = KB

ENC(T ,K ) = DEC(T ,K ) = T ⊕ K .

Caveat: Never ever reuse random key K !

100 / 112

Page 51: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Example

T 0 1 1 0 1 1K ⊕ 1 1 1 0 1 0M 1 0 0 0 0 1

↓ ↓ ↓ ↓ ↓ ↓

M 1 0 0 0 0 1K ⊕ 1 1 1 0 1 0T 0 1 1 0 1 1

101 / 112

Quantum Key Distribution

The problem with One-Time-Pads is Key Distribution.

Quantum Key Distribution aims to exploit quantum features inorder to protect the keys, utilising:

No-Cloning. The message cannot be duplicated.Measurement. Observing the message changes it.

These quantum techniques aim in addressing two securityaims:

Authentication. Is sender really Alice?Intrusion Detection. Is Eve eavesdropping?

102 / 112

Page 52: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

BB84Charles Bennett and Gilles Brassard 1984

The aim is to exchange a key K (e.g. a One-Time-Pad).Alice and Bob communicate over two insecure channels: aquantum channel and a classical one.The protocol is based on the use of two (computational) bases:

= ∣∣ ⟩ , | 〉 = (1,0)T , (0,1)T

= | 〉 , | 〉 = 1√2

(−1,1)T ,1√2

(1,1)T

Interpretation of messages in both basis

M0 | 〉 | 〉1

∣∣ ⟩ | 〉

103 / 112

Measuring in Wrong Base

As long as Alice and Bob send and receive qubits in the samebasis, Bob will always measure the same qubit Alice has sent.

However, if they don’t agree on the measurement base, Bob willmake the wrong assumption of what Alice has sent.

Assume that Alice sends 0 encoded as | 〉 in the basis butBob uses to measure it: In this case he will measure

∣∣ ⟩ or| 〉 with 50% chance, i.e. concludes with a 50:50 chance thatAlice intended to send 0 or 1 respectively.This is due to the following obvious facts that:

| 〉 = 1√2

(∣∣ ⟩− | 〉)

| 〉 = 1√2

(∣∣ ⟩+ | 〉)

∣∣ ⟩ = 1√2

(| 〉+ | 〉)| 〉 = 1√

2(| 〉 − | 〉)

104 / 112

Page 53: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

BB84 ProtocolStep 1.a Alice chooses n random bits to send (e.g. to be

used as One-Time-Pad).Step 1.b Alice randomly chooses n times whether to use

or to encode each bit.Step 2.a Alice encodes the bits accordingly in the bases

and sends the qubits to Bob.Step 2.b Bob randomly chooses n times whether to use

or to measure the qubits he got and measuresthem.

Step 3. Over the classical channel Alice and Bob comparewhich basis they used for each bit. If they agreethey keep it otherwise they drop it.

Step 4.a Bob choose a part (e.g. half) of the transmittedbits (drops them) and compares them openly withAlice.

Step 4.b If these test bits do not agree (subject totransmission errors) Alice and Bob conclude thatEve was eavesdropping and abandontransmission.

105 / 112

Example

KA 0 1 1 0 1 1 1 0 1 0 1 0BA

↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓

BBobsKB 0 1 1 1 1 0 1 0 1 0 1 0

√ √ √ √ √ √ √ √

K 1 1 1 0 1 0 1 0

106 / 112

Page 54: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

B92Charles Bennett 1992

The idea is to use a non-orthogonal basis to encode 0 and 1,e.g.

B = | 〉 , | 〉 = (1,0)T ,1√2

(1,1)T

Step 1. Alice chooses n random bits and encodes them,e.g. 0 ≡ | 〉 and 1 ≡ | 〉 and send these qubitsto Bob.

Step 2. Bob measures these qubits in randomly chosenbase or .

Step 3. Bob tells Alice over an open classical which qubitshe considers ambiguous in order to drop them.

Again – as in BB84 – some bits can be sacrificed to see if anextensive number of “transmission errors” indicates that Evewas eavesdropping and abandon transmission.

107 / 112

Ambiguous Bits

When Bob measures the qubits received from Alice he willconclude that certain observations are inconclusive.

Using . If Bob observes∣∣ ⟩ Bob knows that Alice sent 1 ≡ | 〉.| 〉 Bob drops this bit.

Using . If Bob observes| 〉 Bob knows that Alice sent 0 ≡ | 〉.| 〉 Bob drops this bit.

In the average three quarters of the qubits have to bediscarded.

108 / 112

Page 55: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

Example

KA 0 0 1 0 1 0 1 0 1 1 1 0

↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓ ↓

BBobsKB 0 ? ? 0 1 0 ? ? ? 1 ? ?

√ √ √ √ √

K 0 0 1 0 1

109 / 112

EPR

Artur Ekert 1991

The idea is to distribute a key K via pairs of entangled states,for example the Bell states:

1√2

(|00〉+ |11〉)

The key K is effectively generated only after the distribution ofthese states to Alice and Bob. They do this independently butentanglement guarantees they obtain the same key.

This protocol is inspired by the Einstein-Podolsky-Rosen (EPR,1935) Gedanken-Experiment.

110 / 112

Page 56: Elements of Quantum Computation · Elements of Quantum Computation Quantum Physics and Concepts Herbert Wiklicky herbert@doc.ic.ac.uk BISS Spring School Bertinoro 2018 1/112 Overview

EPR Protocol

Step 1. A random sequence of entangled 2-qubit states –e.g. 1√

2(|00〉+ |11〉) – is created.

For each such state one of the qubits is given toAlice and Bob, respectively.

Step 2. Bob and Alice measure each of their qubits in arandomly chosen base or .

Step 3. Over the classical channel Alice and Bob comparewhich basis they used for each bit. If they agreethey keep it otherwise they drop it.

As in BB84 too many “transmission errors” indicate that Evewas eavesdropping and the transmission is abandoned. Ekertproposed a more sophisticated eavesdropping detection (Bell’stheorem).

111 / 112

Example

BAobsKA 0 1 0 1 0 0 1 0 0 0 0 0

BBobsKB 0 0 0 0 0 0 1 0 0 0 1 0

√ √ √ √ √ √ √

K 0 0 0 0 0 0 0

112 / 112