C/CS/Phys C191 Shor s order (period) finding algorithm and factoring 11/12/14 Fall 2014 Lecture 22

Similar documents
C/CS/Phys 191 Shor s order (period) finding algorithm and factoring 11/01/05 Fall 2005 Lecture 19

Stanford University CS259Q: Quantum Computing Handout 8 Luca Trevisan October 18, 2012

AQI: Advanced Quantum Information Lecture 2 (Module 4): Order finding and factoring algorithms February 20, 2013

Quantum Fourier Transform

QIP Course 10: Quantum Factorization Algorithm (Part 3)

Divisibility. c = bf = (ae)f = a(ef) EXAMPLE: Since 7 56 and , the Theorem above tells us that

Chapter 3: Theory of Modular Arithmetic 38

Classical Worm algorithms (WA)

When two numbers are written as the product of their prime factors, they are in factored form.

Quantum Information & Quantum Computation

The Substring Search Problem

Secret Exponent Attacks on RSA-type Schemes with Moduli N = p r q

Berkeley Math Circle AIME Preparation March 5, 2013

Introduction Common Divisors. Discrete Mathematics Andrei Bulatov

Auchmuty High School Mathematics Department Advanced Higher Notes Teacher Version

Solution to HW 3, Ma 1a Fall 2016

9.1 The multiplicative group of a finite field. Theorem 9.1. The multiplicative group F of a finite field is cyclic.

PHYS 301 HOMEWORK #10 (Optional HW)

Encapsulation theory: the transformation equations of absolute information hiding.

3.1 Random variables

7.2. Coulomb s Law. The Electric Force

Pearson s Chi-Square Test Modifications for Comparison of Unweighted and Weighted Histograms and Two Weighted Histograms

10/04/18. P [P(x)] 1 negl(n).

An Exact Solution of Navier Stokes Equation

Psychometric Methods: Theory into Practice Larry R. Price

New problems in universal algebraic geometry illustrated by boolean equations

3.6 Applied Optimization

Magnetic Field. Conference 6. Physics 102 General Physics II

(n 1)n(n + 1)(n + 2) + 1 = (n 1)(n + 2)n(n + 1) + 1 = ( (n 2 + n 1) 1 )( (n 2 + n 1) + 1 ) + 1 = (n 2 + n 1) 2.

On a quantity that is analogous to potential and a theorem that relates to it

Graphs of Sine and Cosine Functions

15 Solving the Laplace equation by Fourier method

of the contestants play as Falco, and 1 6

Lecture 8 - Gauss s Law

Motithang Higher Secondary School Thimphu Thromde Mid Term Examination 2016 Subject: Mathematics Full Marks: 100

Section 8.2 Polar Coordinates

Solutions to Problems : Chapter 19 Problems appeared on the end of chapter 19 of the Textbook

APPLICATION OF MAC IN THE FREQUENCY DOMAIN

1 Similarity Analysis

Physics 161 Fall 2011 Extra Credit 2 Investigating Black Holes - Solutions The Following is Worth 50 Points!!!

6 PROBABILITY GENERATING FUNCTIONS

Fall 2014 Randomized Algorithms Oct 8, Lecture 3

working pages for Paul Richards class notes; do not copy or circulate without permission from PGR 2004/11/3 10:50

Centripetal Force OBJECTIVE INTRODUCTION APPARATUS THEORY

Math 301: The Erdős-Stone-Simonovitz Theorem and Extremal Numbers for Bipartite Graphs

QUALITATIVE AND QUANTITATIVE ANALYSIS OF MUSCLE POWER

7.2.1 Basic relations for Torsion of Circular Members

OLYMON. Produced by the Canadian Mathematical Society and the Department of Mathematics of the University of Toronto. Issue 9:2.

Markscheme May 2017 Calculus Higher level Paper 3

APPENDIX. For the 2 lectures of Claude Cohen-Tannoudji on Atom-Atom Interactions in Ultracold Quantum Gases

ASTR415: Problem Set #6

Lab 10: Newton s Second Law in Rotation

Chapter 13 Gravitation

SMT 2013 Team Test Solutions February 2, 2013

EM Boundary Value Problems

Diffusion and Transport. 10. Friction and the Langevin Equation. Langevin Equation. f d. f ext. f () t f () t. Then Newton s second law is ma f f f t.

Do Managers Do Good With Other People s Money? Online Appendix

