35
1 R. Rao: Lecture 10 – Quantum Computing Lecture 10: Quantum Computing Basic Quantum Physics Motivation: Waves versus particles, interference experiments Quantum Notation, Jargon, and Definitions Quantum computing Quantum logic gates Quantum software Quantum hardware

Lecture 10: Quantum Computing

  • Upload
    lelia

  • View
    118

  • Download
    0

Embed Size (px)

DESCRIPTION

Lecture 10: Quantum Computing. Basic Quantum Physics Motivation: Waves versus particles, interference experiments Quantum Notation, Jargon, and Definitions Quantum computing Quantum logic gates Quantum software Quantum hardware. Classical double-slit experiment #1. - PowerPoint PPT Presentation

Citation preview

Page 1: Lecture 10: Quantum Computing

1R. Rao: Lecture 10 – Quantum Computing

Lecture 10: Quantum Computing

Basic Quantum PhysicsMotivation: Waves versus particles, interference

experimentsQuantum Notation, Jargon, and Definitions

Quantum computingQuantum logic gatesQuantum softwareQuantum hardware

Page 2: Lecture 10: Quantum Computing

2R. Rao: Lecture 10 – Quantum Computing

Classical double-slit experiment #1 Gun shoots identical particles

Large particles like tennis balls All identical With random direction At a slow firing rate

Probability of detecting particles for two slits is sum of individual slit probabilities: P12 = P1 + P2

Page 3: Lecture 10: Quantum Computing

3R. Rao: Lecture 10 – Quantum Computing

Classical double-slit experiment #2 Source generates water waves

At any intensity value No reflection from absorber Detector measures wave intensity

(wave height)2

Waves interfere at absorber

Wave intensity I12 = |h1 + h2|2 = |h1|2 + |h2|2 + 2|h1||h2|cos h1 and h2 are complex numbers

Page 4: Lecture 10: Quantum Computing

4R. Rao: Lecture 10 – Quantum Computing

Double-slit with electrons Gun shoots electrons

Individual particles Indestructible All identical With random direction At a slow firing rate

Detector sees individual electrons P12 P1 + P2

P12 = |1 + 2|2 (interference!) 1 and 2 are complex numbers Electrons exhibit wave behavior?

Page 5: Lecture 10: Quantum Computing

5R. Rao: Lecture 10 – Quantum Computing

Measurement: Watching the electrons

Electrons scatter light Put a light at the back

side of the slit wall Watch where the

electron goes

Light on: no interference! P12

= P1 + P2

Light off: interference! P12 = |1 + 2|2

Page 6: Lecture 10: Quantum Computing

6R. Rao: Lecture 10 – Quantum Computing

First principles of quantum mechanics

1. The probability of an event is given by the square of the absolute value of the probability amplitude for that event:

P probability probability amplitude (complex)P | |2

2. When an event can occur several ways, the probability amplitude for the event is the sum of the individual probability amplitudes:

1 + 2 (no measurement interference)P |1 + 2 |2 (probability of event e.g. electron at backstop)

3. If you measure and determine which of the possible alternatives an experiment takes, then the probability of the event is the sum of the probabilities for each alternative:P12 = P1 + P2 = |1|2 + |2|2 (measurement at slits no interference)

Page 7: Lecture 10: Quantum Computing

7R. Rao: Lecture 10 – Quantum Computing

Other Examples of Quantum Phenomena

Spin of an electron: spin up or spin down Can be set to a continuum of values but collapses to up or down

when measured with a magnetic field

Polarization of a photon: horizontal or vertical Measured using a calcite crystal; can be set to a continuum of values

but collapses to horizontal or vertical upon measurement

Energy levels of an ion: excited or ground state Can be put in a continuum of states in between these two but

collapses to excited or ground state when measured

Just as the state of a transistor can represent a bit (0 or 1), the state of a quantum system (e.g. spin) represents a qubit

Page 8: Lecture 10: Quantum Computing

8R. Rao: Lecture 10 – Quantum Computing

Classical notation for a bit: x = 0 or x = 1 (only 2 values)

Dirac notation for a quantum bit x (Qubit |x>) e.g. spin of an electron: up = |1>, down = |0>, continuum of possible values |x>

Quantum Notation

01

0

x = 0(1,0)

(0,1)

x = 1

10

1 10 21 ccx Qubit |x>

|1>

|0>Example: c1 and c2 are two real numbers

Page 9: Lecture 10: Quantum Computing

9R. Rao: Lecture 10 – Quantum Computing

A qubit in a quantum system can exist in a linear superposition of basis states (“eigenstates”) |0> and |1>:

