Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington...

65
Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutsch’s Algorithm

Transcript of Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington...

Page 1: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Quantum Computing

Dave BaconDepartment of Computer Science & Engineering

University of Washington

Lecture 2: More Quantum TheoryDeutsch’s Algorithm

Page 2: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Summary of Last Lecture

Page 3: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Summary of Last Lecture

Page 4: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Ion Trap

2 9Be+ Ions in an Ion Trap

Oscillating electricfields trap ions

like charges repel

Page 5: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Shuttling Around a Corner

Pictures snatched from Chris Monroe’sUniversity of Michigan website

Page 6: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

QubitsTwo dimensional quantum systems are called qubits

A qubit has a wave function which we write as

Examples:

Valid qubit wave functions:

Invalid qubit wave function (not normalized):

Page 7: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Measuring QubitsA bit is a classical system with two possible states, 0 and 1

A qubit is a quantum system with two possible states, 0 and 1

When we observe a qubit, we get the result 0 or the result 1

0 1or

If before we observe the qubit the wave function of the qubit is

then the probability that we observe 0 is

and the probability that we observe 1 is

“measuring in the computational basis”

Page 8: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Measuring Qubits

We are given a qubit with wave function

If we observe the system in the computational basis, then weget outcome 0 with probability

and we get outcome 1 with probability:

Example:

Page 9: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Measuring Qubits ContinuedWhen we observe a qubit, we get the result 0 or the result 1

0 1or

If before we observe the qubit the wave function of the qubit is

then the probability that we observe 0 is

and the probability that we observe 1 is

“measuring in the computational basis”

and the new wave function for the qubit is

and the new wave function for the qubit is

Page 10: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Measuring Qubits Continued

0

1

probability

probability

new wave function

new wave function

The wave function is a description of our system.

When we measure the system we find the system in one state

This happens with probabilities we get from our description

Page 11: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Measuring Qubits

We are given a qubit with wave function

If we observe the system in the computational basis, then weget outcome 0 with probability

and we get outcome 1 with probability:

Example:

new wave function

new wave function

Page 12: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Measuring Qubits

We are given a qubit with wave function

If we observe the system in the computational basis, then weget outcome 0 with probability

and we get outcome 1 with probability:

Example:

new wave function

a.k.a never

Page 13: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Unitary Evolution for QubitsUnitary evolution will be described by a two dimensional unitary matrix

If initial qubit wave function is

Then this evolves to

Page 14: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Unitary Evolution for Qubits

Page 15: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Single Qubit Quantum CircuitsCircuit diagrams for evolving qubits

quantum wiresingle line = qubit

inputqubit wave function

quantum gate

output qubitwave function

time

measurement incomputationalbasis

Page 16: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Two QubitsTwo bits can be in one of four different states

00 01 10 11

Similarly two qubits have four different states

The wave function for two qubits thus has four components:

first qubit second qubit

00 01 10 11

first qubit second qubit

Page 17: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Two Qubits

Examples:

Page 18: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

When Two Qubits Are TwoThe wave function for two qubits has four components:

Sometimes we can write the wave function of two qubitsas the “tensor product” of two one qubit wave functions.

“separable”

Page 19: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Two Qubits, Separable

Example:

Page 20: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Two Qubits, EntangledExample:

Either

or

but this implies

but this implies

contradictions

Assume:

So is not a separable state. It is entangled.

Page 21: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Measuring Two QubitsIf we measure both qubits in the computational basis, then weget one of four outcomes: 00, 01, 10, and 11

If the wave function for the two qubits is

Probability of 00 is

Probability of 01 is

Probability of 10 is

Probability of 11 is

New wave function is

New wave function is

New wave function is

New wave function is

Page 22: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Two Qubits, Measuring

Example:

Probability of 00 is

Probability of 01 is

Probability of 10 is

Probability of 11 is

Page 23: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Two Qubit EvolutionsRule 2: The wave function of a N dimensional quantum system evolves in time according to a unitary matrix . If the wave function initially is then after the evolution correspond to the new wave function is

Page 24: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Two Qubit Evolutions

Page 25: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Manipulations of Two BitsTwo bits can be in one of four different states

We can manipulate these bits

00011011

01001011

Sometimes this can be thought of as just operating on one of the bits (for example, flip the second bit):

00011011

01001110

But sometimes we cannot (as in the first example above)

00 01 10 11

Page 26: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Manipulations of Two QubitsSimilarly, we can apply unitary operations on only one of thequbits at a time:

Unitary operator that acts only on the first qubit:

first qubit second qubit

two dimensional unitary matrix

two dimensional Identity matrix

Unitary operator that acts only on the second qubit:

Page 27: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Tensor Product of Matrices

Page 28: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Tensor Product of MatricesExample:

Page 29: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Tensor Product of MatricesExample:

Page 30: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Tensor Product of MatricesExample:

Page 31: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Tensor Product of MatricesExample:

Page 32: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Two Qubit Quantum Circuits

A two qubit unitary gate

Sometimes the input our output is known to be seperable:

Sometimes we act only one qubit

Page 33: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Some Two Qubit Gates

controlled-NOTcontrol

target

Conditional on the first bit, the gate flips the second bit.

Page 34: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Computational Basis and Unitaries