radians). Figure 2.1 Figure 2.2 (a) quadrant I angle (b) quadrant II angle is in standard position Terminal side Terminal side Terminal side

13. Adiabatic Invariants and Action-Angle Variables Michael Fowler

Goodness-of-fit for composite hypotheses.

Exploration of the three-person duel

Introduction to Mathematical Statistics Robert V. Hogg Joeseph McKean Allen T. Craig Seventh Edition

Physics 121 Hour Exam #5 Solution

2 x 8 2 x 2 SKILLS Determine whether the given value is a solution of the. equation. (a) x 2 (b) x 4. (a) x 2 (b) x 4 (a) x 4 (b) x 8

QUANTUM ALGORITHMS IN ALGEBRAIC NUMBER THEORY

Module 9: Electromagnetic Waves-I Lecture 9: Electromagnetic Waves-I

Method for Approximating Irrational Numbers

2 Governing Equations

Appendix B The Relativistic Transformation of Forces

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Physics Department. Problem Set 10 Solutions. r s

Chapter Eight Notes N P U1C8S4-6

2 S. Gao and M. A. Shokollahi opeations in Fq, and usually we will use the \Soft O" notation to ignoe logaithmic factos: g = O(n) ~ means that g = O(n

Chem 453/544 Fall /08/03. Exam #1 Solutions

A Converse to Low-Rank Matrix Completion

1 Spherical multipole moments

Let us next consider how one can calculate one- electron elements of the long- range nuclear- electron potential:

A Bijective Approach to the Permutational Power of a Priority Queue

c n ψ n (r)e ient/ h (2) where E n = 1 mc 2 α 2 Z 2 ψ(r) = c n ψ n (r) = c n = ψn(r)ψ(r)d 3 x e 2r/a0 1 πa e 3r/a0 r 2 dr c 1 2 = 2 9 /3 6 = 0.

Introduction to Arrays

Probablistically Checkable Proofs

ON INDEPENDENT SETS IN PURELY ATOMIC PROBABILITY SPACES WITH GEOMETRIC DISTRIBUTION. 1. Introduction. 1 r r. r k for every set E A, E \ {0},

The condition for maximum intensity by the transmitted light in a plane parallel air film is. For an air film, μ = 1. (2-1)

ac p Answers to questions for The New Introduction to Geographical Economics, 2 nd edition Chapter 3 The core model of geographical economics

PROBLEM SET #1 SOLUTIONS by Robert A. DiStasio Jr.

Determining solar characteristics using planetary data

Galilean Transformation vs E&M y. Historical Perspective. Chapter 2 Lecture 2 PHYS Special Relativity. Sep. 1, y K K O.

Pulse Neutron Neutron (PNN) tool logging for porosity Some theoretical aspects

Phys101 Lectures 30, 31. Wave Motion

Information Retrieval Advanced IR models. Luca Bondi

16 Modeling a Language by a Markov Process

Related Rates - the Basics

AST 121S: The origin and evolution of the Universe. Introduction to Mathematical Handout 1

arxiv: v2 [quant-ph] 30 May 2013

Single Particle State AB AB

PHYS 1444 Lecture #5

Probabilistic number theory : A report on work done. What is the probability that a randomly chosen integer has no square factors?

Qualifying Examination Electricity and Magnetism Solutions January 12, 2006

I. CONSTRUCTION OF THE GREEN S FUNCTION

DOING PHYSICS WITH MATLAB COMPUTATIONAL OPTICS

Light Time Delay and Apparent Position

Transcription:

