A Brief Introduction to Quantum Computation 1 Melanie Mitchell Portland State University

50
A Brief Introduction to Quantum Computation 1 Melanie Mitchell Portland State University s talk is based on the following paper: effel & W. Polak, troduction to Quantum Computing for Non-Physicists. omputing Surveys, 32(3) 300-335, 2000.

description

A Brief Introduction to Quantum Computation 1 Melanie Mitchell Portland State University. 1 This talk is based on the following paper: E. Rieffel & W. Polak, An introduction to Quantum Computing for Non-Physicists. ACM Computing Surveys , 32(3) 300-335, 2000. - PowerPoint PPT Presentation

Transcript of A Brief Introduction to Quantum Computation 1 Melanie Mitchell Portland State University

Page 1: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

A Brief Introduction to Quantum Computation1

Melanie Mitchell

Portland State University

1 This talk is based on the following paper:

E. Rieffel & W. Polak, An introduction to Quantum Computing for Non-Physicists. ACM Computing Surveys, 32(3) 300-335, 2000.

Page 2: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

History of Quantum Computation

1982: Richard Feynman, “Simulating physics with computers”

• Notes that simulating quantum systems with classical computers is exponential in the number n of particles in the system

• Suggests that quantum effects could themselves be used to make such simulations polynomial in n

• General idea: due to “superposition” and “entanglement”, state space encoded by quantum system of n particles is exponentially larger than state space encoded by classical system of n particles.

Page 3: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

• Could this exponential increase in state space be harnessed to create exponential parallelism (2n) with n computing elements?

• At that time, no one had any workable ideas about how to build a computer that exploits quantum mechanics.

• Also, no one had a detailed model of what a quantum computer would be like.

• Also, no one had any algorithms for actually computing anything on a quantum computer.

Page 4: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

• 1985: David Deutsch, “Quantum theory, the Church-Turing principle and the universal quantum computer”

– Developed the notion of a universal quantum computer

– Gave a simple example of a quantum algorithm that is faster than any known classical algorithm for the same problem

Page 5: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

• 1994, Peter Shor, “Polynomial time algorithms for prime factorization and discrete logarithms on a quantum computer”

– Gave quantum algorithm for factoring large numbers in polynomial time, and for performing discrete logs

– First major algorithmic result in field of quantum computation

– Got a lot of people interested in the field

– DARPA, NSF, others started throwing money at it

Page 6: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Other results:

• Cryptography: Secure private key communication using qubits.

• Grover’s search algorithm: Searches an unstructured list of n items in O(sqrt(n)) on a quantum computer. Known algorithms for classical computers are no better than O(n).

• Theory of quantum error correction

“It is as yet unknown whether the power of quantum parallelism can be harnessed for a wide variety of applications.”

Open question: Can any NP-complete problem be solved in polynomial time on a quantum computer?

Page 7: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Polarization experiment

• Polarization of light: electric field vector is confined to a single direction. This is a quantum-mechanical property of photons.

• Light source: Assume each photon has a random polarization

• Filter A: Horizontally polarized

A

1/2 original intensity

all photons horizontallypolarized

photons randomlypolarized

Page 8: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Polarization experiment

• Polarization of light: electric field vector is confined to a single direction. This is a quantum-mechanical property of photons.

• Light source: Assume each photon has a random polarization

• Filter A: Horizontally polarized

• Filter B: Vertically polarized

A B

photons randomlypolarized

all photons horizontallypolarized

no light

Page 9: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Polarization experiment

• Polarization of light: electric field vector is confined to a single direction. This is a quantum-mechanical property of photons.

• Light source: Assume each photon has a random polarization

• Filter A: Horizontally polarized

• Filter B: Vertically polarized

• Filter C: polarized at 45 degreesA B

photons randomlypolarized

C

1/8 original intensity

Page 10: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Polarization experiment explanation

• Photon’s polarization state can be modeled by a unit vector pointing in the appropriate direction

• Let the basis vectors be and

• Any polarization can be expressed as

where a and b are complex numbers such that

ba

122 ba

Page 11: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

• Measurement postulate of quantum mechanics

– Any device measuring a quantum system has an associated orthonormal basis with respect to which the measurement takes place.

