introduction to quantum computingcleve/courses/cs497-f07/cs497l1.pdf · 26 how do quantum...

Post on 10-Jun-2020

2 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

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 CleveDavid R. Cheriton School of Computer Science

Institute for Quantum ComputingUniversity of Waterloo

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

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

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

109number of transistors

year

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

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 theoryis a generalization of the classical information theorythat we all know—which is based on probability theory classical

informationtheory

quantum information

theory

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

8

Classical and quantum systemsClassical and quantum systems

⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢⎢

111

110

101

100

011

010

001

000

ppppppppProbabilistic states:

1=∑x

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

9

DiracDirac bra/bra/ketket notationnotation

⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢

αα

M

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 ]

⎥⎦

⎤⎢⎣

⎡=

01

0 ⎥⎦

⎤⎢⎣

⎡=

10

1Convention:

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

11

Basic operations on Basic operations on qubitsqubits (I)(I)

⎥⎦

⎤⎢⎣

⎡θθθ−θ

cossinsincos

Rotation by θ:

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

Examples:

(0) Initialize qubit to |0⟩ or to |1⟩ ⎥⎦

⎤⎢⎣

⎡=

01

0 ⎥⎦

⎤⎢⎣

⎡=

10

1Recall

conjugate transpose

⎥⎦

⎤⎢⎣

⎡==σ

0110

XxNOT (bit flip):Maps |0⟩ → |1⟩

|1⟩ → |0⟩

⎥⎦

⎤⎢⎣

⎡−

==σ1001

ZzPhase flip: Maps |0⟩ → |0⟩|1⟩ → −|1⟩

12

Basic operations on Basic operations on qubitsqubits (II)(II)

⎥⎦

⎤⎢⎣

⎡−

=1111

21H

More examples of unitary operations:

Hadamard:

(unitary ≈ rotation)

( )⎥⎥⎦

⎢⎢⎣

++

=+=11

2

1

2

1 100H

( )⎥⎥⎦

⎢⎢⎣

−+

=−=11

2

1

2

1 101H

|0⟩

|1⟩

Reflection about this line

H|0⟩

H|1⟩

13

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

α|0⟩ + β|1⟩a 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⟩

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 perfectlydistinguished … but statistical difference is detectable

( )102

1+=+ ( )10

2

1−=−

15

Operations on Operations on nn--qubitqubit statesstates

Unitary operations: ⎟⎠⎞⎜

⎝⎛∑∑

xx

xx xαxα Ua

… and the quantum state collapses

∑x

x xα

Measurements:

2111

2001

2000

probwith111

probwith001 probwith000

α

αα

MMM

⎩⎨a

(U†U = I )

⎥⎥⎥⎥

⎢⎢⎢⎢

111

001

000

α

αα

M

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

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

18

Structure among subsystemsStructure among subsystems

V

UW

qubits:

#2

#1

#4

#3

time

unitary operations measurements

19

Quantum circuitsQuantum circuits

|0⟩

|1⟩

|1⟩

|0⟩

|1⟩

|0⟩

1

0

1

0

1

1

Computation is “feasible” if circuit-size scales polynomially

20

Example of a oneExample of a one--qubitqubit gate gate applied to a twoapplied to a two--qubitqubit systemsystem

⎥⎦

⎤⎢⎣

⎡=

1110

0100

uuuu

U

U

(do nothing)

The resulting 4x4 matrix is

⎥⎥⎥⎥

⎢⎢⎢⎢

=⊗

1110

0100

1110

0100

0000

0000

uuuu

uuuu

UI|0⟩|0⟩ → |0⟩U|0⟩|0⟩|1⟩ → |0⟩U|1⟩|1⟩|0⟩ → |1⟩U|0⟩|1⟩|1⟩ → |1⟩U|1⟩

Maps basis states as:

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

21

ControlledControlled--UU gatesgates

⎥⎥⎥⎥

⎢⎢⎢⎢

1110

0100

0000

00100001

uuuu

U

|0⟩|0⟩ → |0⟩|0⟩|0⟩|1⟩ → |0⟩|1⟩|1⟩|0⟩ → |1⟩U|0⟩|1⟩|1⟩ → |1⟩U|1⟩

Maps basis states as:

Resulting 4x4 matrix is controlled-U =

⎥⎦

⎤⎢⎣

⎡=

1110

0100

uuuu

U

22

ControlledControlled--NOTNOT (CNOT)(CNOT)

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

X

|a⟩

|b⟩ |a⊕b⟩

|a⟩≡

|0⟩ + |1⟩

|0⟩ − |1⟩|0⟩ − |1⟩

|0⟩ − |1⟩ H

H

H

H≡

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

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)

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 logn loglogn) ]• Implementation would break RSA and other cryptosystems

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

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

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: ∑

xxfxn )(,

2

1

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

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

28

Deutsch’s problemDeutsch’s problemLet f : {0,1} → {0,1} fThere are four possibilities:

x f1(x)01

00

x f2(x)01

11

x f3(x)01

01

x f4(x)01

10

Goal: determine f(0) ⊕ f(1)

Any classical method requires two queries

What about a quantum method?

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

30

Quantum algorithm for Deutsch Quantum algorithm for Deutsch

H f

H

H

|1⟩

|0⟩ f(0) ⊕ f(1)

1 query + 4 auxiliary operations ⎥⎦

⎤⎢⎣

⎡−

=1111

21H1

2 3

How does this algorithm work?

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

31

Quantum algorithm (Quantum algorithm (11) ) H f

H

H

|1⟩

|0⟩

1

2 3

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

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⟩

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

00

x f2(x)01

11

x f3(x)01

01

x f4(x)01

10

±(|0⟩ + |1⟩) ±(|0⟩ – |1⟩)

33

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

H

±(|0⟩ + |1⟩) ±|0⟩

±(|0⟩ – |1⟩) ±|1⟩

H

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 superpositionsof 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

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

36

OneOne--outout--ofof--four searchfour 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)00011011

1000

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

x f01(x)00011011

0100

x f10(x)00011011

0010

x f11(x)00011011

0001

What is the minimum number of queries classically? ____

Quantumly? ____

37

Quantum algorithm (I)Quantum algorithm (I)

f|x1⟩|x2⟩|y⟩

|x2⟩|x1⟩

|y ⊕ f(x1,x2)⟩

Black box for 1-4 search:

((–1) f(00)|00⟩ + (–1) f(01)|01⟩ + (–1) f(10)|10⟩ + (–1) f(11)|11⟩)(|0⟩ – |1⟩)Output state of query?

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

Input state to query?fHH

H|1⟩

|0⟩|0⟩ (|00⟩ + |01⟩ + |10⟩ + |11⟩)(|0⟩ – |1⟩)

38

Quantum algorithm (II)Quantum algorithm (II)

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

fHH

H|1⟩

|0⟩|0⟩

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

39

top related