C/CS/Phys C9 Sho s ode (peiod) finding algoithm and factoing /2/4 Fall 204 Lectue 22 With a fast algoithm fo the uantum Fouie Tansfom in hand, it is clea that many useful applications should be possible. Fouie tansfoms ae typically used to extact the peiodic components in functions, so this is an immediate one. One vey impotant example is finding the peiod of a modula exponential function, which is also known as ode-finding. This is a key element of Sho s algoithm to facto lage integes N. In Sho s algoithm, the quantum algoithm fo ode-finding is combined with a seies of efficient classical computational steps to make an algoithm that is oveall polynomial in the input size n = log 2 N, scaling as O(n 2 lognloglogn). This is bette than the best known classical algoithm, the numbe field sieve, which scales supepolynomially in n, i.e., as exp(o(n /3 (logn) 2/3 )). In this lectue we shall fist pesent the quantum algoithm fo ode-finding and then summaize how this is used togethe with tools fom numbe theoy to efficiently facto lage numbes. Modula exponentiation Recall the exponential function y(x) = a x. The modula exponential function is obtained by taking this function and calculating the emainde on division by N, i.e., f (x) = a x mod N. The ode of the modula exponential, efeed to as the ode of a mod N o od(a), is the smallest positive intege such that a mod N = Equivalently, we can say that is the peiod of this function, since fom the above equation we have a = k N + a + = k N a + a a + mod N = a mod N a +x mod N = a x mod N whee k is some intege. So f (x + ) = f (x), i.e., is the peiod of f (x). Note that N. Thee cases aise:. is odd 2. is even and a /2 mod N = 3. is even and a /2 mod N. Cases ) and 2) ae not elevant to factoization of N, but in case 3) at least one of the two numbes gcd(n,a /2 ± ) is a non-tivial facto of N whee gcd(x,y) is the geatest common denominato of x and y (see below). How do we find od(a) =? The stategy is to calculate the modula exponential function f (x) fo many values of x in paallel and to use Fouie techniques to detect the peiod in the sequence of function values. In the next section we show that Sho s quantum algoithm does this efficiently using the quantum fouie tansfom. C/CS/Phys C9, Fall 204, Lectue 22

