october 1 & 3, 20071 introduction to quantum computing lecture 1 of 2 introduction to quantum...

39
October 1 & 3, 2007 1 Introduction to Quantum Introduction to Quantum Computing Computing Lecture 1 of 2 Lecture 1 of 2 http://www.cs.uwaterloo.ca/~cleve/CS497-F07 CS 497 Frontiers of Computer Science CS 497 Frontiers of Computer Science Richard Cleve David R. Cheriton School of Computer Science Institute for Quantum Computing University of Waterloo

Upload: whitney-lydia-obrien

Post on 31-Dec-2015

213 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

October 1 & 3, 2007 1

Introduction to Quantum ComputingIntroduction to Quantum ComputingLecture 1 of 2 Lecture 1 of 2

http://www.cs.uwaterloo.ca/~cleve/CS497-F07

CS 497 Frontiers of Computer ScienceCS 497 Frontiers of Computer Science

Richard Cleve David R. Cheriton School of Computer Science

Institute for Quantum ComputingUniversity of Waterloo

Page 2: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

2

Contents of lecture 1Contents of lecture 11. Preliminary remarks2. Quantum states3. Unitary operations & measurements4. Subsystem structure & quantum circuit diagrams5. Introductory remarks about quantum algorithms6. Deutsch’s parity algorithm7. One-out-of-four search algorithm

Page 3: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

3

Contents of lecture 1Contents of lecture 11. Preliminary remarks2. Quantum states3. Unitary operations & measurements4. Subsystem structure & quantum circuit diagrams5. Introductory remarks about quantum algorithms6. Deutsch’s parity algorithm7. One-out-of-four search algorithm

Page 4: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

4

Moore’s LawMoore’s Law

• Measuring a state (e.g. position) disturbs it• Quantum systems sometimes seem to behave

as if they are in several states at once• Different evolutions can interfere with each other

Following trend … atomic scale in 15-20 years

Quantum mechanical effects occur at this scale:

1975 1980 1985 1990 1995 2000 2005104

105

106

107

108

109

number of transistors

year

Page 5: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

5

Quantum mechanical effectsQuantum mechanical effectsAdditional nuisances to overcome?

orNew types of behavior to make use of?

[Shor ’94]: polynomial-time algorithm for factoring integers on a quantum computer

This could be used to break most of the existing public-key cryptosystems, including RSA, and elliptic curve crypto

[Bennett, Brassard ’84]: provably secure codes with short keys

Page 6: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

6

Also with quantum information:Also with quantum information:• Faster algorithms for combinatorial search problems

• Fast algorithms for simulating quantum mechanics

• Communication savings in distributed systems

• More efficient notions of “proof systems”

Quantum information theory is a generalization of the classical information theory that we all know—which is based on probability theory

classical information

theory

quantum information

theory

Page 7: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

7

Contents of lecture 1Contents of lecture 11. Preliminary remarks2. Quantum states3. Unitary operations & measurements4. Subsystem structure & quantum circuit diagrams5. Introductory remarks about quantum algorithms6. Deutsch’s parity algorithm7. One-out-of-four search algorithm

Page 8: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

8

Classical and quantum systemsClassical and quantum systems

111

110

101

100

011

010

001

000

p

p

p

p

p

p

p

pProbabilistic states:

1x

xp

0 xpx,

111

110

101

100

011

010

001

000

α

α

α

α

α

α

α

αQuantum states:

12

xxα

Cαx x ,

x

x xαψ

Dirac notation: |000, |001, |010, …, |111 are basis vectors,

so

Page 9: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

9

Dirac bra/ket notationDirac bra/ket notation

d

2

1Ket: ψ always denotes a column vector, e.g.

Bracket: φψ denotes φψ, the inner

product of φ and ψ

Bra: ψ always denotes a row vector that is the

conjugate transpose of ψ, e.g. [ *1 *

2 *d ]

0

10

1

01Convention:

Page 10: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

10

Contents of lecture 1Contents of lecture 11. Preliminary remarks2. Quantum states3. Unitary operations & measurements4. Subsystem structure & quantum circuit diagrams5. Introductory remarks about quantum algorithms6. Deutsch’s parity algorithm7. One-out-of-four search algorithm

Page 11: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

11

Basic operations on qubits (I)Basic operations on qubits (I)

cossin

sincosRotation by :

(0) Initialize qubit to |0 or to |1

(1) Apply a unitary operation U (formally U†U = I )

Examples:

0

10

1

01Recall

conjugate transpose

01

10XxNOT (bit flip):

Maps |0 |1|1 |0

10

01ZzPhase flip: Maps |0 |0

|1 |1

Page 12: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

12

Basic operations on qubits (II)Basic operations on qubits (II)

11

11

2

1HHadamard:

More examples of unitary operations: (unitary rotation)

1