c1and c2 are complex numbers: c1= a1 + b1i ; c2= a2 + b2i i is the square root of –1:

Quantum Jargon

10 21 ccx

)1i(i.e.1i 2

2

1

cc

122

21 cc

Page 10: Lecture 10: Quantum Computing

10R. Rao: Lecture 10 – Quantum Computing

Cliff’s notes on complex numbers

Consider a complex number c = a + bi

Complex conjugate of c is c* = a - bi

Amplitude of c = = amplitude of c*

Squared amplitude of c = a2 – (-b2) = a2 – i2b2 = c*c

c can also be written as c = Aei = A (cos + i sin ) where:

is the amplitude, is the phase of c,

222 bac

sin and cos2222 ba

b

ba

a

22 baA

Page 11: Lecture 10: Quantum Computing

11R. Rao: Lecture 10 – Quantum Computing

The Effect of Measurement

If you measure the quantum system, the qubit (superposition of states) collapses to one of the basis states |0> and |1>

c1and c2 are called probability amplitudes because probability of getting |0> or |1> upon measurement depends on their squared amplitudes:

Since Prob(|0>) + Prob(|1>) = 1,

1or0either measure10 21 ccx

21

21

210Prob bac 2

222

221Prob bac

122

21 cc

Page 12: Lecture 10: Quantum Computing

12R. Rao: Lecture 10 – Quantum Computing

Unitary matrices

Matrix of complex numbers:

Conjugate transpose of a matrix:

A matrix U is unitary if U*TU = I I is the identity matrix

E.g., 2221

1211

cccc

AcA ij

* E.g., **22

*12

*21

*11*

cccc

AcA Tji

T

Page 13: Lecture 10: Quantum Computing

13R. Rao: Lecture 10 – Quantum Computing

Why are unitary matrices important?

Suppose |x> is a qubit:

|x> has length 1

Suppose |y> = U|x> (i.e. transform |x> using U)

Length of |y> is:

Unitary matrices preserve length! Unitary transformations conserve probability

1)(2

1**2

*1

2

1*2

*1*

cc

UUcccc

Ucc

UxUlength T

T

122

21 cc

2

1

cc

x

Page 14: Lecture 10: Quantum Computing

14R. Rao: Lecture 10 – Quantum Computing

Quantum Operations and Gates

Quantum systems are described by Schrödinger’s wave equation

Integrating this differential equation, we can show that the state |x> of a quantum system evolves as: |x>new = U|x>old where

U is a unitary matrix derived from Hamiltonian HH is a unitary matrix that represents total energy of the system Every quantum state |x> is a vector of unit length Quantum gates map unit vectors |x> to unit vectors |y>

For quantum computing, we design H so that U acts like a logic gateQuantum computers are deterministic, linear, reversible, and

unitary until a measurement is made

tHdtiU

0'exp

Page 15: Lecture 10: Quantum Computing

15R. Rao: Lecture 10 – Quantum Computing

1-bit quantum gates

Example: NOT gate

Check: UNOT is unitary

1-bit gates:

UNOT FHG IKJ0 11 0

U

U

NOT

NOT

10

01

01

10

FHGIKJ FHGIKJFHGIKJ FHGIKJ

S phase shift gate

R Rotation gate

US FHG IKJ1 00 1

U R FHG IKJ1

21 11 1

Walsh-Hadamard gate

11

112

1WHU

Page 16: Lecture 10: Quantum Computing

16R. Rao: Lecture 10 – Quantum Computing

1-bit quantum gates (cont.)

There are infinitely many 1-bit gates, corresponding to the rotations about a sphere: e.g. R gate

221

221

221

221

NOT ii

ii

U

Another example:

Square root of NOT gate

NOTNOTNOT 0110

UUU

Page 17: Lecture 10: Quantum Computing

17R. Rao: Lecture 10 – Quantum Computing

More Notation

A qubit is given by a column vector:

In Dirac notation, define a row vector:

The “bra”-“ket” of x is the inner product:

2

1

cc

x

12*21

*1

2

1*2

*1

cccc

cc

ccxx

lyrespective of ket"" and bra"" called are and xxx

*2

*1 ccx

Page 18: Lecture 10: Quantum Computing

18R. Rao: Lecture 10 – Quantum Computing

Orthonormal basis states

The vectors |x and |y are orthonormal iff they are orthogonal:

and normalized:

Example:

x y 0

x x y y 1 1 and

001

1001 and 010

0110

110

1011 and 101

0100

10

1and01

0

Page 19: Lecture 10: Quantum Computing

19R. Rao: Lecture 10 – Quantum Computing

What is a Hilbert Space? If S is a set of basis states, then the Hilbert space is the space

of functions from S to complex numbers: each function produces a vector of complex numbers in this space

Example: |0> and |1> define an orthonormal Hilbert space whose vectors are of the form:

The states of a quantum system are vectors in a particular Hilbert space

Measurement of the system produces one of the orthogonal axes (a basis state or “eigenstate”) of the Hilbert space

2

1

cc

x

Page 20: Lecture 10: Quantum Computing

20R. Rao: Lecture 10 – Quantum Computing

Vector Products in Dirac Notation

Vector Products of basis states:

gate! NOT for thematrix theis This 0110

0110

0100

0110

01

0010

1001

10

Page 21: Lecture 10: Quantum Computing

21R. Rao: Lecture 10 – Quantum Computing

Quantum Logic Gates: 1-bit gates

NOT gate:

NOT gate in Dirac Notation:

UNOT FHG IKJ0 11 0

U

U

NOT

NOT

10

01

01

10

FHGIKJ FHGIKJFHGIKJ FHGIKJ 01

10

NOT

NOT

U

U

0110NOT U

01011101

10010100

NOT

NOT

U

U

Page 22: Lecture 10: Quantum Computing

22R. Rao: Lecture 10 – Quantum Computing

2-bit Quantum Logic Gates Orthonormal Basis States:

Controlled NOT gate:

CN gate in Dirac Notation:

A B A’ B’0 0 0 00 1 0 11 0 1 11 1 1 0

1011111001010000 CNU

11and 10,01,00

1000

11

0100

10

0010

01

0001

00

1111101000100010 E.g. CNU

Page 23: Lecture 10: Quantum Computing

23R. Rao: Lecture 10 – Quantum Computing

Two-bit Quantum Operations

Operation of CN gate on arbitrary qubits x:

2

3

1

0

3

2

1

0

3210

3210

3210

10110100

11100100

,11100100 If

cccc

cccc

U

cccc

UcUcUcUcxU

ccccx

CN

CNCNCNCNCN

1011111001010000 CNU

UCN switches the amplitudes of |10> and |11>

Page 24: Lecture 10: Quantum Computing

24R. Rao: Lecture 10 – Quantum Computing

Entanglement

Two bits in a quantum system are entangled if measurement of one is always correlated with measurement of the other

If you measure the second bit of x, you know the first bit also: E.g. if second bit was 1, we know first bit must be 1

The qubits in y are not entangled: cannot determine value of first bit

based on value of second bit

Entangled qubits cannot be factored into their components:

zero) are and ( 1100 E.g. 2130 ccccx

zero) are and ( 1101 E.g. 2130 ccccy

10101100 221130 babacc

Page 25: Lecture 10: Quantum Computing

25R. Rao: Lecture 10 – Quantum Computing

No Cloning Theorem There is no unitary transform that allows us to copy a qubit

Proof: Suppose U is a copying matrix: U|c0> = |cc> for all states |c> Then,

Illustration: Copy a bit using CNOT….yields an entangled state!

)1100(2

1)11100100(21 but

)1100(2

1 ),10(2

1 if

cccU

cUc

10 ba

0

Page 26: Lecture 10: Quantum Computing

26R. Rao: Lecture 10 – Quantum Computing

Three-bit Quantum Gates

Controlled Controlled NOT (CCN) gate:

UCCN is an 8 x 8 matrix:

UCCN is universal: we can form any Boolean function using only CCN gates: e.g. AND if C = 0

A CCN gate

A A'

B B'

C C'

A B C A’ B’ C’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

110111111110000000

Page 27: Lecture 10: Quantum Computing

27R. Rao: Lecture 10 – Quantum Computing

Premise of quantum computing

Simulating an N-bit quantum system on a classical computer requires an amount of computation exponential in N Need to track 2N complex amplitudes simultaneously

Nature updates real systems in constant time Updates all the amplitudes simultaneously Uses quantum superposition, or quantum parallelism

Quantum computation: Use nature to compute Use N qubits to represent 2N complex amplitudes

Perform unitary operations on qubitsMeasure to get the output

Harness quantum superposition to get exponential speedupexponential speedup

Page 28: Lecture 10: Quantum Computing

28R. Rao: Lecture 10 – Quantum Computing

Comparson of Classical versus Quantum Computing

N particles 2N unique states

Computations are sequential

Select 1 state Operate on it Put it back into memory

Example: N=3 3 bits 8 states Work on one number at a time

x = 101

N particles 2N unique states

Computations occur in parallel States interact

They are entangled Operate on all states at once

Example: N=3 3 qbits 8 complex amplitudes Operator manipulates 8 at once

x a b c h

1 000 001 010 111...

Classical Computer Quantum Computer

Exponential SpeedupExponential Speedup

Page 29: Lecture 10: Quantum Computing

29R. Rao: Lecture 10 – Quantum Computing

Shor’s Quantum Factoring Algorithm

Suppose you want to factor a number N

Shor’s algorithm:1. Pick random x < N.2. Compute f = gcd(x,N); if f l, return f // f is a factor3. Find the least r > 0 such that xr 1 (mod N).4. Compute f1 = gcd(xr/2 – 1,N) ); if f1 l, return f1 // f1 is a factor5. Compute f2 = gcd(xr/2 + 1,N); if f2 l, return f2 // f2 is a factor6. Go to 1 and repeat

Number of repetitions for finding a factor with prob > 0.5 is polynomial in length of N

Hard part: Step 3. Find the least r such that xr 1 (mod N). r is the period of repetition of x1, x2,… (mod N).

Page 30: Lecture 10: Quantum Computing

30R. Rao: Lecture 10 – Quantum Computing

Quantum parallelism for finding period Finding the period r of repetition of x1, x2,… (mod N).

1. Prepare an equal superposition of all values of r < q = N2

2. Chose random x and compute (xr mod N) for all r simultaneously:

3. Apply quantum Fourier Transform UQFT to superposition of states:

4. Measure contents of register containing k to compute period r See Shor’s paper and tutorials on class website for more details

1

1

0,q

r

qr

q

r

r qNxr1

mod,

q

kr

r qNxkqikr0,

mod,)/2exp(

Page 31: Lecture 10: Quantum Computing

31R. Rao: Lecture 10 – Quantum Computing

Grover’s Database Search Algorithm Problem: Search a random list of N items for a target item

xT such that the function P(xT) is true e.g. searching for a key in DES

Grover’s algorithm: Amplify amplitude of target item

1. Prepare an equal superposition of all x2. Invert the amplitude of xj if P(xj) = 13. Subtract all amplitudes from average amplitude4. Repeat (2) and (3) times5. Measure the result

Quadratic speedup over classical search (O(N) steps).

N4

Page 32: Lecture 10: Quantum Computing

32R. Rao: Lecture 10 – Quantum Computing

Quantum Hardware Suggested Possibilities: Ion Traps (Quantum dots), Cavity QED

(quantum electrodynamics), NMR: nuclear magnetic resonance

QC Features Ion Trap Cavity QED NMRQubit Energy levels in an

ion within an electric field

Polarization of a photon in a cavity

Spin states of a nucleus in a molecule

Preparation Ion cooling Prepare linearly and circularly polarized photons

Set average state of spins in sample

Evolution Apply laser pulses at specific frequencies

Photon-photon interactions

Apply radio frequency pulses

Conditional logic

Coupled vibrations of trapped ions

State of Cesium ion in cavity & photon polarization

Nuclear spin-spin interactions in a molecule

Page 33: Lecture 10: Quantum Computing

33R. Rao: Lecture 10 – Quantum Computing

Quantum Computing: Summary

Basic Mechanism: Parallel computation along all possible computational paths, with selective manipulation of probability amplitudes

Main Features: Problem instances encoded as states of a quantum system (e.g. spins of n electrons, polarization values of n photons etc.) 1. The system is put into a superposition of all possible states, each

weighted by its probability amplitude (= a complex number ci)E.g. Qubits for 2 electrons = c1 |00> + c2 |01> + c3 |10> + c4 |11>

2. The system evolves according to quantum principles: 1. Unitary matrix operation: describes how superposition of states

evolves over time when no measurement is made2. Measurement operation: maps current superposition of states to

one state based on probability = square of amplitude ci

E.g. probability of seeing output bits (00) is | c1|2

Page 34: Lecture 10: Quantum Computing

34R. Rao: Lecture 10 – Quantum Computing

Quantum Computing: Problems and Future Directions

Problems: Decoherence: Environmental noise may inadvertently “measure” the

system, thereby disturbing the computation (current decoherence time ~ 1 ms)Software solution: Error correcting codes may help ([Shor et al.])

Scaling: All physical implementations so far (NMR, Cavity QED, etc.) have failed to scale beyond a few qubits.

Future Directions: Hardware Implementations: New physical substrates are needed that

allow manipulations of large numbers of qubits (superpositions of states) with little or no decoherence

New Algorithms: New ways of exploiting quantum parallelism are needed that allow solutions to NP-complete problems

Page 35: Lecture 10: Quantum Computing

35R. Rao: Lecture 10 – Quantum Computing

5-minute break…(Please fill out course evaluations)

Next: Student presentations!