– Measurement of a state transforms the state into one of these basis vectors.

– The probability that the state is measured as basis vector u is the norm of the amplitude of the component of the original state in the direction of u.

Page 12: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

• Example:

Let be the polarization state of a photon.

Then this state will be measured as with probability |a|2

and as with probability |b|2 .

These are indeed probabilities, since .

The measurement will also change the state to the result

of the measurement.

Its original value cannot be determined.

ba

122 ba

Page 13: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

• Back to the polarization experiment:

– Original light source produces photons with random polarizations:

– Thus 50% are measured as horizontal, and let through. (Why?)

– Those photons are now in the horizontal state,

None are let through by the vertical filter.

ba

Page 14: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

• Now let the 45o filter be put behind the horizontal filter. The 45o filter measures photon polarization with respect to a new basis:

• Photons in state will be measured as with probability 1/2. So half will get through.

• Likewise, filter B will let half of these through.

• Total photons getting through all three filters: (1/2)3 = 1/8.

Page 15: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Bra/Ket notation

Ket:

• Column vector, used to describe quantum states

• E.g., can be written as

• In general,

Bra: • Conjugate transpose of

x

x

1,0 TT )1,0(,)0,1(

x

Tbabax ),(10

),( bax

Page 16: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Quantum bits (“qubits”)

A qubit is a unit vector in a two-dimensional complex vector space.

Assume a particular basis, denoted by

These basis states represent the classical bit values 0 and 1.

However, unlike classical bits, qubits can be in a

superposition of these two states, e.g.,

such that

1,0

10 ba

122 ba

Page 17: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Suppose a qubit (a, b)T is measured with respect to the basis

Probability that will be measured is |a|2, and

Probability that will be measured is |b|2.

When a qubit is measured, its state becomes the basis state that was measured. All information about the original superposition is lost.

0

1,0

1

Page 18: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Example of using qubits: Quantum key distribution

(Bennett & Brassard, 1987)

• Solves problem of secure key distribution for private key cryptography

• Public key cryptography using RSA is great, but relies on factoring being a hard problem.

• Private key cryptography is in principle more secure, but relies on private key being securely transmitted.

• Quantum method gives perfect security in private key transmission

Page 19: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Alice wants to send a key to Bob by encoding each bit as the quantum state of a photon.

She secretly encodes each bit by randomly choosing one of two basis:

or

E.g.,

1

0

1 1 0 1 1 1 0 0 0 0

1

0

Page 20: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Bob measures the state of each photon he receives by randomly picking either basis, up-down (ud), or diagonal (diag).

Now Alice and Bob communicate what bases they used for each measurement. They save only the bits for which they used the same bases (approx. 50%). These bits form the private key.

1 1 0 1 1 1 0 0 0 0

What Alice sent

What Bob measured

Basis: ud diag ud diag ud ud diag ud diag diagMeasurement:

1 0 0 1 1 1 1 0 1 0

Page 21: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Bob measures the state of each photon he receives by randomly picking either basis, up-down (ud), or diagonal (diag).

Now Alice and Bob communicate what bases they used for each measurement. They save only the bits for which they used the same bases (approx. 50%). These bits form the private key.

1 1 0 1 1 1 0 0 0 0

What Alice sent

What Bob measured

Basis: ud diag ud diag ud ud diag ud diag diagMeasurement:

1 0 0 1 1 1 1 0 1 0

Page 22: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Now, suppose a third person, Eve, intercepts the stream of photons from Alice, measures their states, and sends new photons with the measured states to Bob.

She will choose the wrong basis 50% of the time.

So on the photons for which Bob chooses the same basis as Alice, 25% of them will be incorrect.

Bob and Alice can detect this error by sending sample “correct” (parity) bits to each other over open communication line. Thus they can detect an eavesdropper.

Page 23: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Multiple qubits

• Suppose you have n particles whose states are each vectors in a 2-D vector space (e.g., x, y position)

• How many dimensions do you need to describe complete state of the system?

– Particles have coordinates (x1, y1), (x2, y2), ..., (xn, yn)

– Complete state is simply a list of all the coordinates:

(x1, y1, x2, y2, ..., xn, yn)

– I.e., 2n dimensions

Page 24: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

• Quantum case is different due to “entanglement”.

• Again, suppose you have n particles whose states are each vectors in a 2-D vector space.

– Particles have coordinates (x1, y1), (x2, y2), ..., (xn, yn)

– Complete state is more complicated, due to entanglement of states:

(x1x2x3...xn-1xn, x1x2x3...xn-1yn, x1x2x3...yn-1xn, ...)

– I.e., 2n dimensions

Page 25: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Example: n = 2

– Classical basis vectors: (1, 0), (0, 1)– Classical state of system: ( (1, 2), (2, 1) )

– Quantum basis vectors:

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

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

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

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

– Quantum state of system: Linear combination of those basis vectors

x

y (1, 2)

(2, 1)

Page 26: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Interpretation: In quantum system you now need four numbers to give the state of the two-particle system. Each dimension describes a particular entanglement of the original dimensions of the individual particles.

x

y (1, 2)

(2, 1)

Page 27: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

In quantum computation, the “particles” are the qubits.

Each qubit has a state defined by two complex numbers:

A two-qubit state is defined by four complex numbers:

1

01 and

0

10

where,10 ba

1

0

0

0

11 ,

0

0

1

0

10 ,

0

1

0

0

01 ,

0

0

0

1

00

where,11100100

dcbaq

Page 28: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

• Recall the notion of superposition:

– A single qubit is in a superposition of two basis states:

– A 3-qubit system is in a superposition of eight basis states:

where a1, a2, ..., an are complex numbers such that

• In general, an n-qubit system is in a superposition of 2n basis states.

10 ba

111110101100011010001000 87654321 aaaaaaaa

12

8

2

7

2

6

2

5

2

4

2

3

2

2

2

1 aaaaaaaa

Page 29: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

• This exponential increase in size of state space as n increases is why classical computers cannot efficiently simulate quantum systems.

• This was Feynman’s impetus for proposing quantum computers.

Page 30: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Measurement in entangled systems

• Example 1: The state is entangled:

– If no bits have yet been measured, the probability of measuring the first (or second) bit as is 0.5.

– However, if the second (or first) bit has been measured, the probability is 0 or 1, depending on what the second (or first) bit was measured to be.

)1100(2

1

0

Page 31: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

• Example 2: The state is not entangled:

Can factor out first bit: it will always be measured as .

Measuring it does not affect the second bit.

)0100(2

1

0

Page 32: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

EPR paradox

(Einstein, Podolsky, Rosen, “Can quantum-mechanical description of physical reality be considered complete?” (1935))

• Imagine a source that generates two maximally entangled particles:

• One particle is sent to Alice, and the other to Bob.

• Suppose Alice measures her particle and observes state .

• Then the combined state will now be . This means Bob will also measure .

• The change in state occurs instantaneously, no matter how far away Alice and Bob are from each other.

)1100(2

1

0

000

Page 33: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

• Does this allow communication faster than the speed of light?

• EPR’s explanation: – Each particle has a “hidden” internal state that determines what the result of any

given measurement will be. – Called “local hidden variable theory”.– Einstein: “God does not play dice.”

• Problem with this explanation: – Doesn’t explain measurements with respect to a different basis. – Bell’s theorem: predicts an inequality that must be satisfied if hidden variable

theory is correct.– Experiments show it to be incorrect.

Page 34: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

• Cause and effect explanation:

– Somehow Alice’s measurement causes the result found by Bob,

• Problems with this explanation:

– Violates relativity theory: Can set up experiment where one observer sees Alice do measurement first, while other observer sees Bob do measurement first. This does not change the results of the measurements.

– This also shows that Alice and Bob can’t use their particles to communicate faster than the speed of light.

– “All that can be said is that Alice and Bob will observe the same random behavior.”

Page 35: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

• From Black et al., “Quantum computing and communications” (2002):

“The ugly truth is that general relativity and quantum mechanics are not consistent. That is, our current formulations of general relativity and quantum mechanics give different predictions for extreme cases. We assume there is a ‘Theory of Everything’ that reconciles the two, but it is still very much an area of thought and research.

Since relatively is not needed in quantum computing, we ignore this problem.”

Page 36: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

The four basic single-qubit transformations

10

01

11

00:

01

10

01

10:

01

10

01

10:

10

01

11

00:

Z

Y

X

I

Page 37: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

11

11

2

1

)10(2

11

)10(2

10

:H

How are I, X, Y, Z, and H implemented in a physical quantum computer?

That’s beyond the scope of this talk....

Hadamard transformation

Page 38: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Walsh-Hardamard Transformation

12

02

1

))10()10()10((2

1

000)(:

n

xn

n

x

HHHW

For example:

111110101100

011010001000(2

1

))10()10()10((2

1

000)(

3

3

HHH

Page 39: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Quantum Gate Arrays

• Uf is a quantum gate array that implements function f

(Deutsch proved Uf can be constructed for any computable function f)

• To compute f(x), apply Uf to tensored with a “register” of :

xs0

)(,0, xfxxU f

Page 40: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Quantum Parallelism

• To get exponential parallelism, apply Uf to an input that is in a superposition of all inputs.

• Result will be superposition of all results of applying f(x) to all inputs.

• Quantum algorithm to compute function f(x):

1. Start with n-qubit state 0...00

Page 41: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

2. Apply Walsh-Hadamard transformation W to this state to get a superposition of all integers in [0, 2n-1]:

12

02

1

)1...11...1...000...00(2

1

000)(

n

xn

n

x

HHH

Page 42: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

3. Tensor this state with a “register” of one or more zero qubits:

4. Now apply Uf to this state:

5. Result is superposition of f(x) for all integers x[0,2n-1]

6. This is what is meant by quantum parallelism.

12

0

0,2

1n

xn

x

12

0

12

0

12

0

)(,2

10,

2

10,

2

1nnn

xn

xfn

xnf xfxxUxU

Page 43: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

• Example: Consider quantum AND gate (“Toffoli gate”):

• Now prepare superposition of all possible bit combinations of x and y, together with the “register” :0

)110100010000(2

1

yxyxyxT ,,0,,:

Page 44: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

• Now, apply T to this superposition:

• The resulting quantum state, obtained in one step, gives a superposition of all possible results for the AND function for two bits.

• What happens if we measure this quantum state?

• Need clever techniques to allow user to read out a desired result.

1111000100002

1

1101000100002

1

T

Page 45: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Photo gallery

Edward FredkinTomosso Toffoli

Peter Shor

David Deutsch Richard Jozsa

Page 46: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Very brief outline of Shor’s algorithm for factoring

We have a composite number M, and we want to find a factor of M.

Approach: Reduce the problem of factoring to the problem of finding the period of an integer function, f(x)=ax (mod M), for some a.

Problem there is no known classical polynomial time algorithm to find period r.

Page 47: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

1. Guess integers a and m (with some constraints). Define f(x) = ax (mod M).

2. Create a quantum state of m zero qubits along with a extra register of qubits:

Apply the Walsh-Hadamard transform to obtain an equal-probability superposition of all integers from 0 to 2m-1:

12

0

0,2

1m

xm

x

0,0...00

Page 48: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

3. Now use Uf to compute f (x) for all integers from 0 to

2m-1 simultaneously:

4. From this state, create a new (related) state whose amplitude has the same period as f.

To do this, measure the qubits that encode f(x). Suppose it is measured as u.

12

0

)(,2

1m

xm

xfx

Page 49: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

Actually, we don’t care about u; we only care about the side effect of measurement: the quantum state is now

where C is a scale factor, and

Note that the period of g(x) equals the period of f (x).

If we could measure two successive x’s in the sum, we would know the period. But we can only do one measurement.

12

0

,)(m

x

uxxgC

otherwise. 0

)( if 1)(

uxfxg

Page 50: A Brief Introduction to  Quantum Computation 1 Melanie Mitchell Portland State University

5. Take the quantum Fourier transform of this new state.

6. Extract the period r. If period is a power of 2, this can be done exactly. If not, “guess” the period, using “continued fractions”.

7. Now can apply Euclid’s algorithm (polynomial time) to obtain a factor of M from the period r. If it fails, start over with a new guess for a and m. Shor showed that this algorithm has high probability of succeeding after only a few repetitions.