Notice that by examining the unitary evolution of all computationalbasis states, we can explicitly determine what the unitary matrix.

Page 35: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Linearity

We can act on each computational basis state and then resum

This simplifies calculations considerably

Page 36: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Linearity

Example:

Page 37: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Linearity

Example:

Page 38: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Some Two Qubit Gates

controlled-NOTcontrol

target

control

targetcontrolled-U

controlled-phase

swap

Page 39: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Quantum Circuits

controlled-H

Probability of 10:

Probability of 11:

Probability of 00 and 01:

Page 40: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Matrices, Bras, and KetsSo far we have used bras and kets to describe row and columnvectors. We can also use them to describe matrices:

Outer product of two vectors:

Example:

Page 41: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Matrices, Bras, and KetsWe can expand a matrix about all of the computational basisouter products

Example:

Page 42: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Matrices, Bras, and KetsWe can expand a matrix about all of the computational basisouter products

This makes it easy to operate on kets and bras:

complex numbers

Page 43: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Matrices, Bras, and Kets

Example:

Page 44: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

ProjectorsThe projector onto a state (which is of unit norm) is given by

Note that

and that

Projects onto the state:

Example:

Page 45: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Measurement RuleIf we measure a quantum system whose wave function isin the basis , then the probability of getting the outcomecorresponding to is given by

where

The new wave function of the system after getting themeasurement outcome corresponding to is given by

For measuring in a complete basis, this reduces to our normalprescription for quantum measurement, but…

Page 46: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Measuring One of Two QubitsSuppose we measure the first of two qubits in the computational basis. Then we can form the two projectors:

If the two qubit wave function is then the probabilities ofthese two outcomes are

And the new state of the system is given by either

Outcome was 0 Outcome was 1

Page 47: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Measuring One of Two QubitsExample:

Measure the first qubit:

Page 48: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Instantaneous Communication?Suppose two distant parties each have a qubit and theirjoint quantum wave function is

If one party now measures its qubit, then…

The other parties qubit is now either the or

Instantaneous communication? NO.Why NO? These two results happen with probabilities.

Correlation does not imply communication.

Page 49: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Important Single Qubit UnitariesPauli Matrices:

“bit flip”

“phase flip”

“bit flip” is just the classical not gate

Page 50: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Important Single Qubit Unitaries

“bit flip” is just the classical not gate

Hadamard gate:

Jacques Hadamard

Page 51: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Single Qubit Manipulations

Use this to compute

But

So that

Page 52: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

A Cool Circuit IdentityUsing

Page 53: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Reversible Classical GatesA reversible classical gate on bits is one to one function onthe values of these bits.

Example:

reversible not reversible

Page 54: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Reversible Classical GatesA reversible classical gate on bits is one to one function onthe values of these bits.

We can represent reversible classical gates by a permutationmatrix.

Permutation matrix is matrix in which every row and column contains at most one 1 and the rest of the elements are 0

Example:

reversible

input

output

Page 55: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Quantum Versions ofReversible Classical Gates

A reversible classical gate on bits is one to one function onthe values of these bits.

We can turn reversible classical gates into unitary quantum gates

Permutation matrix is matrix in which every row and column contains at most one 1 and the rest of the elements are 0

Use permutation matrix as unitary evolution matrix

controlled-NOT

Page 56: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

David Speaks

DavidDeutsch

1985

“Complexity theory has been mainly concerned with constraints upon the computation of functions: which functions can be computed, how fast, and with use of how much memory. With quantum computers, as with classical stochastic computers, one must also ask ‘and with what probability?’ We have seen that the minimum computation time for certain tasks can be lower for Q than for T . Complexity theory for Q deserves further investigation.”

Q = quantum computersT = classical computers

Page 57: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Deutsch’s Problem

Suppose you are given a black box which computes one ofthe following four reversible gates:

“identity” NOT 2nd bit controlled-NOT controlled-NOT+ NOT 2nd bit

Deutsch’s (Classical) Problem:How many times do we have to use this black box to determine whether we are given the first two or the second two?

constant balanced

Page 58: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Classical Deutsch’s Problem

“identity” NOT 2nd bit controlled-NOT controlled-NOT+ NOT 2nd bit

constant balanced

Notice that for every possible input, this does not separate the “constant” and “balanced” sets. This implies at least one use of the black box is needed.

Querying the black box with and distinguishes betweenthese two sets. Two uses of the black box are necessary and sufficient.

Page 59: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Classical to Quantum Deutsch

“identity” NOT 2nd bit controlled-NOT controlled-NOT+ NOT 2nd bit

Convert to quantum gates

Deutsch’s (Quantum) Problem:How many times do we have to use these quantum gates to determine whether we are given the first two or the second two?

Page 60: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Quantum DeutschWhat if we perform Hadamards before and after the quantum gate:

Page 61: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

That Last One

Page 62: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Again

Page 63: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Some Inputs

Page 64: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Quantum Deutsch

Page 65: Quantum Computing Dave Bacon Department of Computer Science & Engineering University of Washington Lecture 2: More Quantum Theory Deutschs Algorithm.

Quantum Deutsch

By querying with quantum states we are able to distinguishthe first two (constant) from the second two (balanced) withonly one use of the quantum gate!

Two uses of the classical gatesVersus

One use of the quantum gate

first quantum speedup (Deutsch, 1985)