Grover algorithm with zero theoretical failure rate

35 downloads 0 Views 49KB Size Report
Jul 11, 2001 - Grover algorithm with zero theoretical failure rate. G. L. Long. Department of Physics, Tsinghua University, Beijing 100084, People's Republic of ...
PHYSICAL REVIEW A, VOLUME 64, 022307

Grover algorithm with zero theoretical failure rate G. L. Long Department of Physics, Tsinghua University, Beijing 100084, People’s Republic of China; Key Laboratory for Quantum Information and Measurements, Ministry of Education, Beijing 100084, People’s Republic of China; Institute of Theoretical Physics, Chinese Academy of Sciences, Beijing 100080, People’s Republic of China; and Center of Atomic, Molecular and Nanosciences, Tsinghua University, Beijing 100084, People’s Republic of China 共Received 3 February 2001; published 11 July 2001兲 In a standard Grover’s algorithm for quantum searching, the probability of finding the marked item is not exactly 1. In this paper we present a modified version of Grover’s algorithm that searches a marked state with full successful rate. The modification is done by replacing the phase inversion by phase rotation through angle ␾ . The rotation angle is given analytically to be ␾ ⫽2 arcsin(sin 关␲/(4J⫹6)兴/sin ␤), where sin ␤⫽1/冑N, N is the number of items in the database, and J is any integer equal to or greater than the integer part of 关 ( ␲ /2) ⫺ ␤ 兴 /(2 ␤ ). Upon measurement at the (J⫹1)th iteration, the marked state is obtained with certainty. DOI: 10.1103/PhysRevA.64.022307

PACS number共s兲: 03.67.Lx, 89.70.⫹c, 89.20.Ff

Grover’s quantum search algorithm 关1兴 is an important development in quantum computation. It achieves squareroot speedup over classical algorithms in unsorted database searching. It has extensive applications, because many problems, for instance deciphering the DES encryption scheme, can be reduced to this problem 关2兴. Starting from an evenly distributed state, the Grover algorithm searches the database with j op ⫽ 关共 ␲ /2⫺ ␤ 兲 / 共 2 ␤ 兲兴 ,

共1兲

or j op ⫹1 number of times, whichever of 关 2( j op ⫹1)⫹1 兴 ␤ and (2 j op ⫹1) ␤ is closest to ␲ /2. Here ␤ ⫽arcsin(1/冑N) and 关 兴 means taking the integer part. N is the number of items in the database. Maximum probability is achieved when measurement is made at the optimal iteration step, and it is P max ⫽sin2 关共 2 j op ⫹1 兲 ␤ 兴 ⬵1.

共2兲

It equals 1 if (2 j op ⫹1) ␤ ⫽ ␲ /2. This condition is usually approximately satisfied. This can be seen from Table I where values of j op , (2 j op ⫹1) ␤ for N are given. The deviation (2 j op ⫹1) ␤ from ␲ /2 is on the order of 1/冑N. This small deviation becomes negligible when the dimension of the quantum database becomes very large, for instance in deciphering the DES code where N⫽2 56 the deviation is only 3⫻10⫺9 . The standard Grover algorithm has already achieved high probability, and in most potential applications it is sufficient. However, in problems where certainty is vital, especially when the dimension is not so big, using a searching algo-

rithm with certainty becomes important. Meanwhile constructing such a quantum search algorithm itself is an interesting issue. In this paper we present such a modified Grover algorithm. In fact, two such algorithms already exist. One is given by Brassard et al. 关3兴 where the generalized algorithm searches the database j op iterations with the standard Grover algorithm, and then run one more iteration with a modified algorithm whose step is smaller. Ho” yer gave another generalization 关4兴, where certainty is achieved by modifying the Grover algorithm and making change to the initial distribution. Our algorithm here complements with these algorithms. In addition, the present algorithm materializes one earlier anticipation 关5兴. It was pointed out that when the phase inversions are replaced by arbitrary rotations in Grover’s algorithm 关6兴, a quantum search algorithm with a smaller iteration can be constructed. Zalka anticipated that this could be used to achive certainty in quantum searching 关5兴 by running a quantum searching algorithm with a smaller step so that at an integer number of iteration, the quantum computer state vector is exactly the marked state. Our algorithm here is just such an algorithm. The generalized Grover algorithm here starts from the evenly distributed state 兩 ␺ i典 ⫽



