Quantum Factoring, Discrete Logarithms, and the Hidden Subgroup Problem
Total Page:16
File Type:pdf, Size:1020Kb
Q UANTUM C OMPUTATION QUANTUM FACTORING, DISCRETE LOGARITHMS, AND THE HIDDEN SUBGROUP PROBLEM Among the most remarkable successes of quantum computation are Shor’s efficient quantum algorithms for the computational tasks of integer factorization and the evaluation of discrete logarithms. This article reviews the essential ingredients of these algorithms and draws out the unifying generalization of the so-called hidden subgroup problem. uantum algorithms exploit quantum- these issues, including further applications such physical effects to provide new modes as the evaluation of discrete logarithms. I will of computation that are not available outline a unifying generalization of these ideas: Qto “conventional” (classical) comput- the so-called hidden subgroup problem, which is ers. In some cases, these modes provide efficient just a natural group-theoretic generalization of algorithms for computational tasks for which no the periodicity determination problem. Finally, efficient classical algorithm is known. The most we’ll examine some interesting open questions celebrated quantum algorithm to date is Shor’s related to the hidden subgroup problem for non- algorithm for integer factorization.1–3 It provides commutative groups, where future quantum al- a method for factoring any integer of n digits in gorithms might have a substantial impact. an amount of time (for example, in a number of computational steps), whose length grows less rapidly than O(n3). Thus, it is a polynomial time Periodicity algorithm in contrast to the best-known classi- Think of periodicity determination as a par- cal algorithm for this fundamental problem, ticular kind of pattern recognition. Quantum which runs in superpolynomial time of order computers can store and process a large volume exp(n1/3(log n)2/3). of information—represented compactly in an At the heart of the quantum-factoring algo- entangled quantum state’s identity—but quan- rithm is the discrete Fourier transform (FT) and tum measurement theory severely restricts our the remarkable ability of a quantum computer to access to that information. We can only read a efficiently determine periodicities. This in turn relatively small “globally available” amount of it, rests on the mathematical formalism of fast such as a few broad features of a large intricate Fourier transforms (FFTs) combined with prin- pattern, which are generally impossible to ex- ciples of quantum physics. In this article, I review tract efficiently by classical means. This intuition is exemplified in the earliest quantum algorithm, known as Deutsch’s algorithm.3 Here, a black 1521-9615/01/$10.00 © 2001 IEEE box computes a Boolean function of n variables (a function of all n-bit strings with one-bit val- RICHARD JOZSA ues). The function is either constant or balanced University of Bristol (in the sense that exactly half of the values are 0 34 COMPUTING IN SCIENCE & ENGINEERING and half are 1). We need to know whether the about r. Generally, we require O(N ) random given function is balanced or constant, using the tries to hit two equal values with high probability. least number of queries. Thus, we are asking for Using quantum effects, we can find r using only one bit of information about the function’s 2n O((log N)2) steps, which represents an exponen- values. Classically, 2n–1 + 1 queries are necessary tial speedup over any known classical algorithm. in the worst case (if the problem is to be solved In the quantum context, we assume the black with certainty), but quantumly we can solve the box is a coherent quantum process that evolves problem in all cases with just one query.3 How- the input state|x〉|0〉 to|x〉|f(x)〉. Here, the val- ever, if we tolerate any arbitrarily small proba- ues of x and f(x) are labels on a suitable set of or- bility of error in the answer, then there is also a thogonal states. We begin by computing all val- classical algorithm using only a constant num- ues of f in equal superposition, using one ber of queries. application of the box. To do this, we set up the Inspired by these results, Daniel Simon4 con- input register in the equal superposition 1 ∑ sidered a more complicated situation of a class of x x , apply the function, and obtain the state functions from n bits to n bits and developed a N computational task displaying an exponential gap between the classical and quantum query com- N−1 = 1 Quantum computers plexities, even if (in contrast to Deutsch’s algo- f ∑ xfx(). (2) N = rithm) the algorithm is required to work only x 0 can store and process with bounded error probability of 1/3—we allow a large volume of probabilistic algorithms, and in any run the an- Although this state’s descrip- swer must be correct with probability at least 2/3. tion embodies all the values of information— In retrospect, Simon’s problem turns out to be f and hence the periodicity, it represented an example of a “generalized periodicity” (or is not immediately clear how hidden subgroup problem) for the group of n bit to extract r’s information. If compactly in an strings under binary bitwise addition. Shor rec- we measure the value in the entangled quantum ognized the connection with periodicity deter- second register, giving, say, a mination and generalized the constructions to value y0, then the first regis- state’s identity— the group of integers modulo N, showing signif- ter’s state will be reduced to an but quantum icantly that the associated discrete Fourier trans- equal superposition of all 〉 form could be efficiently implemented in that those |x ’s such that f(x) = y0. measurement theory context as well. Using known reductions of the If x0 is the least such x and N severely restricts our tasks of integer factorization and evaluation of = Kr, then we obtain in the discrete logarithms to periodicity determina- first register the periodic state access to that tions, he could give polynomial time quantum information. algorithms for these computational tasks as well. K −1 ψ =+1 ∑ xkr0 .(3) K k=0 The quantum Fourier transform and periodicities ≤ ≤ Note here that 0 x0 r – 1 is generated at ran- Suppose that we have a black box that com- dom, corresponding to having seen any value y0 → putes a function f : ZN Z, which is guaranteed of f with equal probability. So, if we now mea- to be periodic with some period r: sure the value in this register, the overall result is merely to produce a number between 0 and N – f(x + r) = f(x) for all x.(1)1 uniformly at random, giving no information at all about r’s value. Here, ZN denotes the additive group of integers The resolution of this difficulty is to use the modulo N. We also assume that f does not take FT, which (even for classical data) can pick out the same value twice within any single period. periodic patterns in a set of data regardless of Note that Equation 1 holds only if r divides N how the whole pattern is shifted. The discrete exactly. FT F for integers modulo N is the N × N uni- Our aim is to determine r. In the absence of tary matrix with entries any further information about f, we could merely FX==1 π ab 1 try different values of x in the black box, hoping abexp2 i a (b ) two equal results could then give information N N N (4) MARCH/APRIL 2001 35 where we have introduced the functions mial in log N rather than N itself—to achieve an exponential speedup over any known classical al- X = π lm gorithm for determining periodicity. We showed l(mi ) exp2 .(5) N earlier that merely O(log log N) repetitions suffice If we apply this unitary transform to the state to determine r, but a significant gap exists in our |ψ〉 in Equation 3, we obtain2 argument. The FT F that we used is a large non- trivial unitary operation of size N × N, and we can- − 1 r 1 Xj N not just assume ab initio that we can implement it F ψπ= ∑exp2 i o j .(6) r N r using only poly(log N) basic computational oper- j=0 ations. We could implement any d × d unitary op- A direct calculation shows that the labels ap- eration on a quantum computer (equipped with pearing with nonzero amplitude are those val- any universal set of operations) in O(d2) steps.2 ues of l that satisfy This is also the number of steps needed for the classical computation of multiplying a d × d ma- X ==π lr trix into a d-dimensional column vector. For our l(ri ) exp21 (7) N use of F, this bound of O(N2) does not suffice. Fortunately, the FT has extra properties that let and they appear with equal squared amplitudes. us implement it in O((log N)2) steps. These prop- This calculation uses Equation 3’s periodic struc- erties stem from the classical theory of the FFT,7 ture and the elementary identity which shows how to reduce the O(N2) steps of classical matrix multiplication to O(N log N) steps − k K 1 l 0 if lK is not a multiple of when N is a power of 2. If we implement the same ∑ exp2πi = .(8) ideas in a quantum setting, then we can see2,8 that K Klif is a multiple of K k=0 the number of steps reduces to O((log N)2), giving our desired implementation. Note also that ac- The random shift x0 no longer appears in the cording to Equation 4, we have labels.