Peiod finding The algoithm uses two egistes: egiste (souce) has K qubits and stoes a numbe = 2 K, with N 2 2N 2, o equivalently a numbe mod egiste 2 (taget) has at least n = log 2 N qubits, so can stoe N o moe basis states, o equivalently, a numbe mod N. The algoithm can be decomposed into 6 steps.. Both egistes ae initialized in the state 0 0. 2. The souce egiste is tansfomed to an equal supeposition ove all basis states. This can be done eithe by applying the K qubit Hadamad tansfom H K x = H K 0 = 2 K ( ) xy y y 2 K y y o by applying the Fouie Tansfom q q =0 exp 0 q. q =0 ) (2πi qq q In both cases (what does this tell you about the elation of Hadamad to Fouie tansfom?) we get the full quantum state (of souce and egiste) q 0 q=0 3. Now we apply a quantum gate U a that implements the modula exponentiation q f (q) = a q mod N, whee a is chosen andomly. This is a function that is easy to compute classically (see Nielsen and Chuang, p. 228 fo a detailed analysis). As descibed above, f (q) has as its smallest peiod. Note that f is distinct on [0, ] (i.e., all values ae diffeent) since othewise it would have a smalle peiod. Applying the function f to the contents of souce egiste and stoing the esult in taget egiste 2 gives q a q mod N. q=0 Hee > N 2 values of the function f (q) ae computed in paallel. Since < N, the peiod must manifest itself in the esulting sequence of function values now stoed in the second egiste. So thee can only be diffeent function values. C/CS/Phys C9, Fall 204, Lectue 22 2

4. Now we measue the second egiste. When we measue, we must get some value which has to be one of the distinct values of f (q). Suppose it is f (q 0 ). Then all supeposed states of the fist egiste inconsistent with this measued value must disappea. Fo simplicity, we shall estict ou detailed exposition to the case whee = m, i.e., thee ae m diffeent values of q which have the same value of f (q). Then exactly m = / states of egiste will contibute to the measued state of egiste 2, and afte this measuement the combined state of the two egistes must be given by / j + q 0 f (q 0 ) / 5. We now have a peiodic supeposition of states in egiste, with peiod. Fom now on the second egiste is ielevant and we can dop it fom discussion. The fist egiste has a peiodic supeposition whose peiod is the value that we wanted to compute in the fist place. How do we get that peiod? Can we get anything simply by measuing the fist egiste? No, since all we will get is a andom point, with no coelation acoss independent tials (because q 0 is andom). Instead, we fist make a quantum Fouie tansfom on egiste. To apply the Fouie tansfom modulo to state φq0 = j + q 0 we fist ewite φq0 as a sum ove all states: φ q0 = g(a) a a=0 by defining g(a) = / if a q 0 is a multiple of and g(a) = 0 othewise. Then Fouie tansfoming this modulo (this just means the Fouie tansfom base K o with = 2 K basis states), gives c = c ( ) 2πi( j + q0 )c g( j + q 0 )exp c [ ( ) ] ( ) 2πi( j)c 2πiq0 c g( j + q 0 )exp exp c. Now looking at the ight hand side, you can see that when c/ is an intege, i.e., c is a multiple of /, the phase facto of each tem in the sum inside the squae backets will be equal to +. Now this sum only contains / non-zeo tems, because of the way in which g(a) was defined. So the squae backet tem is then equal to (/) / = /. Taking the oveall nomalization facto into account, this yields the value exp(2πiq 0 c/)/ fo the coefficient of basis state c in the sum ove c. On the othe hand, when c/ is not an intege, the sum in the squae backets cancels to zeo (see Benenti p. 63 fo an example). So the only states in the sum ove c that suvive ae those fo which c is a multiple of /. Thus the Fouie tansfomed state has peiod /, and futhemoe C/CS/Phys C9, Fall 204, Lectue 22 3

it has non-zeo values only at values of c that ae multiples of this peiod. Witing c = k/, we get then the FT state FT φ q0 = exp k=0 ( 2πiq0 k ) k which is what was given above. Note that the Fouie tansfom has moved the shift value q 0 in the index of the oiginal state to a phase facto in the fouie tansfomed state. 6. Now we measue egiste. The measuement gives us a value C = k, whee k is a andom numbe between 0 and -. Now we have, C, and hence also the atio C/ = k/. Now if gcd(k,) =, i.e., if k and have no common divisos, we have the atio C/ as an ieducible faction and can ead off the values k and fom numeato and denominato, espectively. See Benenti p. 63 fo an example. Now k is chosen at andom by the measuement: fo lage, the pobability that gcd(k,) = is geate than /log (see Appendix A.3 in Eket and Jozsa, RMP 68, 733 (996)). So we assume that this is the case and extact. Then by epeating the calculation O(log) < O(logN) times, one can amplify the success pobability (of finding ) to get as close to one as desied. So we have an efficient detemination of the ode. In the geneal case, when m, one has a slightly modified analysis that esults in the ode being detemined to a high pobability. Using ode-finding to facto lage numbes N efficiently Once we have the ode of a x mod N, we fist check if is even and a /2 mod N (case 3) above). If so, then lets poceed with y = a /2. Since y 2 mod N =, then y 2 = (y+)(y ) is divisible by N. So N has a common facto with eithe y + o y. The common facto must be one of geatest common divisos gcd(n,y ± ). These can be efficiently computed with Euclid s algoithm (classical). Euclid s algoithm fo gcd(x,y) Let x,y be 2 integes, x > y and z = gcd(x,y). Then both x and y and the numbes x y, x 2y,... ae multiples of z. Theefoe the emainde = x ky < y in the division of x by y is also a multiple of z. Now if = 0, then z = y and the poblem is solved. So we only have to figue out how to get to zeo emainde fom the stating integes x and y. This is easy. We simply epeatedly take the emainde: z = gcd(x,y) = gcd(y, ) = gcd(, 2 ) = gcd( 2, 3 ) =... = gcd( n, n ), whee, 2,... ae the successive emaindes, i = i k i y. The last non-zeo emainde n is z. Sho s factoing algoithm The oveall quantum factoing algoithm is as follows:. If N even, etun the facto 2 (you could extend this to check fo othe small pime factos, e.g., 5) 2. Detemine whethe N = a b fo integes a and b 2: if yes, etun the facto a 3. Randomly choose y between and N. If z = gcd(y,n) >, etun the facto z. 4. Use the ode-finding algoithm to find the ode of a mod N, i.e., such that a mod N =. 5. If is even and a /2 mod N, then evaluate gcd(a /2 ±,N). If one of these is a non-tivial facto (i.e., othe than ), etun that value as a facto. If not, go back to step 3 and epeat. C/CS/Phys C9, Fall 204, Lectue 22 4

The success ate of the last thee steps must be easonably high since this is a pobabilistic algoithm. See discussions in the texts and in the pape of Eket and Jozsa. Readings Benenti et al., Ch. 3.4 Kaye et al., Ch. 7.3 Nielsen and Chuang, uantum Computation and uantum Infomation, Ch. 5.3 liteatue: Sho, quant-ph/9508027, Eket and Jozsa, Rev. Mod. Phys. 68, 733 (996) C/CS/Phys C9, Fall 204, Lectue 22 5