1

冑N 1

冑N

兺i 兩 j 典 共 兩 0 典 ⫹ 兩 1 典 ⫹•••⫹ 兩 ␶ 典 ⫹•••⫹ 兩 N⫺1 典 )

⫽sin ␤ 兩 1 典 ⫹cos ␤ 兩 2 典 ,

共3兲

TABLE I. Examples of j o p and (2 j o p ⫹1) ␤ .

N⫽

2

4

8

100

1000

104

106

108

1010

2 56

j op (2 j o p ⫹1) ␤ ␲ 2

0 1 2

1

1

7

24

78

784

7853

78539

210828713

1

0.69016

0.956528

0.986617

0.99951

0.998857

0.999939

0.999996

0.999999997

1050-2947/2001/64共2兲/022307共4兲/$20.00

64 022307-1

©2001 The American Physical Society

G. L. LONG

PHYSICAL REVIEW A 64 022307 TABLE II. Examples of j o p ⫹1 and ␾ .

N⫽

2

4

8

16

100

1000

104

106

108

1010

j o p ⫹1 ␾ ␲

1 1 2

1

2

3

8

25

79

785

7854

78540

1

0.677007

0.698709

0.748018

0.854022

0.90089

0.989752

0.992688

0.9973

and the searching operator is Q⫽⫺WI 0 WI ␶ ⫽



⫺e i ␾ 共 1⫹ 共 e i ␾ ⫺1 兲 sin2 ␤ 兲

⫺ 共 e i ␾ ⫺1 兲 sin ␤ cos ␤

⫺e i ␾ 共 e i ␾ ⫺1 兲 sin ␤ cos ␤

⫺e i ␾ ⫹ 共 e i ␾ ⫺1 兲 sin2 ␤



cess. We do this in the SO(3) picture introduced recently 关9兴. In this picture, the quantum search operator 共4兲 corresponds to a rotation in space



,

1



冑N⫺1

i⫽ ␶

R 11⫽cos ␾ 共 cos2 2 ␤ cos ␾ ⫹sin2 2 ␤ 兲 ⫹cos 2 ␤ sin2 ␾ ), R 12⫽cos ␾ sin ␾ 共 cos 2 ␤ ⫺1 兲 , 兩i典

共5兲 R 13⫽⫺cos ␾ sin 4 ␤ sin2

and I ␶ ⫽I⫹ 共 e i ␾ ⫺1 兲 兩 ␶ 典具 ␶ 兩 , I 0 ⫽I⫹ 共 e i ␾ ⫺1 兲 兩 0 典具 0 兩 , where

␾ ⫽2 arcsin





J⭓J op .

␾ ⫹sin 2 ␤ sin2 ␾ , 2



R 21⫽⫺cos 2 ␤ cos ␾ sin ␾ ⫹ cos2 共6兲



␾ ␾ ⫺cos 4 ␤ sin2 sin ␾ , 2 2

R 22⫽cos2 ␾ ⫹cos 2 ␤ sin2 ␾ ,



R 23⫽⫺cos ␾ sin 2 ␤ sin ␾ ⫺sin 4 ␤ sin2

␲ 4J⫹6 , sin ␤

sin

共8兲

where

兩1典⫽兩␶典, 兩2典⫽



R Q ⫽ R 21 R 22 R 23 , R 31 R 32 R 33

共4兲 where the matrix expression is written in the following basis:

R 11 R 12 R 13

␾ sin ␾ , 2

␪ R 31⫽⫺sin 4 ␤ sin2 , 2 共7兲

