Top Banner
Quantum Circuits Quantum Circuits and Algorithms and Algorithms Modular Arithmetic, XOR Reversible Computation revisited Quantum Gates revisited A taste of quantum algorithms: Deutsch algorithm Other algorithms, general overviews Measurements revisited Sources: John P. Hayes, Mike Frank Michele Mosca, Artur Ekert, Bulitko, Rezania. Dave Bacon, 156 Jorgensen, [email protected], Stephen Bartlett
86

Sources - Portland State University

Dec 02, 2021

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Sources - Portland State University

Quantum CircuitsQuantum Circuitsand Algorithmsand Algorithms

● Modular Arithmetic, XOR● Reversible Computation revisited● Quantum Gates revisited● A taste of quantum algorithms: Deutsch algorithm● Other algorithms, general overviews● Measurements revisited

Sources:John P. Hayes, Mike Frank Michele Mosca, Artur Ekert, Bulitko, Rezania. DaveBacon, 156 Jorgensen, [email protected], Stephen Bartlett

Page 2: Sources - Portland State University

OutlineOutline• Review and new ideas useful for quantum algorithms• Introduction to quantum algorithms

– Define algorithms and computational complexity– Discuss factorization as an important algorithm for information

security

• Quantum algorithms– What they contribute to computing and cryptography– Deutsch algorithm and Deutsch-Jozsa algorithm– Shor’s quantum algorithm for efficient factorization– Quantum search algorithms– Demonstrations of quantum algorithms– Ongoing quantum algorithms research

Page 3: Sources - Portland State University

Review of quantumReview of quantumformalism, circuitsformalism, circuits

and new ideasand new ideasuseful in quantumuseful in quantum

algorithmsalgorithms

Page 4: Sources - Portland State University

Universal Quantum gatesUniversal Quantum gates

● Ideally, we’d like a set of gates that allows usto generate all unitary operations on n qubits

● The controlled-NOT plus all 1-qubit gates isuniversal in this sense

● However, this set of gates in infinite, andtherefore not “reasonable”

● We are happy with finite sets of gates thatallow us to approximate any unitary operationon n qubits (more in Chapter 4 of Nielsen andChuang)

Page 5: Sources - Portland State University

Universal Q-Gates: HistoryUniversal Q-Gates: History• Deutsch ‘89:

– Universal 3-qubit Toffoli-like gate.

• diVincenzo ‘95:– Adequate set of 2-qubit gates.

• Barenco ‘95:– Universal 2-qubit gate.

• Deutsch et al. ‘95– Almost all 2-qubit gates are universal.

• Barenco et al. ‘95– CNOT + set of 1-qubit gates is adequate.

• Later development of discrete gate sets...

Page 6: Sources - Portland State University

DeutschDeutsch:: Generalized 3-bit Generalized 3-bit Toffoli Toffoli gate:gate:

• The following gate is universal:

abba

11

11

11

