aa r X i v : . [ phy s i c s . g e n - ph ] J u l APS/123-QED
Grover search with smaller oracles
Dan Li , College of Computer Science and Technology,Nanjing University of Aeronautics and Astronautics, Nanjing, China (Dated: July 8, 2020)Grover search is one of the most important quantum algorithms. In this paper, we consider a kindof search that the conditions of satisfaction T can be rewritten as T = T T T . Then we present anew Grover search with smaller oracles. The time complexity of this algorithm O ( π q Nbλ + π q bτ ),which is smaller than the time complexity of original Grover search, i.e. O ( π q NM ). PACS numbers:
I. INTRODUCTION
Search on a unordered database is one of the NP-hardproblems. The classical way to execute the exhaustivesearch is by querying each item in the database of N items by a oracle to identify the solution. In the worstcase, the total number of queries to the oracle is N − O ( √ N ), which quadratically outperforms theclassical algorithm.Grover partial search is presented from the view thatonly some part of bits of the database are interested [4, 5].The authors use a local Grover operator to make the par-tial search easier. Then Choi, Zhang and Korepin con-sider quantum partial search of a database with severaltarget items [6, 7]. Then Zhang and Korepin discuss howto optimise the Grover’s algorithm from the view of depth[8].By borrowing the idea of local Grover operator, wepresent the Grover search algorithm with smaller oraclesin this paper. By consider the conditions of satisfaction T as T = T T T , the time complexity of the new Groversearch is smaller than the original Grover’s search.The paper is structured as follows. In Sect.II, we re-view the Grover search algorithm. In Sect.III, the Groversearch algorithm with smaller oracles and its quantumcircuit are presented. And the time complexity of this al-gorithm is discussed. Finally, a short conclusion is givenin Sect.IV. II. GROVER SEARCH ALGORITHM
The quantum search algorithm consists of repeated ap-plication of a quantum subroutine, know as the Grover it-eration, which we denote G . The Grover iteration, whosequantum circuit is illustrated in Fig1XXXXX, may bebroken up into two steps:1. Apply the oracle O T ; 2. Apply the Grover operator D . O T is a quantum oracle with the ability to recognizesolutions to the search problem. The action of the oraclemay be written as: O T = I − X x | x ih x | (1)which in fact has the effect | x i O T −→ −| x i for all targetitems.The Grover operator D is D = 2 | ψ ih ψ | − I, (2)which is the inversion about mean operation. | ψ i is theequal superposition of all items in the database.Suppose N is the size of database, M is the number oftargets. The initial state is | ψ i . Let CI ( x ) denote theinteger closest to the real number x . Then the numberof Grover iteration is R = CI ( arccos p M/Narccos (1 − MN ) ) , (3)which is O ( p N/M ). III. THE ALGORITHM OF GROVER SEARCHWITH SMALLER ORACLES
By borrowing the idea of local Grover operator, wepresent the algorithm of Grover search with smaller ora-cles.Suppose the conditions of satisfaction T can be rewrit-ten as T = T T T . T is the condition of satisfaction ofthe first log ( k ) qubits, while T is the condition of sat-isfaction of all qubits, i.e. T or part of them. Based onthe above limitations, T ⊂ T and T ⊆ T .A database of N items is divided into k blocks with N = bk . Here b is the number of items in each block.The idea of this algorithm is shown in Fig.2XXX.Firstly, consider all items that satisfy T as targetitems, after the global Grover iterations, amplitudes ofthe target blocks which satisfy T get higher while am-plitudes of non-target blocks are close to 0.Secondly, consider items that satisfy T as target items,then after the local Grover iterations, amplitudes of theitems in the target blocks get higher more. Because thetotal of amplitudes of a non-target block is close to 0, af-ter the local Grover iterations, amplitudes of target itemsin non-target blocks are still close to 0.Blocks that satisfy the condition T are denoted by Y Y i , whose number is λ Y . And the set of target items,i.e. satisfy T , in these blocks are denoted by AY i , whosesize is τ i , while the set of non-target items in these blocksare denoted by XY i , whose size is b − τ i .Blocks which include items that satisfy the condition T , but do not satisfy the condition T , are denoted by N Y i , whose number is λ N . And the set of items whichsatisfy T in these blocks are denoted by AN i , whose sizeis ω i , while the complementary set of them in each blockis denoted by XN i , whose size is b − ω i .Blocks that do not satisfy the condition T or T aredenoted by B . The number of these blocks is k − λ Y − λ N Here we define some states. | AY i i = 1 √ τ i X x ∈ AY i | x i (4) | XY i i = 1 √ b − τ i X x ∈ XY i | x i (5) | Y Y i = 1 √ bλ Y X x ∈ S Y Y i | x i (6)= X i r τ i bλ Y | AY i i + X i r b − τ i bλ Y | XY i i (7) | AN i i = 1 √ ω i X x ∈ AN i | x i (8) | XN i i = 1 √ b − ω i X x ∈ XN i | x i (9) | N Y i = 1 √ bλ N X x ∈ S NY i | x i (10)= X i r ω i bλ N | AN i i + X i r b − ω i bλ N | XN i i (11) | N N i = 1 p N − b ( λ Y + λ N ) X x ∈ B | x i (12) | B i = 1 √ N − bλ Y X x ∈ NY S NN | x i (13)(14) (a)(b)(c)(d)(e) Fig. 1: The two Grover iterations G and G . Items, No.1-4,satisfy T , Items, No.4,8, satisfy T . Step1: j the Grover iteration G ; The Grover iteration G is defined as G = D ∗ O T , (15)where O T = I − X x ∈ S Y Y i | x ih x | (16) D = 2 | ψ ih ψ | − I (17)The effect of G on | Y Y i and | B i is b G = (cid:18) cos (2 θ ) sin (2 θ ) − sin (2 θ ) cos (2 θ ) (cid:19) (18)where sin [ θ ] = bλ Y N Therefore, after step 1, the state of the system is b G j | ψ i = a | Y Y i + a | B i = X i r τ i bλ Y a | AY i i + X i r b − τ i bλ Y a | XY i i + X i r ω i N − bλ Y a | AN i i + X i r b − ω i N − bλ Y a | XN i i + r N − bλ Y − bλ N N − bλ Y a | N N i (19)where a = sin [(2 j + 1) θ ], a = cos [(2 j + 1) θ ]. Step2: j the Grover iteration G ; The Grover iteration G is defined as G = D ∗ O T , (20)where O T = I − X x ∈ S AY i S AN i | x ih x | (21) D = I k O (2 | ψ ih ψ | − I ) (22) | ψ i = 1 √ b X x ∈{ , ··· b } | x i (23)The effect of G on | AY i i | XY i i | AN i i | XN i i and | B i is b G = cos (2 θ Y i ) sin (2 θ Y i ) − sin (2 θ Y i ) cos (2 θ Y i ) cos (2 θ Ni ) sin (2 θ Ni ) − sin (2 θ Ni ) cos (2 θ Ni ) 1 (24)where sin [ θ Y i ] = τ i b , sin [ θ Ni ] = ω i b .Therefore, after step 2, the state of the system is b G j b G j | ψ i = X i ( r τ i bλ Y a bi + r b − τ i bλ Y a bi | AY i i + X i ( − r τ i bλ Y a bi + r b − τ i bλ Y a bi | XY i i X i ( r ω i N − bλ Y a ci + r b − ω i N − bλ Y a ci | AY i i + X i ( − r ω i N − bλ Y a ci + r b − ω i N − bλ Y a ci | XY i i + r N − bλ Y − bλ N N − bλ Y a | N N i (25) where bi = sin [2 j θ Y i ], bi = cos [2 j θ Y i ], ci = sin [2 j θ N i ], ci = cos [2 j θ N i ]. Estimating the number of Grover iterations
The first step of this algorithm is to magnify theamplitude of blocks
Y Y i , i.e. the amplitude of | Y Y i .Therefore, the optimal number of Grover iteration G is j = CI ( arccos q bλYN arccos (1 − bλYN ) ).The second step of this algorithm is to magnify theamplitude of items that satisfy T in each block. Innon-target blocks N Y i , amplitudes of all items are closeto 0. So the number of Grover iteration G do notaffect greatly the amplitudes. In target blocks, itemswhich satisfy T are items satisfy T . The optimal num-ber of Grover iteration G for each target block Y Y i is CI ( arccos √ τib arccos (1 − τib ) ). Due to the number of target items ineach target blocks may not same, in order to minimizethe number of Grover iteration G , the optimal numberof Grover iteration G is j = CI ( arccos √ τb arccos (1 − τb ) ), where τ = max ( τ i ).For Grover search, the number of Grover iteration is O ( π q NM ). For the Grover search with smaller oraclesin this paper, the time complexity is O ( π q Nbλ + π q bτ ),which is smaller than O ( π q NM ). IV. SUMMARY
By borrowing the idea of local Grover operator, wepresent a new Grover search algorithm with smaller or-acles. This algorithm is suitable for search questionswhose conditions of satisfaction T can be rewritten as T = T T T , where T and T are conditions of satisfac-tion for part of qubits.The algorithm is divided into two parts: global Groveriteration, local Grover iteration. Global Grover iterationmagnify the amplitude of items that satisfy T , whilelocal Grover iteration magnify the amplitude of itemsthat satisfy T .On one hand, the time complexity of this algorithm is O ( π q Nbλ + π q bτ ), which is smaller than the time com-plexity of original Grover search, i.e. O ( π q NM ). On theother hand, this algorithm needs more to evaluate thenumber of target items that satisfy T and T .In conclusion, this algorithm is not as general as theoriginal Grover search, but in specific situation, it is morefast, and only need smaller oracles. Acknowledgments