1

2

1

2

1 100H

1

1

2

1

2

1 101H

0

1

Reflection about this line

H0

H1

Page 13: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

13

Basic operations on qubits (III)Basic operations on qubits (III)(3) Apply a “standard” measurement:

0 + 1

2

2

probwith1

probwith0

() There exist other quantum operations, but they can all be “simulated” by the aforementioned types

Example: measurement with respect to a different orthonormal basis {ψ0, ψ1}

||2

||2

0

1

ψ0

ψ1

… and the quantum state collapses to 0 or 1

Page 14: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

14

Distinguishing between two statesDistinguishing between two states

Question 1: can we distinguish between the two cases?

Let be in state or

Distinguishing procedure:1. apply H2. measure

This works because H + = 0 and H − = 1

Question 2: can we distinguish between 0 and +?

Since they’re not orthogonal, they cannot be perfectly distinguished … but statistical difference is detectable

102

1 10

2

1

Page 15: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

15

Operations on Operations on nn-qubit states-qubit states

Unitary operations:

xx

xx xαxα U

… and the quantum state collapses

x

x xα

Measurements:

2

111

2

001

2

000

probwith111

probwith001

probwith000

α

α

α

(U†U = I )

111

001

000

α

α

α

Page 16: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

16

Contents of lecture 1Contents of lecture 11. Preliminary remarks2. Quantum states3. Unitary operations & measurements4. Subsystem structure & quantum circuit diagrams5. Introductory remarks about quantum algorithms6. Deutsch’s parity algorithm7. One-out-of-four search algorithm

Page 17: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

17

EntanglementEntanglement

11'10'01'00'1'0'10 βββααβααβαβα The state of the combined system their tensor product:

??

Suppose that two qubits are in states: 10 1'0'

11100100 21

21

21

21

Question: what are the states of the individual qubits for1. ?

2. ?11002

12

1

10102

12

12

12

1 Answers: 1.

2. ... this is an entangled state

Page 18: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

18

Structure among subsystemsStructure among subsystems

V

UW

qubits:

#2

#1

#4

#3

time

unitary operations measurements

Page 19: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

19

Quantum circuitsQuantum circuits

0

1

1

0

1

0

1

0

1

0

1

1

Computation is “feasible” if circuit-size scales polynomially

Page 20: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

20

Example of a one-qubit gate Example of a one-qubit gate applied to a two-qubit systemapplied to a two-qubit system

1110

0100

uu

uuU

U

(do nothing)

The resulting 4x4 matrix is

1110

0100

1110

0100

00

00

00

00

uu

uu

uu

uu

UI00 0U0 01 0U1 10 1U0 11 1U1

Maps basis states as:

Question: what happens if U is applied to the first qubit?

Page 21: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

21

Controlled-Controlled-UU gates gates

1110

0100

00

00

0010

0001

uu

uu

U

00 00 01 01 10 1U0 11 1U1

Maps basis states as:

Resulting 4x4 matrix is controlled-U =

1110

0100

uu

uuU

Page 22: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

22

Controlled-Controlled-NOTNOT (CNOT)(CNOT)

Note: “control” qubit may change on some input states!

X

a

b ab

a

0 + 1

0 − 10 − 1

0 − 1 H

H

H

H

Page 23: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

23

Contents of lecture 1Contents of lecture 11. Preliminary remarks2. Quantum states3. Unitary operations & measurements4. Subsystem structure & quantum circuit diagrams5. Introductory remarks about quantum algorithms6. Deutsch’s parity algorithm7. One-out-of-four search algorithm

Page 24: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

24

Multiplication problemMultiplication problem

• “Grade school” algorithm takes O(n2) steps

• Best currently-known classical algorithm costs

O(n log n loglog n)

• Best currently-known quantum method: same

Input: two n-bit numbers (e.g. 101 and 111)

Output: their product (e.g. 100011)

Page 25: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

25

Factoring problemFactoring problem

• Trial division costs 2n/2

• Best currently-known classical algorithm costs O(2n⅓ log⅔

n

)• Hardness of factoring is the basis of the security of many

cryptosystems (e.g. RSA)

• Shor’s quantum algorithm costs n2 [ O(n2 log n loglog n) ]

• Implementation would break RSA and other cryptosystems

Input: an n-bit number (e.g. 100011)

Output: their product (e.g. 101, 111)

Page 26: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

26

How do quantum algorithms work?How do quantum algorithms work?

This is not performing “exponentially many computations at polynomial cost”

But we can make some interesting tradeoffs:instead of learning about any (x, f (x)) point, one can learn

something about a global property of f

Given a polynomial-time classical algorithm for f :{0,1}n → T,

it is straightforward to construct a quantum algorithm that

creates the state: x