2/)1(2/)1(

2/

2/

παπα

παπα

ii

ii

eiebeiea

−=+=

a bb a

(Where α is any irrational number.)

Page 7: Sources - Portland State University

Barenco’s Barenco’s 2-bit generalized CNOT gate2-bit generalized CNOT gate

• where φ,α,θ,π are relatively irrational• Also works, e.g., for φ=π, α=π/2:

−−=

+

θθθθθαφ

αφα

φαα

cossinsincos

11

),,()(

)(

ii

ii

eieieeA

−−=

θθθθθπ π

cossinsincos

11

),,( 2

iiA

U

Page 8: Sources - Portland State University

Barenco Barenco et al.et al. ‘95 results ‘95 results• Universality of CNOT + 1-qubit gates

– 2-qubit Barenco gate already known universal– 4 1-qubit gates + 2 CNOTs suffice to build it

• Construction of generalized Toffoli gates– 3-bit version via five 2-qubit gates– n-qubit version via O(n2) 2-qubit gates– No auxilliary qubits needed for the above

• All operations done “in place” on input qubits.

– n-bit version via O(n) 2-qubit gates, given 1 workqubit

Page 9: Sources - Portland State University

● For any positive integer N, we say a iscongruent to b modulo N (denoted

if and only if N divides a-b

● E.g.5mod0...15,10,5,0,5,10..., ≡−−

Nba mod≡

5mod1...16,11,6,1,4,9,14... ≡−−−5mod2...17,12,7,2,3,8,13... ≡−−−5mod3...18,13,8,3,2,7,12... ≡−−−5mod4...19,14,9,4,1,6,11... ≡−−−

Page 10: Sources - Portland State University

Modular arithmeticModular arithmetic

● For any positive integer N, and for anyinteger a, define to be theunique integer, , between 0 and N-1 suchthat

● For positive integers, a, we can say thatis the remainder when we divide a by N.

● If N=2, then if a is even if a is odd

Na mod

Naa mod≡a

a

02mod =a12mod =a

Page 11: Sources - Portland State University

Modulo versus XORModulo versus XOR

● For }1,0{, ∈ba

● The controlled-NOT also realizes thereversible XOR function

ab

( ) 2modbaba +=⊕

aab ⊕

reminder

Page 12: Sources - Portland State University

Controlled-NOT can be used to copyControlled-NOT can be used to copyclassical informationclassical information

● If we initialize b=0, then the C-NOT canbe used to copy “classical” information

a0

aa

● We can use this operation in the copy partof reversible computation

Page 13: Sources - Portland State University

Reversibly computing f(x)Reversibly computing f(x)

● Suppose we know how to compute

)(xfbxbx ⊕→

● We can realize the following reversibleimplementation of f

mnf }1,0{}1,0{: →

Page 14: Sources - Portland State University

Reversibly computing f(x)=yReversibly computing f(x)=y11yy22Step 1: Compute f(x)Step 1: Compute f(x)

21321 00000 bbxxx

X

2121321321 bbyyjjjxxx

Pauli Xis aninverter

Page 15: Sources - Portland State University

Reversibly computing f(x)=yReversibly computing f(x)=y11yy22Step 2: Add answer to output registerStep 2: Add answer to output register

2121321321 bbyyjjjxxx

221121321321 ybybyyjjjxxx ⊕⊕

Page 16: Sources - Portland State University

Reversibly computing f(x)=yReversibly computing f(x)=y11yy22Step 3: Step 3: UncomputeUncompute f(x) f(x)

X

221121321321 ybybyyjjjxxx ⊕⊕

2211321 00000 ybybxxx ⊕⊕

Page 17: Sources - Portland State University

A quantum gateA quantum gate

1√NOT 0 +

√NOT 0 +12i

2i

21

21 1

0

Page 18: Sources - Portland State University

??????

10 +2i

21

What is supposed to mean?

Page 19: Sources - Portland State University

One thing we know about itOne thing we know about it

10 +0α 1αIf we measure

we get with probability

and with probability

0

1

20α

21α

Page 20: Sources - Portland State University

Please recall the notation!Please recall the notation!

10 10 α+α

0

01

1

10

αα

=

α+

α

1

010 1

001

corresponds to

corresponds to

corresponds to

Page 21: Sources - Portland State University

Two very important 1-Two very important 1-qubitqubit gates gates

2i

21

21

2i

corresponds to

−=

21

21

21

21

HAnother useful gate:(Hadamard gate)

Page 22: Sources - Portland State University

Unexpected result again!Unexpected result again!

01

√NOT0 √NOT 1i

221

21

2i

i

221

21

2i

i

i0 =

Page 23: Sources - Portland State University

Tensor Product again!Tensor Product again!

0000= =

00 0 0⊗=

01

01 =

=

0001

= 00

0001 =

Page 24: Sources - Portland State University

Local Local versus versus GlobalGlobal description of a description of a2-2-qubit qubit statestate

+ 1210

2i 0⊗

=

⊗+⊗ 012100

2i

+ 102100

2i=

Page 25: Sources - Portland State University

A quantum computation: A quantum computation: EntanglementEntanglement

0

00

0√NOT 0

0112

i +21

INOT ⊗10

2100

2+i 11

2100

2+iNOTc −

Page 26: Sources - Portland State University

00INOT ⊗

102100

2+i 11

2100

2+iNOTc −

0001

Iii

11

21

010

21

i

0100100000100001

100

21

i

ii

ii

010001100010

21

=⊗

Iii1

121

A quantum computation: A quantum computation: EntanglementEntanglement

Page 27: Sources - Portland State University

Quantum Circuit ModelQuantum Circuit Model

000

0

HX

o o o

Xl

l

∑∈ nx

x x}1,0{α

1}1,0{

2 =∑∈ nx

Page 28: Sources - Portland State University

000

0

HX

o o o

Xl

l

nxxxx m21=Measuring all n qubits yields the result

with probability 2

Page 29: Sources - Portland State University

Partial MeasurementPartial Measurement

000

0

HX

o o o

Xl

l

Page 30: Sources - Portland State University

Partial MeasurementPartial Measurement

∑∈ nx

x x}1,0{α

+

=

+

=

+

∑∑

∑∑

∑∑

−−

−−

−−

∈∈

∈∈

∈∈

11

11

11

}1,0{ 1

11

}1,0{ 0

00

}1,0{1

}1,0{0

}1,0{1

}1,0{0

10

10

10

nn

nn

nn

y

y

y

y

yy

yy

yy

yy

ya

aya

a

yy

yy

αα

αα

αα

∑−∈

=1}1,0{

2

00ny

ya α ∑−∈

=1}1,0{

2

11ny

ya α

Suppose we measure the first bit ofwhich can be rewritten as

qubit 0

remainingqubits

Page 31: Sources - Portland State University

Partial MeasurementPartial Measurement

0

∑−∈ 1}1,0{ 0

0

ny

y yaα

The probability of obtaining is

and in this case the remaining qubits will beleft in the state

∑−∈

=1}1,0{

2

02

0ny

ya α

(reminiscent of Bayes’ theorem)

Page 32: Sources - Portland State University

Measurement: observerMeasurement: observerbreaks a closed systembreaks a closed system

• Note that the act of measurementinvolves interacting the formerly closedsystem with an external system (the“observer” or “measuring apparatus”).

• So the evolution of the system is nolonger necessarily unitary.

Page 33: Sources - Portland State University

Note that “global” phaseNote that “global” phasedoesn’t matterdoesn’t matter

Measuring gives with probability∑∈ nx

x x}1,0{α

2xα

∑∈ nx

xi xe

}1,0{αφ

22xx

ie ααφ =

x

Measuring gives with probabilityx

Page 34: Sources - Portland State University

Note that “global” phaseNote that “global” phasedoesn’t matterdoesn’t matter

Can we apply some unitary operation that willmake the phase measurable? No!

=

∑∑

∈∈ nn xx

i

xx

i xUexeU}1,0{}1,0{ββ φφ

Page 35: Sources - Portland State University

Another tensor product factAnother tensor product fact

=

=

=

dc

ba

dc

ba

bdbcadac

dc

ba

α

α

αααα

α

Page 36: Sources - Portland State University

Another tensor product factAnother tensor product fact

( ) ( ) yxyxyx ααα ==

So

….please remember….

Now we have a base of facts to discuss the most interesting aspectof quantum computing - quantum algorithms that are different thanfor normal (Turing machine-like, circuit-like) computing.

Page 37: Sources - Portland State University
Page 38: Sources - Portland State University

Quantum AlgorithmsQuantum Algorithmsgive interesting speedupsgive interesting speedups•Grover’s quantum database search algorithm findsan item in an unsorted list of n items in O(O(√√√√√√√√ n)n) steps;classical algorithms require O(nO(n).).•Shor’s quantum algorithm finds the prime factors ofan n-digit number in time O(nO(n33);); the best knownclassical factoring algorithms require at least timeO(2n 1/3 log(n)2/3)

Page 39: Sources - Portland State University

Example: discrete Fourier transformExample: discrete Fourier transform• Problem: for a given vector ( x j ), j= 1,..., N, what is the

discrete Fourier transform (DFT) vector

• Algorithm:– a detailed step- by- step method to calculate the DFT (y j ) for any

instance (x j )• With such an algorithm, one could:

– write a DFT program to run on a computer– build a custom chip that calculates the DFT– train a team of children to execute the algorithm (remember the

Andleman DNA algorithm and children with Lego?)

Page 40: Sources - Portland State University

Computational complexity of DFTComputational complexity of DFT• For the DFT, N could be the dimension of the vector

• To calculate each y j , must sum N terms• This sum must be performed for N different y j• Computational complexity of DFT: requires N 2 steps• DFTs are important --> a lot of work in optical computing (1950s,

1960s) to do fast DFTs• 1965: Tukey and Cooley invent the Fast Fourier Transform (FFT),

requires N logN steps• FFT much faster --> optical computing almost dies overnight

Page 41: Sources - Portland State University

Example: FactoringExample: Factoring• Factoring: given a number, what are its prime factors?• Considered a “hard” problem in general, especially for

numbers that are products of 2 large primes

Page 42: Sources - Portland State University

Quantum algorithmsQuantum algorithms• Feynman (1982): there may be quantum systems that

cannot be simulated efficiently on a “classical” computer• Deutsch (1985): proposed that machines using quantum

processes might be able to perform computations that“classical” computers can only perform very poorly

Concept of quantum computer emerged as a universaldevice to execute such quantum algorithms

Page 43: Sources - Portland State University

Factoring with quantum systemsFactoring with quantum systems• Shor (1995): quantum factoring algorithm• Example: factor a 300- digit number

• To implement Shor’s algorithm, one could:• run it as a program on a “universal quantum computer”• design a custom quantum chip with hard- wired algorithm• find a quantum system that does it naturally! (?)

Page 44: Sources - Portland State University

Reminder to appreciateReminder to appreciate : exponential : exponentialsavings is very good!savings is very good!

Factor a 5,000 digit number:Factor a 5,000 digit number:

–Classical computer (1ns/instruction,~today’s best algorithm)

•over 5 trillion years (the universe is ~10–16 billion years old).

–Quantum computer (1ns/instruction,~Shor’s algorithm)

•just over 2 minutes

….the power of quantum computing…...

Page 45: Sources - Portland State University

Implications of Factoring andImplications of Factoring andothers quantum algorithmsothers quantum algorithms

• Information security and e- commerce are based on theuse of NP problems that are not in P– must be “hard” (not in P ) so that security is unbreakable– requires knowledge/ assumptions about the algorithmic and

computational power of your adversaries

• Quantum algorithms (e. g., Shor’s factoring algorithm)require us to reassess the security of such systems

• Lessons to be learned:– algorithms and complexity classes can change!– information security is based on assumptions of what is hard

and what is possible --> better be convinced of their validity

Page 46: Sources - Portland State University

• Hybrid algorithm to factor numbers• Quantum component finds period r of sequence a1, a2, .. . ai, . . . , given an oracle function that maps i to ai

• Skeleton of the algorithm:– create a superposition of all oracle inputs and call the oracle– apply a quantum Fourier transform to the input qubits– read the input qubits to obtain a random multiple of 1/r– repeat a small number of times to infer r

Page 47: Sources - Portland State University

Shor Shor Type AlgorithmsType Algorithms1985 Deutsch’s algorithm demonstrates task quantum computer can

perform in one shot that classically takestwo shots.

1992 Deutsch-Jozsa algorithm demonstrates an exponential separation between classical deterministic and quantum algorithms.

1993 Bernstein-Vazirani demonstrates a superpolynomialalgorithm separation between probabilistic and

quantum algorithms.

1994 Simon’s algorithm demonstrates an exponential separation between probabilistic and quantum algorithms.

1994 Shor’s algorithm demonstrates that quantum computers canefficiently factor numbers.

Page 48: Sources - Portland State University

Search problemsSearch problems• Problem 1 : Given an unsorted database of N items, how long will

it take to find a particular item x?– Check items one at a time. Is it x?– Average number of checks: N/ 2N/ 2

• Problem 2 : Given an unsorted database of N items, each eitherred or black, how many are red?– Start a tally– Check items one at a time. Is it red?

• If it is red, add one to the tally• If it is black, don't change the tally

– Must check all items: requires N checks

• Not surprisingly, these are the best (classical) algorithms• We can define quantum search algorithms that do better

Page 49: Sources - Portland State University

OraclesOracles• We need a "quantum way" to recognize a solution• Define an oracle to be the unitary operator• O : |x> |q> --> |x> |q

⊕⊕⊕⊕ f( x) > where |q> is an ancilla qubit• Could measure the ancilla qubit to determine if x is a

solution• Doesn't this "oracle" need to know the solution?

– It just needs to recognize a solution when given one– Similar to NP problems

• One oracle call represents a fixed number ofoperations

• Address the complexity of a search algorithm in termsof the number of oracle calls --> separates scalingfrom fixed costs

Page 50: Sources - Portland State University

Quantum searchingQuantum searching• Grover (1996): quantum search algorithm• For M solutions in a database containing N elements:

• Quantum search algorithm works by applying the oracle tosuperpositions of all elements, and increases the amplitude ofsolutions (viewed as states)

• Quantum search requires that we know M/ N (at leastapproximately) prior to the algorithm, in order to perform thecorrect number of steps

• Failure to measure a solution --> run the algorithm again .

Page 51: Sources - Portland State University

Quantum countingQuantum counting• What if the number of solutions M is not known?• Need M in order to determine the number of

iterations of the Grover operator• Classical algorithm requires N steps• Quantum algorithm: Use phase estimation

techniques– based on quantum Fourier transform (Shor)– requires N 1/ 2 oracle calls

• For a search with unknown number of solutions:– First perform quantum counting: N 1/ 2

– With M, perform quantum search: N 1/ 2

– Total search algorithm: still only N 1/ 2

Page 52: Sources - Portland State University

Can we do better?Can we do better?• Quantum search algorithm provides a quadratic speedup

over best classical algorithm Classical: N steps Quantum: N 1/ 2 steps• Maybe there is a better quantum search algorithm• Imagine one that requires log N steps:

– Quantum search would be exponentially faster than anyclassical algorithm

– Used for NP problems: could reduce them to P by searchingall possible solutions

• Unfortunately, NO: Quantum search algorithm is"optimal"

• Any search- based method for NP problems is slow

Page 53: Sources - Portland State University

How do quantum algorithmsHow do quantum algorithmswork?work?

• What makes a quantum algorithm potentially faster than anyclassical one?– Quantum parallelism: by using superpositions of quantum states, the

computer is executing the algorithm on all possible inputs at once– Dimension of quantum Hilbert space: the “size” of the state space for the

quantum system is exponentially larger than the corresponding classicalsystem

– Entanglement capability: different subsystems (qubits) in a quantumcomputer become entangled, exhibiting nonclassical correlations

• We don’t really know what makes quantum systems morepowerful than a classical computer

• Quantum algorithms are helping us understand the computationalpower of quantum versus classical systems

Page 54: Sources - Portland State University

Quantum algorithmsQuantum algorithmsresearchresearch

• Require more quantum algorithms in order to:– solve problems more efficiently– understand the power of quantum computation– make valid/ realistic assumptions for information

security• Problems for quantum algorithms research:

– requires close collaboration between physicists andcomputer scientists

– highly non- intuitive nature of quantum physics– even classical algorithms research is difficult

Page 55: Sources - Portland State University

Summary of quantumSummary of quantumalgorithmsalgorithms

• It may be possible to solve a problem on a quantum system muchfaster (i. e., using fewer steps) than on a classical computer

• Factorization and searching are examples of problems wherequantum algorithms are known and are faster than any classicalones

• Implications for cryptography, information security• Study of quantum algorithms and quantum computation is

important in order to make assumptions about adversary’salgorithmic and computational capabilities

• Leading to an understanding of the computational power ofquantum versus classical systems

Page 56: Sources - Portland State University

… everything started with small circuit of Deutsch…...

Page 57: Sources - Portland State University

Deutsch’s ProblemDavid Deutsch

Delphi

Deutsch’s ProblemDeutsch’s ProblemDetermine whether f(x) is constant or balanced using as fewqueries to the oracle as possible.

(1985)(Deutsch ’85)

Page 58: Sources - Portland State University

Classical DeutschClassical Deutsch

Classically we need to query the oracle two times to solve Deutsch’s Problem

⊕f

ff(0) ⊕ f(1)

1 for balanced, 0 for constants

0

1

Page 59: Sources - Portland State University

Quantum Quantum DeutschDeutsch:first explanation:first explanation1.2.

3.

100 % |01� 100 % |01� 100 % |11� 100 % |11�

Page 60: Sources - Portland State University

Deutsch Circuitmeasure

Page 61: Sources - Portland State University

Quantum Quantum DeutschDeutsch: second explanation: second explanation

This kind of proofis often faster andmore intuitive but itis better to checkusing matricesbecause you likelycan make errors

Page 62: Sources - Portland State University

Quantum Quantum DeutschDeutsch: second explanation: second explanation

This isobtained afterconnectingHadamardsandsimplifying

Page 63: Sources - Portland State University

Find using only 1 evaluation ofa reversible “black-box” circuit for

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

f)1()0( ⊕ ff

)x(f+

x x

b )x(fb⊕

Quantum Quantum DeutschDeutsch: third: thirdexplanationexplanation

Page 64: Sources - Portland State University

Phase “kick-back” trickPhase “kick-back” trick

x

)x(f+10 −

x)1( )x(f−

)10(x)1()10()1(x

)x(f

)x(f

−−=

−−=

10 −

)1)x(f)x(f(x)10(x ⊕−→−

Page 65: Sources - Portland State University

A A DeutschDeutsch quantum algorithm: third quantum algorithm: thirdexplanationexplanation

0 H

)x(f+

H

10 −10 −

)1(f)0(f ⊕

10 +)1)1(0()1(

1)1(0)1()1(f)0(f)0(f

)1(f)0(f

⊕−+−=

−+− )1(f)0(f)1( )0(f ⊕−

…here we reduce the number of H gates...

Page 66: Sources - Portland State University

Deutsch Algorithm PhilosophyDeutsch Algorithm Philosophy● Since we can prepare a superposition of all the inputs, we can

learn a global property of f (i.e. a property that depends onall the values of f(x)) by only applying f once

● The global property is encoded in the phase informationencoded in the phase informationencoded in the phase informationencoded in the phase information,which we learn via interferometryinterferometryinterferometryinterferometryinterferometryinterferometryinterferometryinterferometry

● Classically, one application of f will only allow us to probe itsvalue on one input

We use just one quantum evaluation by, in effect, computing f(0) and f(1) simultaneously• The Circuit:

MH

H

H

y ⊕ f(x)y

x xUf

Page 67: Sources - Portland State University

Deutsch’s AlgorithmDeutsch’s AlgorithmMH

H

H

y ⊕ f(x)y

x xUf

• Initialize with |Ψ0⟩ = |01⟩

|0⟩

|1⟩

|Ψ0⟩

• Create superposition of x states using the firstHadamard (H) gate. Set y control input using thesecond H gate

|Ψ1⟩

• Compute f(x) using the special unitary circuit Uf

|Ψ2⟩

• Interfere the |Ψ2⟩ states using the third H gate

|Ψ3⟩

• Measure the x qubit

|0⟩⟩⟩⟩ = constant; |1⟩⟩⟩⟩ = balanced

Page 68: Sources - Portland State University

M

y ⊕ f(x)y

x x

Uf

|0⟩

|1⟩|Ψ0⟩ |Ψ1⟩ |Ψ2⟩ |Ψ3⟩

Ψ1 =0 + 1

2

0 − 1

2

Ψ2 =−1( )f (0) 0 + −1( ) f (1) 1

2

0 − 1

2

0 + 12

0 − 1

2

± 0 − 12

0 − 1

2

H

H

H

Ψ3 =± 0[ ] 0 − 1

2

± 1[ ] 0 − 12

if f(0) = f(1)

if f(0) ≠ f(1)

if f(0) = f(1)

if f(0) ≠ f(1)

Ψ0 = 0[ ] 1[ ]

Deutsch’s Algorithm with singleDeutsch’s Algorithm with singlequbit qubit measurementmeasurement

Page 69: Sources - Portland State University

Deutsch In Perspective

Quantum theory allows us to do in asingle query what classically requires twoqueries.

What about problems where theWhat about problems where thecomputational complexity iscomputational complexity isexponentially more efficient?exponentially more efficient?

Page 70: Sources - Portland State University

Extended Extended Deutsch’s Deutsch’s ProblemProblem• Given black-box f:{0,1}n→{0,1},

– and a guarantee that f is either constant or balanced (1 onexactly ½ of inputs)

– Which is it?– Minimize number of calls to f.

• Classical algorithm, worst-case:– Order 2n time!

• What if the first 2n-1 cases examined are all 0?– Function could be either constant or balanced.

• Case number 2n-1+1: if 0, constant; if 1, balanced.

• Quantum algorithm is exponentially faster!– (Deutsch & Jozsa, 1992.)

Page 71: Sources - Portland State University

Deutsch-Deutsch-Jozsa Jozsa ProblemProblem

Deutsch-Jozsa Problem

Determine whether f(x) is constant or balanced using as few queriesto the oracle as possible.

(1992)

Page 72: Sources - Portland State University

Classical DJx

10

10 x

Page 73: Sources - Portland State University

Quantum DJ

Page 74: Sources - Portland State University

Quantum DJ

Page 75: Sources - Portland State University

Full Quantum DJ

Solves DJ with a SINGLEquery vs 2n-1+1 classicaldeterministic!!!!!!!!!

Page 76: Sources - Portland State University

Deutsch-Josza AlgorithmDeutsch-Josza Algorithmanother variantanother variant

• Generalization of Deutsch’s algorithm

H⊗ n = H ⊗ H ⊗ … ⊗ H H⊗ n x =−1( )

z∑x ⋅z

z

2n

Ψ3 =−1( )x ⋅z + f (x ) z

2nx∑

z∑

0 − 1

2

H

H⊗ n

y ⊕ f(x)y

x xUf

H⊗ nn|0⟩

|1⟩|Ψ0⟩ |Ψ3⟩

…here there are two H gates less….

Page 77: Sources - Portland State University

Deutsch-Josza Algorithm (contd)Deutsch-Josza Algorithm (contd)

• This algorithm distinguishes constant frombalanced functions in one evaluationin one evaluation of f, versus2n–1 + 1 evaluations for classical deterministicalgorithms

• Balanced functions have many interesting andsome useful properties– K. Chakrabarty and J.P. Hayes, “Balanced Boolean

functions,” IEE Proc: Digital Techniques, vol. 145, pp52 - 62, Jan. 1998.

Page 78: Sources - Portland State University
Page 79: Sources - Portland State University

(1994)

Simon’s ProblemDetermine whether f(x) has is distinct on an XOR mask or distincton all inputs using the fewest queries of the oracle. (Find s)

Page 80: Sources - Portland State University

Classical Simon

Page 81: Sources - Portland State University

Quantum Simon

Page 82: Sources - Portland State University

Quantum Simon

We add Hadamards at theoutputs and observe

Page 83: Sources - Portland State University

Quantum Simon

Page 84: Sources - Portland State University

An Open Question(you could be famous!)

Page 85: Sources - Portland State University

Quantum Complexity TheoryQuantum Complexity Theory• Early developments:

– Deutch’s problem (from earlier): Slight speedup– Deutsch & Jozsa: Exponential speed-up

• Important quantum complexity classes:– EQP: Exact Quantum Polynomial - like P.

• Polynomial time, deterministic.

– ZQP: Zero-error Quantum Polynomial - like ZPP.• Probabilistic, expected polynomial-time, zero errors.

– BQP: Bounded-error Quantum Poly. - like BPP.• Probabilistic, bounded probability of errors.

Page 86: Sources - Portland State University

Quantum CommunicationQuantum CommunicationComplexityComplexity

Less communication needed to compute certain functions

if either

(a) qubit used to communicate

or

(b) shared entangled quantum states are available.How much less communciation?

Exponentially less: Ran Raz “Exponential Separation of Quantum and Classical Communication Complexity”, 1998