Here the two-phase rotations are equal which is required by the phase-matching condition 关7,8兴. Certainty quantum searching is achieved by measuring the quantum computer at J⫹1 iteration. In a standard Grover algorithm, ␾ ⫽ ␲ . In Table II we gave the angle ␾ for some values of N. It is seen that in general the phase rotations are very close to ␲ . We see that at small N, the deviation of ␾ to ␲ is big, and it decreases when N becomes large. The certainty of the algorithm can be examined by direct computation. We will give the detailed derivation of this result in the SO(3) picture of the quantum searching algorithm 关9兴. Equation 共7兲 has a real solution for J⭓ j op , otherwise the solution will be complex. An integer J⭓ j op fixes a phase rotation that searches the marked state with certainty in J ⫹1 steps. The lower bound j op tells us that it cannot be faster than the standard Grover algorithm. J can be chosen to be j op , or an integer larger than j op for convenience. In the following part, we show the above result and give the expression for the probability during the searching pro-

R 32⫽sin 2 ␤ sin ␾ , R 33⫽cos2 2 ␤ ⫹cos ␾ sin2 2 ␤ .

冉 冊

The above rotation is a rotation about the following axis:

ជl ⫽

cos

␾ 2

sin

␾ 2

cos

through an angle ␣

,

共9兲

␾ tan ␤ 2

冋 冉冊 册

␣ ⫽4 arcsin sin

␾ sin ␤ . 2

共10兲

State vector 兩 ␺ 典 ⫽(a⫹bi) 兩 1 典 ⫹(c⫹di) 兩 2 典 is represented by the polarization vector

022307-2

GROVER ALGORITHM WITH ZERO THEORETICAL . . .

ជ 兩␺典⫽ rជ ␺ ⫽ 具 ␺ 兩 ␴



2 共 ac⫹bd 兲 2 共 ⫺bc⫹ad 兲 a 2 ⫹b 2 ⫺c 2 ⫺d 2



PHYSICAL REVIEW A 64 022307

共 rជ i ⫺rជ o 兲 • 共 rជ f ⫺rជ o 兲 ⫽ 兩 rជ i ⫺rជ 0 兩兩 rជ f ⫺rជ 0 兩 cos ␻ ,

共11兲

,

we find that cos ␻ ⫽⫺cos2 ␤ ⫺cos ␾ sin2 ␤ ⫽cos共 2 arccos x 兲 , 共17兲

ជ ⫽ ␴ x ជi ⫹ ␴ y ជj ⫹ ␴ z kជ , and ជi , ជj , and kជ are the unit vecwhere ␴ tors along the x, y, and z axes. The initial state 兩 ␺ i 典 and the marked state 兩 ␶ 典 are represented by

冉 冊 冉冊 sin共 2 ␤ 兲

rជ i ⫽

where x⫽sin

0

0

rជ f ⫽ 0 . 1

,

⫺cos共 2 ␤ 兲

共12兲

␾ cos 2



y

␾ sin 2



z , ␾ cos tan ␤ 2

␻ ⫽2

rជ o ⫽



冉冊 冉冊 冉冊 冉冊

␾ tan ␤ 2

c sin

␾ ␾ cos tan ␤ 2 2



共14兲

␾ c cos tan2 ␤ 2 2

T⫽

冑N T





␲ ⫺arcsin x ⫽4 共 J⫹1 兲 arcsin共 x 兲 . 2

Q⫽T⌳T † , where

冋 冉冊

␾ sin ␤ ⫹cos ␤ ⬘ 2

e ⫺i( ␾ /2) cos



⫺cos ␤ i( ␾ /2)

冋 冉冊

cos ␤

e



⫺e i( ␾ ⫹2 ␤ ⬘ )

0

0

⫺e i( ␾ ⫺2 ␤ ⬘ )

⌳⫽

␾ cos sin ␤ ⫹cos ␤ ⬘ 2



,

冋 冉冊 册 冋 冉冊 册

␤ ⬘ ⫽ ␣ /4⫽arcsin sin