xfxn

)(,2

1

The most straightforward way of extracting information from the state yields just (x, f (x)) for a random x{0,1}n

Page 27: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

27

Contents of lecture 1Contents of lecture 11. Preliminary remarks2. Quantum states3. Unitary operations & measurements4. Subsystem structure & quantum circuit diagrams5. Introductory remarks about quantum algorithms6. Deutsch’s parity algorithm7. One-out-of-four search algorithm

Page 28: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

28

Deutsch’s problemDeutsch’s problem

Let f : {0,1} → {0,1} f

There are four possibilities:

x f1(x)

0

1

0

0

x f2(x)

0

1

1

1

x f3(x)

0

1

0

1

x f4(x)

0

1

1

0

Goal: determine f(0) f(1)

Any classical method requires two queries

What about a quantum method?

Page 29: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

29

ReversibleReversible black box for black box for ff

Uf

a

b

a

b f(a)

falternate notation:

A classical algorithm: (still requires 2 queries)

f f0

0

1

f(0) f(1)

2 queries + 1 auxiliary operation

Page 30: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

30

Quantum algorithm for Deutsch Quantum algorithm for Deutsch

H f

H

H

1

0 f(0) f(1)

1 query + 4 auxiliary operations

11

11

2

1H

How does this algorithm work?

Each of the three H operations can be seen as playing a different role ...

1

2 3

Page 31: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

31

Quantum algorithm (Quantum algorithm (11) ) H f

H

H

1

0

1. Creates the state 0 – 1, which is an eigenvector of

1

2 3

NOT with eigenvalue –1 I with eigenvalue +1

This causes f to induce a phase shift of (–1) f(x) to x

f

0 – 1

x (–1) f(x)x

0 – 1

Page 32: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

32

Quantum algorithm (Quantum algorithm (22) )

2. Causes f to be queried in superposition (at 0 + 1)

f

0 – 1

0 (–1) f(0)0 + (–1)

f(1)1

0 – 1

H

x f1(x)

0

1

0

0

x f2(x)

0

1

1

1

x f3(x)

0

1

0

1

x f4(x)

0

1

1

0

(0 + 1) (0 – 1)

Page 33: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

33

Quantum algorithm (Quantum algorithm (33) ) 3. Distinguishes between (0 + 1) and (0 – 1)

H

(0 + 1) 0

(0 – 1) 1

H

Page 34: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

34

Summary of Deutsch’s algorithm Summary of Deutsch’s algorithm

H f

H

H

1

0 f(0) f(1)

1

2 3

constructs eigenvector so f-queries

induce phases: x (–1) f(x)x

produces superpositions

of inputs to f : 0 + 1 extracts phase differences from

(–1) f(0)0 + (–1)

f(1)1

Makes only one query, whereas two are needed classically

Page 35: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

35

Contents of lecture 1Contents of lecture 11. Preliminary remarks2. Quantum states3. Unitary operations & measurements4. Subsystem structure & quantum circuit diagrams5. Introductory remarks about quantum algorithms6. Deutsch’s parity algorithm7. One-out-of-four search algorithm

Page 36: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

36

One-out-of-four searchOne-out-of-four searchLet f : {0,1}2 → {0,1} have the property that there is exactly

one x {0,1}2 for which f (x) = 1

Four possibilities: x f00(x)

00

01

10

11

1

0

0

0

Goal: find x {0,1}2 for which f (x) = 1

x f01(x)

00

01

10

11

0

1

0

0

x f10(x)

00

01

10

11

0

0

1

0

x f11(x)

00

01

10

11

0

0

0

1

What is the minimum number of queries classically? ____

Quantumly? ____

Page 37: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

37

Quantum algorithm (I)Quantum algorithm (I)

fx1x2y

x2x1

y f(x1,x2)

((–1) f(00)00 + (–1) f(01)01 + (–1) f(10)10 + (–1) f(11)11)(0 – 1)

Output state of query?

Black box for 1-4 search:

Start by creating phases in superposition of all inputs to f:

Input state to query?fH

H

H1

00 (00 + 01 + 10 + 11)(0 –

1)

Page 38: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

38

Quantum algorithm (II)Quantum algorithm (II)

Output state of the first two qubits in the four cases:

fH

H

H1

00

Case of f00?ψ01 = + 00 – 01 + 10 + 11ψ10 = + 00 + 01 – 10 + 11ψ11 = + 00 + 01 + 10 – 11

What noteworthy property do these states have?

U

ψ00 = – 00 + 01 + 10 + 11

Case of f01?Case of f10?Case of f11?

Orthogonal!

Apply the U that maps

ψ00, ψ01, ψ10, ψ11 to

00, 01, 10, 11 (resp.)

Page 39: October 1 & 3, 20071 Introduction to Quantum Computing Lecture 1 of 2 Introduction to Quantum Computing Lecture 1 of 2 cleve/CS497-F07

39