Efficient Quantum Algorithms and The Hidden Subgroup Problem

Simon's Problem

This problem imagined by Simon [Sim1994] demonstrates a quantum algorithm solving a black-box problem exponentially faster than any probabilistic classical algorithm. Contrary to Deutsch–Jozsa algorithm [DeuJoz1992], it is even exponentially faster than probabilistic classical algorithms.

(Simon's problem)

Let m n be natural numbers and f : 2 n 2 m a function. Assume that there is a string s 2 n such that two distinct x , x ' have the same image iff x ' = x s . Simon's problem is to determine s .

The quantum solution to the problem is to repeat enough time the procedure given by the following circuit:

Circuit for the Simon's problem

After applying U f , we are in the state:

1 N x = 0 N 1 x f ( x )

Measuring the second register gives a value y and makes the first register collapse to the superposition of its two preimages x , x s :

1 2 ( x + x s ) y

After the second Hadamard gate, the state in the first register is

1 2 1 N z = 0 N 1 ( ( 1 ) z . x + ( 1 ) z . ( x s ) ) z

Performing a standard measurement on the first register yields a random n -bits vector z such that z . s = 0 i.e. in the subspace orthogonal to s . Repeating the procedure O ( n ) times gives a set of generators z 1 , z O ( n ) for this subspace with probability exponentially close to 1. Said otherwise, we have a system of equations i = 1 n z i j s i 0  mod  ( 2 ) of rank the dimension of the subspace and n unknowns s 1 , s n . If s = 0 , then the rank of the system is n , so we get the unique solution s = 0 . Otherwise s 0 and the rank of the system is n 1 , so solving the system gives a subspace of dimension n ( n 1 ) = 1 , which is simply { 0 , s } . In either case, we have obtained s as expected. The procedure is repeated O ( n ) times, so a polynomial number of queries to the oracle f are used.

What about (probabilistic) classical algorithm? Consider the special case m = n . Let's choose randomly f to be a permutation ( s = 0 ) or a two-to-one function ( s 0 ). In the former case, we randomly choose a permutation f and in the latter case a nonzero string s . Simon proved that a classical algorithm calling f no more than 2 n 4 times can not determine whether s is zero or not with success probability greater than 1 2 + 2 n 2 . Hence for a fixed minimal probability of success 1 2 + δ , no classical algorithm using a polynomial number of queries can solve Simon's problem.

Shor's Factoring Algorithm

Shor's algorithm [Sho1995] allows to factor an integer N 0 in poly ( log N 0 ) time. No classical algorithm are currently known to run this task in polynomial time. Actually, some cryptographic protocols are based on the assumption that no efficient algorithm exists for integer factoring and hence Shor's algorithm shows that they can be broken by quantum computation.

Shor's algorithm contains classical parts that can be executed in polynomial time and quantum computation is actually only used in a sub-procedure. More precisely, one step is to choose a random integer a < N 0 (which can be assumed to be coprime with N 0 ). The function defined on by f ( x ) = a x  mod  ( N 0 ) is r -periodic and the problem reduces to find the period r . We can restrict our study to the domain N for some multiple N of the period. Of course, we do not know how to choose N precisely but it is possible to find some value N = O ( N 0 2 ) for which the approximation does not change the final result. For simplicity, let's assume N = r M is an exact multiple of the period. The period-finding submodule can be executed in poly ( log N ) = poly ( log N 0 ) using the circuit of figure 3.2, which is very similar to the one of Simon's problem. We define the Fourier transform F N to be the symmetric matrix

F N = 1 N i = 0 N 1 j = 0 N 1 2 π N i j j i

It can easily be shown to be unitary and hence a valid quantum operation. We assume that there exists an efficient implementation of poly ( log N ) elementary gates computing F N . This implementation uses n = log N qubits, so we are working in an Hilbert Space of dimension 2 n N . Hence some basis states may not be used, they are just unchanged by the gate implementing F N .

Period finding circuit

The first call to F N on 0 n returns the first column of F N i.e. a uniform superposition of basis vectors as in Simon's algorithm. Hence the state after U f is also

1 N x = 0 N 1 x f ( x )

Measuring the second register gives a value y and makes the first register collapse to the superposition of the preimages of y . If x 0 is such an image all the others are obtained by x 0 + i r for i going from 0 to M 1 :

1 M i = 0 M 1 x 0 + i r y

After the second Fourier Transform gate, the state in the first register is 1 M N j = 0 N 1 ( i = 0 M 1 2 π N ( x 0 + i r ) j ) j

Each sum over i is a geometric series of initial term 2 π N x 0 j and ratio 2 π N r j . So the sum is nonzero (and equal to M 2 π N x 0 j ) iff 2 π N r j = 1 iff j 0  mod  ( N r ) iff j is multiple of M . Hence the state can be rewritten:

1 r j multiple of M 2 π x 0 j N j

All the vectors in the sum have same amplitude, so measuring the first register yields a uniformly random multiple of M between 0 and N 1 . Using k trials gives j 1 , j k multiples of M . One can show that gcd ( j 1 , j k ) = M with success probability 1 2 k 2 (see Appendix E of [Lom2004] applied to t i = j i M ) and thus we get r = N M .

Shor's Discrete Logarithm Algorithm

(discrete logarithm)

Let p be a prime number and g a generator of p * . Any x p * can be written uniquely as x = g y for some y p 1 . y = log g x is called the discrete logarithm of x (with respect to g ).

Similarly to Shor's algorithm, some cryptographic protocols are based on the difficulty of computing discrete logarithms. In [Sho1995], Shor describes a quantum algorithm to compute these logarithms in polynomial time. So suppose x , g are given and that we want to find y .

We first define the function f ( a , b ) = g a x b  mod  ( p ) going from p 1 × p 1 to p . Each call to f is clearly done in time poly ( log ( p ) ) . Note that we can rewrite f using the discrete logarithm y : f ( a , b ) = g a + y b  mod  ( p ) . Hence ( a 1 , b 1 ) ( a 2 , b 2 ) + λ ( y , 1 )  mod  ( p 1 ) implies f ( a 1 , b 1 ) = f ( a 2 , b 2 ) . Conversely, if this equality is true, we have a 2 a 1 y ( b 1 b 2 )  mod  ( p 1 ) and we can take λ p 1 to be the unique element congruent with b 2 b 1 modulo p 1 to recover the previous equality. As a consequence, we can say that ( y , 1 ) is the period of f and all the values are obtained when λ varies from 0 to p 2 .

We now define a circuit which is really similar to those we saw earlier. Here, the first register is the tensor product of two log ( p 1 ) -qubits state and the second a log ( p ) -qubits state. On the first register we apply F p 1 F p 1 i.e. a Fourier transform on each state of the tensor product:

Circuit for the Discrete logarithm

On the first register applying the first F p 1 F p 1 gives, as in Shor's algorithm, a superposition over the whole group

( 1 p 1 a = 0 p 2 a ) ( 1 p 1 b = 0 p 2 b ) = 1 p 1 a , b = 0 p 2 a b

Then, applying the U f operator gives the superposition

1 p 1 a , b = 0 p 2 a b f ( a , b )

Measuring the second register yields a f ( a 0 , b 0 ) and makes the first register collapse to the superposition of the preimages. By the discussion above it is:

1 p 1 λ = 0 p 2 a 0 + λ y b 0 λ f ( a 0 , b 0 )

Now, we apply F p 1 F p 1 on the first register, giving the state

1 p 1 λ = 0 p 2 ( 1 p 1 u = 0 p 2 2 π ( a 0 + λ y ) u p 1 u ) ( 1 p 1 v = 0 p 2 2 π ( b 0 λ ) v p 1 v )

which we can further simplify to

1 ( p 1 ) 3 λ , u , v = 0 p 2 2 π ( ( a 0 u + b 0 v ) + λ ( y u v ) ) p 1 u v = 1 ( p 1 ) 3 u , v = 0 p 2 2 π ( a 0 u + b 0 v ) p 1 ( λ = 0 p 2 [ 2 π ( y u v ) p 1 ] λ ) u v

The sum over lambda is a geometric series, and its value is nonzero (and of value p 1 ) iff y u v 0  mod ( p 1 ) . Replacing v by y u in the expression gives the final state:

1 p 1 u = 0 p 1 2 π ( a 0 + b 0 y ) u p 1 u y u

A measurement in the standard basis gives u and y u modulo p 1 . If u and p 1 are coprime, using the euclidean algorithm we can find v such that u v = 1 modulo p 1 from the first state. Then, we get y = y u v modulo p 1 from the second state. So we have obtained y = log g x as expected. Note that u and p 1 are coprime with probability φ ( p 1 ) p = Ω ( 1 log ( log ( p ) ) ) so we only need to repeat the procedure about log ( log ( p ) ) times to ensure a success with high probability.

The Hidden Subgroup Problem

In this section, we interpret the algorithms seen in previous sections in a common framework. The hope is to find new algorithms exponentially faster than their classical counterparts.

(hidden subgroup problem)

Let G be a group and H G one of its subgroup. Let S be any set and f : G S a function that distinguishes cosets of H i.e. g 1 , g 2 G , f ( g 1 ) = f ( g 2 ) g 1 H = g 2 H . The hidden subgroup problem (HSP) is to determine the subgroup H using calls to f .

(interpretation of previous algorithms)

Problem G H S f Comment
Simon 2 n { 0 , s } 2 m Such that two distinct elements x , x ' have the same image iff x ' = x s . s is any n -bits strings.
Shor's algorithm (order finding subroutine) N r N N f ( x ) = a x  mod  ( N 0 )

N 0 is the number to factor, a < N 0 a random integer coprime with N 0 , r is the order of a modulo N 0 . Ideally, N should be a multiple of r but we can choose some N = O ( N 0 2 ) giving a good approximation.

Discrete logarithm p 1 × p 1 ( y , 1 ) p 1 p * f ( a , b ) = g a x b  mod  ( p ) p is prime, g a generator of p * , x an element of p * , y the discrete logarithm of x .

In the remaining of this document, we are only considering the case of a finite group G . In particular, the set S may also be taken to be finite and we may even assume S G . Consequently, we can formulate the problem in terms of circuits: we encode the elements of the two sets with at most n = log G bits and hence f can be viewed as a function f : 2 n 2 n and represented by a quantum logic gate U f . A naive algorithm for the hidden subgroup problem is the following:

  1. compute s 0 = f ( 0 )
  2. compute f ( g ) for all g G and return those for which f ( g ) = s 0 i.e. the elements of H .

The runtime complexity of this algorithm is O ( G comp ( f ) ) so at least O ( exp ( n ) ) . This is really bad compared with the efficient quantum algorithms previously seen. For instance Shor's algorithm run in poly ( log N ) = poly ( n ) i.e. exponentially faster. Hence we are lead to the following definition:

(efficient)

An algorithm for the hidden subgroup problem is said to be efficient iff it returns a generating set of elements of H using a complexity polynomial in n = log G .

In particular, we have the following requirements for an efficient solution:

  1. f has a polynomial complexity.
  2. f is called a polynomial number of times.
  3. the set generating H has a polynomial size.

Note that not all functions f : 2 n 2 n have a polynomial complexity, as indicated in exercise 3.16 of [NieChu2007]. The idea is that there are ( 2 n ) ( 2 n ) such functions so one can note encode all of them using only a polynomial number of elementary gates. As a consequence, f has to be chosen carefully to satisfy the first property.

The argument given in appendix A.2.1.1 of [NieChu2007] shows that there is a set of size at most log ( H ) log ( G ) that generates H . Actually, for any group K , if we pick uniformly at random t + log ( K ) elements of K (for some integer t 0 ) then the set obtained generates K with probability 1 2 t (see Appendix D of [Lom2004]).

Ettinger, Høyer and Knill [EttHøyKni1999] proved that the second requirement can always be satisfied i.e. only a polynomial number of calls to f is needed to identify H . The idea is to prepare the state

1 G m g 1 , , g m G g 1 , , g m f ( g 1 ) , , f ( g m )

and measure the second register to get a tensor product of m coset states (see definition 4.8). Then they apply measurements for each g G , that check whether g H . They prove that the answers given by the algorithm are correct with high probability for some m = O ( n ) . However, the whole algorithm is not poly ( n ) since we test G = Ω ( exp ( n ) ) elements.

In Simon's problem an efficient algorithm means a poly ( n ) (i.e. the number of bits in the strings x , s ...) complexity and n = log ( 2 n ) . Here, we measure the complexity using the numbers of queries to the oracle rather than elementary operations (because f may not be computed efficiently per comment above).

In Shor's algorithm and the discrete logarithm problem, it means polynomial in the number of bits needed to encode the numbers we work on, i.e. log ( N ) and log ( p ) respectively. f uses basic operations on such numbers so has a polynomial complexity. The sizes of the groups we work with are N and ( p 1 ) 2 respectively, so their log G 's are equivalent to the values we previously used to measure efficiency.

In all cases, there is only one generator to the group H , namely s , r and ( y , 1 ) .

In the particular examples of previous sections, there are natural encoding of the elements and algorithm to compute the product of two elements. For instance, for the cyclic HSP G = N the elements are encoded as binary number of length log ( N ) and there are well-known algorithms of complexity polynomial in log ( N ) for the group operations. To study the general HSP, it is often useful to see the group G as a black-box where the operations are performed by a group oracle. As in the case of the HSP oracle computing f , replacing the group oracles by polynomial-time operations yields an efficient algorithm.

(black-box group, unique encoding, encoding length, input size)

Let n = O ( log ( N ) ) and m 0 . n is called the encoding length and m n the input size. A black-box group with unique encoding has the following properties:

  1. G is given by generators g 1 , , g m .
  2. there are oracles to perform multiplication and inversion.
  3. each element can be represented by a binary string of length n .
  4. the previous representation is unique.

For a black-box group without unique encoding we replace the point 4 by an oracle performing identity testing (hence equality).

This page is W3C-compliant - Author: Frédéric WANG
Valid XHTML 1.1 Valid MathML 2.0 Valid SVG Valid CSS Amaya, the W3C browser/editor Firefox