N T ⫽cos2 ␤ ⫹ cos

共20兲

where ជl n is the rotational axis 共9兲 normalized to unity. Using Eq. 共11兲, the state vector can be determined easily. The probability for finding the marked state is (z⫹1)/2. We can also write out the expressions in the U(2) formalism. After diagonalization, the Q operator can be written as

共15兲

where c⫽1/(1⫹cos2␾/2 tan2 ␤ ). The angle ␻ between rជ i ⫺rជ 0 and rជ f ⫺rជ 0 is the angle we have to rotate in a given number of iterations. Using

1



rជ j ⫽rជ i cos ␻ ⫹ ជl n 共 ជl n •rជ i 兲共 1⫺cos ␻ 兲 ⫹ 共 ជl n 丢 rជ i 兲 sin ␻ ,

,

共19兲

This gives the result of Eq. 共7兲. Equation 共7兲 has real solutions for J⭓ j op . J⫽ j op is the minimum in most cases. In the cases of N⫽4 and N⫽1, J⫽ j op ⫺1 itself is a solution. The probability for finding the marked state during the searching can be obtained easily. In the SO(3) picture, the polarization vector at a given iteration is obtained by a simple geometric argument,

The intersecting point of Eqs. 共13兲 with 共14兲 is c cos2

共18兲

Using the trigonometric relation arcsin x⫹arccos x⫽ ␲ /2, we obtain

共13兲

␾ ␾ ␾ ⫹y sin ⫹ 共 z⫺1 兲 cos tan ␤ ⫽0. 2 2 2

␾ sin ␤ . 2

␻ ⫽2 arccos共 x 兲 ⫽ 共 J⫹1 兲 ␣ ⫽4 共 J⫹1 兲 arcsin共 x 兲 .

and the equation for the plane passing through (0,0,1) T and normal to the rotational axis is x cos

冉冊

Certainty in finding the marked state is achieved if angle ␻ is J⫹1 times of the basic rotation angle ␣ :

Now we want to find out the angle that we must rotate to shift rជ i to rជ f . The equation for a line passing through the origin and parallel to the rotational axis is x

共16兲

␾ sin ␤ , 2

2 ␾ sin ␤ ⫹cos ␤ ⬘ . 2

022307-3

册冊

,

G. L. LONG

PHYSICAL REVIEW A 64 022307

Successive operations of Q can be written analytically through Q n ⫽T⌳ n T † . In summary, a Grover algorithm with certainty is present. Together with the algorithms in Refs. 关3兴 and 关4兴, there are three choices of the quantum searching algorithm for finding the marked state with certainty. Our algorithm may be appreciated in cases where the dimension is not big and certainty

关1兴 L. K. Grover, Phys. Rev. Lett. 79, 325 共1997兲. 关2兴 G. Brassard, Science 275, 627 共1997兲. 关3兴 G. Brassard, P. Ho” yer, M. Mosca, and A. Tapp, e-print quant-ph/0005055. 关4兴 P. Ho” yer, Phys. Rev. A 62, 052304 共2001兲. 关5兴 G. Zalka, e-print quant-ph/9902049. 关6兴 L. K. Grover, Phys. Rev. Lett. 80, 4329 共1998兲.

is important, and in cases where preparation of the initial state and the change of the experimental setting during the computation process are difficult. This work is supported by the Major State Basic Research Developed Program Grant No. G200077400, the China National Natural Science Foundation Grant No. 60073009, the Fok Ying Tung Education Foundation, and the Excellent Young University Teachers’ Fund of Education Ministry of China.

关7兴 G. L. Long, Y. S. Li, W. L. Zhang, and L. Niu, Phys. Lett. A 262, 27 共1999兲. 关8兴 Note that the phase condition in Ref. 关4兴 is different from this one, because his initial state is different. 关9兴 G. L. Long et al., J. Phys. A 34, 867 共2001兲. Also in e-print quant-ph/9911004.

022307-4

Suggest Documents