quantum computers can search rapidly by using almost any selective transformation

7
Quantum computers can search rapidly by using almost any selective transformation Avatar Tulsi * Department of Physics, Indian Institute of Science, Bangalore-560012, India Received 3 January 2008; published 22 August 2008 The search problem is to find a state satisfying certain properties out of a given set. Grover’s algorithm drives a quantum computer from a prepared initial state to the target state and solves the problem quadratically faster than a classical computer. The algorithm uses selective transformations to distinguish the initial state and target state from other states. It does not succeed unless the selective transformations are very close to phase inversions. Here we show a way to go beyond this limitation. An important application lies in quantum error correction, where the errors can cause the selective transformations to deviate from phase inversions. The algorithms presented here are robust to errors as long as the errors are reproducible and reversible. This particular class of systematic errors arises often from imperfections in the apparatus setup. Hence our algo- rithms offer a significant flexibility in the physical implementation of quantum search. DOI: 10.1103/PhysRevA.78.022332 PACS numbers: 03.67.Ac, 03.67.Lx, 03.67.Pp I. INTRODUCTION Suppose we have a set of N items j =0,1,2,..., N - 1, and a binary function f j which is 1 if j satisfies certain proper- ties e.g., if it is a solution to a certain computational prob- lem and 0 otherwise. Let T be the set of M items, for which f j =1, i.e., T = j f j =1 and T = M. Consider the situa- tion when the items are not sorted according to any property, but f j can be computed by querying an oracle that outputs f j for any input j . The search problem is to find an element of T i.e., a solution using the minimum number of oracle queries. The best classical algorithm for this problem is to randomly pick an item j , use an oracle query to check whether j T, and then repeating the process until a solution is found. On the average, it takes ON / M oracle queries to succeed, since M / N is the probability of the picked item to be a solution. In a quantum setting, Grover’s search algorithm 1 pro- vides a much faster way. The N items are encoded as basis states j of an N-dimensional Hilbert space, which can be realized using n = log 2 N qubits without loss of generality, we assume N to be a power of 2. The initial unbiased state is chosen as the equal superposition state 1 / N j j , gen- erated by applying the Walsh-Hadamard transformation W on 0. The target state t can be any normalized state jT a j j within the target subspace, since measuring t will always give a solution. Grover’s algorithm obtains t by applying O N / M iterations of the operator G = WI 0 WI t on W0. Here I t = j -1 jt j j and I 0 = j -1 j0 j j are the selective phase inversions of t and 0 states, respectively. Grover’s algorithm thus provides a quadratic speedup over the classical algorithm, as each iteration of G uses one oracle query to implement I t . Grover showed that his algorithm works even if the Walsh-Hadamard transform W is replaced by almost any uni- tary operator U 2. In this case, the initial state U0 is a general not necessarily equal superposition of the basis states. The operator G = UI 0 U I t is iteratively applied to U0, and the target state t is obtained after O1 / U iterations, where U = jT U j0 2 is the projection of U0 on the target subspace for U = W, W = M / N. As the probability of get- ting a target state upon measuring U0 is U 2 , the target state can be obtained classically by O1 / U 2 preparations of U0 and subsequent projective measurements. Hence, the quan- tum algorithm provides a quadratic speedup over this simple scheme by doing the same job in O1 / U steps. This gen- eralization is known as quantum amplitude amplification 2,3, and forms the backbone of many other quantum algo- rithms. It has an important application when in a physical implementation W gets replaced by U due to some unavoid- able error. The algorithm succeeds as long as U and U can be consistently implemented even when we do not know their precise form, making it intrinsically robust against cer- tain types of errors. In the case of quantum search, provided U W , there is not much of a slowdown, and hence almost any transformation is good enough. Quantum amplitude amplification often fails, however, when the selective phase inversions I t , I 0 are replaced by other selective transformations, say S t , S 0 . Consider the simple case when S t = R t = j e i jt j j and S 0 = R 0 = j e i j0 j j are the selective phase rotations of t and 0 states by angles and , respectively. The well-known phase-matching condition 4,5 demands - U for quantum amplitude amplification to succeed. This is a very strict condition for U 1, while the quadratic speedup is not of much use for large U . In fact, systematic phase mis- matching i.e., - U is known to be the dominant gate imperfection in implementing quantum amplitude amplifica- tion, posing an intrinsic limitation to the size of the database that can be searched 6. In this work, we show that a successful quantum search can be obtained with almost any selective transformation S t , S 0 , provided their inverse transformation S t , S 0 are also available. This is useful in situations where the errors are reproducible i.e., every time we ask for the transforma- tion A the system implements the transformation B as well as reversible i.e., whenever we ask for the transformation A the system implements the transformation B . For in- stance, such systematic errors arise when there is incorrect * [email protected] PHYSICAL REVIEW A 78, 022332 2008 1050-2947/2008/782/0223327 ©2008 The American Physical Society 022332-1

Upload: avatar

Post on 20-Feb-2017

213 views

Category:

Documents


0 download

TRANSCRIPT

Quantum computers can search rapidly by using almost any selective transformation

Avatar Tulsi*Department of Physics, Indian Institute of Science, Bangalore-560012, India

�Received 3 January 2008; published 22 August 2008�

The search problem is to find a state satisfying certain properties out of a given set. Grover’s algorithmdrives a quantum computer from a prepared initial state to the target state and solves the problem quadraticallyfaster than a classical computer. The algorithm uses selective transformations to distinguish the initial state andtarget state from other states. It does not succeed unless the selective transformations are very close to phaseinversions. Here we show a way to go beyond this limitation. An important application lies in quantum errorcorrection, where the errors can cause the selective transformations to deviate from phase inversions. Thealgorithms presented here are robust to errors as long as the errors are reproducible and reversible. Thisparticular class of systematic errors arises often from imperfections in the apparatus setup. Hence our algo-rithms offer a significant flexibility in the physical implementation of quantum search.

DOI: 10.1103/PhysRevA.78.022332 PACS number�s�: 03.67.Ac, 03.67.Lx, 03.67.Pp

I. INTRODUCTION

Suppose we have a set of N items j=0,1 ,2 , . . . ,N−1, anda binary function f�j� which is 1 if j satisfies certain proper-ties �e.g., if it is a solution to a certain computational prob-lem� and 0 otherwise. Let T be the set of M items, for whichf�j�=1, i.e., T= ��j�f�j�=1� and �T�=M. Consider the situa-tion when the items are not sorted according to any property,but f�j� can be computed by querying an oracle that outputsf�j� for any input j. The search problem is to find an elementof T �i.e., a solution� using the minimum number of oraclequeries. The best classical algorithm for this problem is torandomly pick an item j, use an oracle query to checkwhether j�T, and then repeating the process until a solutionis found. On the average, it takes O�N /M� oracle queries tosucceed, since M /N is the probability of the picked item tobe a solution.

In a quantum setting, Grover’s search algorithm �1� pro-vides a much faster way. The N items are encoded as basisstates �j� of an N-dimensional Hilbert space, which can berealized using n=log2 N qubits �without loss of generality,we assume N to be a power of 2�. The initial unbiased stateis chosen as the equal superposition state �1 /N� j�j�, gen-erated by applying the Walsh-Hadamard transformation Won �0�. The target state �t� can be any normalized state j�Taj�j� within the target subspace, since measuring �t� willalways give a solution. Grover’s algorithm obtains �t� byapplying O�N /M� iterations of the operator G=WI0WIt onW�0�. Here It= j�−1��jt�j��j� and I0= j�−1��j0�j��j� are theselective phase inversions of �t� and �0� states, respectively.Grover’s algorithm thus provides a quadratic speedup overthe classical algorithm, as each iteration of G uses one oraclequery to implement It.

Grover showed that his algorithm works even if theWalsh-Hadamard transform W is replaced by almost any uni-tary operator U �2�. In this case, the initial state U�0� is ageneral �not necessarily equal� superposition of the basisstates. The operator G=UI0U†It is iteratively applied to U�0�,

and the target state �t� is obtained after O�1 /�U� iterations,where �U= j�T�Uj0�2 is the projection of U�0� on the targetsubspace �for U=W, �W=M /N�. As the probability of get-ting a target state upon measuring U�0� is �U

2 , the target statecan be obtained classically by O�1 /�U

2 � preparations of U�0�and subsequent projective measurements. Hence, the quan-tum algorithm provides a quadratic speedup over this simplescheme by doing the same job in O�1 /�U� steps. This gen-eralization is known as quantum amplitude amplification�2,3�, and forms the backbone of many other quantum algo-rithms. It has an important application when in a physicalimplementation W gets replaced by U due to some unavoid-able error. The algorithm succeeds as long as U and U† canbe consistently implemented even when we do not knowtheir precise form, making it intrinsically robust against cer-tain types of errors. In the case of quantum search, provided�U�” �W, there is not much of a slowdown, and hence almostany transformation is good enough.

Quantum amplitude amplification often fails, however,when the selective phase inversions �It , I0� are replaced byother selective transformations, say �St ,S0�. Consider thesimple case when St=Rt

�= jei��jt�j��j� and S0=R0

= jei��j0�j��j� are the selective phase rotations of �t� and �0�

states by angles � and �, respectively. The well-knownphase-matching condition �4,5� demands ��−����U forquantum amplitude amplification to succeed. This is a verystrict condition for �U�1, while the quadratic speedup is notof much use for large �U. In fact, systematic phase mis-matching �i.e., ��−���” �U� is known to be the dominant gateimperfection in implementing quantum amplitude amplifica-tion, posing an intrinsic limitation to the size of the databasethat can be searched �6�.

In this work, we show that a successful quantum searchcan be obtained with almost any selective transformation�St ,S0�, provided their inverse transformation �St

† ,S0†� are

also available. This is useful in situations where the errorsare reproducible �i.e., every time we ask for the transforma-tion A the system implements the transformation B� as wellas reversible �i.e., whenever we ask for the transformationA† the system implements the transformation B†�. For in-stance, such systematic errors arise when there is incorrect*[email protected]

PHYSICAL REVIEW A 78, 022332 �2008�

1050-2947/2008/78�2�/022332�7� ©2008 The American Physical Society022332-1

calibration of the instrumentation. In the following, wepresent two algorithms in this category, one iterative and theother recursive.

In Sec. II, we consider the case of diagonal selectivetransformations, which rotate the phases of the desired statesby any amount �unlike the selective phase inversions thatchange the phase by �� but leave all the other �nondesired�states unchanged. We then construct an operator which yieldsa successful quantum search algorithm when iterated on theinitial state, and we show the algorithm to be optimal up to aconstant factor. This iterative algorithm does not work in thecase when diagonal selective transformations also perturb thenondesired states. In Sec. III, we design a recursive quantumsearch algorithm for such transformations provided they arenot too far off from the selective phase inversions. The algo-

rithm requires O�1 /�U1+O��t

2,�02�� queries, where �t= �St− It�

and �0= �S0− I0� are the distances of selective transforma-tions from the corresponding selective phase inversions, as-sumed to be small. It is straightforward to extend the abovetwo algorithms to situations where the selective transforma-tions are nondiagonal. We describe that in Sec. IV, togetherwith possible applications of our algorithms to quantum errorcorrection, quantum work-space errors, and bounded-errorquantum search.

II. ITERATIVE ALGORITHM

Consider those selective transformations �St ,S0� which ro-tate the phases of the desired states by arbitrary angles butleave all the other states unchanged. In the case of �0�, thereis only one desired state and S0=R0

�= I− �1−ei���0��0�. In thecase of �t�, there can be multiple target states and the rotationphase can be different for different target states, so St=Rt= je

i�j�jt�j��j�. If we iteratively apply the generalized quan-

tum amplitude amplification operator G=UR0�U†Rt on the

initial state U�0�, we will not succeed in getting a target stateunless the phase-matching condition is satisfied.

Instead, we iteratively apply a different operator T=UR0

−�U†Rt†UR0

�U†Rt on the initial state U�0�. It uses twooracle queries, one for Rt and another for Rt

†. It also uses

R0�†=R0

−� along with R0�. Thus, unlike G, it makes explicit use

of the inverse transformations �Rt† ,R0

†�. Observe that T is aproduct of two selective phase rotations: UR0

−�U† is a rota-tion by −� of the state U�0�, and Rt

†UR0�U†Rt is a rotation by

� of the state Rt†U�0�. We therefore have

T = UR0−�U†R�

� , ��� Rt†U�0� . �1�

Let �� be a normalized state orthogonal to ��� in the two-dimensional subspace spanned by U�0� and ���, such that upto an overall phase

U�0� = cos ��� + sin �� = cos Rt†U�0� + sin �� . �2�

For a general vector �a ,b�=a���+b�� in this subspace, wehave

T�a,b� = UR0−�U†R�

��a,b� = UR0−�U†�aei�,b� . �3�

If zaei�,b= �1−e−i���0 �U†�aei� ,b� then we have

T�a,b� = �aei� − zaei�,b cos ,b − zaei�,b�sin � . �4�

Hence, T preserves this two-dimensional subspace. For anyvector within this subspace, we can also write R�

�=ei�R−�,

and so T is equivalent to UR0−�U†R

−� up to an overall phase,i.e.,

T � UR0−�U†R

−�. �5�

The above operator is a special case of the generalized quan-tum amplitude amplification operator with �� as the effectivetarget state. It satisfies the phase-matching condition by con-struction. One may wonder that the phase-matching condi-tion is not satisfied in the form T=UR0

−�U†R�� as ��−� in

general. But the phase-matching condition was derived as-suming �U�1, and it cannot be used with ��� as the effec-tive target state because ���U�0�= �0�U†RtU�0� is close to 1.That is why we converted R�

� to R−�.

Now applying T on the initial state U�0� rotates it towardthe state �� by an angle 2 sin�

2 �7�. After n iterations of T,we get

TnU�0� = cos n��� + sin n��, n = �1 + 2n sin�

2� .

�6�

For n= �� / �4 sin�2 ��, n is close to � /2 and TnU�0� is close

to ��. Further iterations of T rotate the state away from ��,displaying a cyclic motion in the two-dimensional subspaceas in case of Grover’s algorithm.

To understand the significance of the state ��, we use theexpansions U�0�= jUj0�j� and Rt

†U�0�= jUj0e−i�j�jt�j� in Eq.�2�, and obtain

�� =1

sin

j

Uj0�1 − cos e−i�j�jt��j� . �7�

Here, cos = ��0�U†RtU�0��= � j�Uj0�2ei�j�jt�, and since j�T�Uj0�2=�U

2 , we have the bound cos �1−2�U2 or ��

�2�U. Hence, �j ��=Uj0O��U� for j�” T, and the projectionof �� on the nontarget subspace is j�” T��j ���2=O��U�.This projection is very small, which makes �� almost a statein the target subspace, i.e., j�T��j ���2=O��U�.

The number of queries needed to reach the state �� istwice the number of iterations of T, as each iteration usestwo queries. We therefore have Q=� / �2 sin�

2 �. The normal-ization condition for Eq. �7�, �� ���=1, gives

sin2 = �1 − cos �2 + j�T

4�Uj0�2 cos sin2� j

2. �8�

For small , this yields = j�T4�Uj0�2 sin2 � j

2 , and

Q =�

4 sin�2 j�T

�Uj0�2 sin2 � j

2

. �9�

For later reference, we point out that the state �� is close tothe target state only because =O��U�. That is true for the Rttransformations which act only within the target subspace,but may not be true for general selective transformations Stwhich perturb nontarget states also. More generally, Eq. �7�

AVATAR TULSI PHYSICAL REVIEW A 78, 022332 �2008�

022332-2

provides j�T��j ���2=O��U

�, and the iterative algorithmcan amplify the projection on the target subspace by a maxi-mum factor of 1 /. That may be too small for a generalselective transformation to reach a target state. In Sec. III, weuse the idea of recursion to overcome this limitation.

A. Comparison with Grover’s algorithm

When �St ,S0�= �It , I0�, i.e., when �=� j =�, the operator Tis simply two steps of the quantum amplitude amplification

algorithm. To demonstrate the difference between T and G2

for general �St ,S0�, consider the situation where St=Rt�, i.e.,

rotation angle � is the same for all target states. Then T=UR0

−�U†Rt−�UR0

�U†Rt�, while G2=UR0

�U†Rt�UR0

�U†Rt�. The

quantum amplitude amplification algorithm succeeds in thiscase only if the phase-matching condition is satisfied, i.e.,��−����U. On the other hand, there is no such restrictionon our algorithm which succeeds using � / �4�U sin�

2 sin�2 �

queries. As Grover’s optimal algorithm takes � / �4�U� que-ries, the slowdown is only by the constant factor1 / �sin�

2 sin�2 �. As long as � ,� are not very small, not much is

lost, and hence, almost any selective transformation can beused for quantum search.

This particular case has been experimentally verified onan NMR quantum information processor �8�, which com-pares the performances of Grover’s and our algorithm forsmall �U and ���. The experimental data confirms the the-oretical prediction that our algorithm succeeds in getting thetarget state while Grover’s algorithm does not. In a moregeneral case, the rotation angle � j can be different for differ-ent target states and St=Rt= je

i�j�jt�j��j�. It is shown in Ref.

�9� that in this case, iterating the operator G=UR0�U†Rt am-

plifies only those target states which satisfy the phase-matching condition, i.e., for which �� j −��� �Uj0�. �If there

are no such target states, then iterating G will not succeed ingetting a target state.� The target state is obtained afterO�1 /�U� � iterations, where �U� = j: ��j−����Uj0��Uj0�2��U,and the algorithm suffers a slowdown by a factor �U /�U� .There is no such restriction on our algorithm and the fullamplitude along the target states can be utilized, irrespectiveof any phase-matching condition.

Quantum amplitude amplification is often described as arotation in the two-dimensional space spanned by the initialstate U�0� and the target state �t�. Here, we have providednew insight suggesting that it is better to interpret quantumsearch as a rotation in the two-dimensional space spanned bythe initial state U�0� and the oracle-modified initial stateRt

†U�0�. T is then the fundamental unit of quantum search

rather than G. The advantage of the operator T is that it usesthe selective transformations and their inverses in such a waythat the phase-matching condition is effectively satisfied toproduce a successful quantum search.

B. New search Hamiltonian

Grover’s algorithm is a digital algorithm in the sense thatit uses a discrete set of unitary operators and applies themsequentially on the initial state to reach the target state. Farhi

and Gutmann developed an analog version of the algorithm�10�, which shows that any initial state, when evolved undera particular search Hamiltonian for a certain amount of time,will evolve to the target state. Their search Hamiltonian isgiven by HFG=HU�0�+H�t�, where HU�0�= I−U�0��0�U† andH�t�= I− �t��t� are projector Hamiltonians. More generalsearch Hamiltonians have been presented subsequently byFenner �11�, and by Bae and Kwon �12�.

The algorithm developed above suggests a new searchHamiltonian

Hnew = HU�0� + HRt†U�0� = HU�0� + Rt

†HU�0�Rt. �10�

The second term of Hnew is just the first term but in a basisrotated by the oracle transformation Rt. Hnew can be analyzedthe same way as was done by Farhi and Gutmann, in thetwo-dimensional subspace spanned by U�0� and Rt

†U�0�.When evolved using Hnew for a certain amount of time, theinitial state becomes the state ��, which is very close to atarget state as shown.

Hnew has certain physical implementation advantagesover HFG. Consider the situation when implementation er-rors perturb HFG to �1−s�HU�0�+ �1+s�H�t�, i.e., one term isenhanced while the other gets reduced. Analyzing this per-turbed Hamiltonian as is done in Ref. �13�, it is easy to seethat one reaches a target state only if �s� O��U�. This isanalogous to the phase-matching condition, and as �U�1, itis a strict condition. There is no such restriction, however, onthe new search Hamiltonian as it is the sum of the same termin two different bases. For example, calibration errors remaineffectively the same for both terms, making Hnew robust withs=0.

III. RECURSIVE ALGORITHM

In this section, we consider those diagonal selective trans-formations �St ,S0�, which may also perturb the nondesiredstates, unlike the transformations �Rt ,R0� discussed in theprevious section, which leave them unperturbed. We assumethe perturbations to be small, i.e., �St− It�=�t and �S0− I0�=�0, where �t and �0 are small. More explicitly,

St = j

ei�j�j��j�, � j = �� jt + � j, �� j� � �t,

S0 = j

ei�j�j��j�, � j = �� j0 + � j, �� j� � �0. �11�

For such transformations, the iteration of operator US0U†Ston the initial state U�0� may not give us a target state. AsO�1 /�U� iterations of UI0U†It on U�0� give us a target state,it is easy to see that as long as ��t ,�0� O��U�, iterating theoperator US0U†St on U�0� will also bring us close to a targetstate. But when ��t ,�0��O��U�, the phase-matching condi-tion required for a successful quantum search may not besatisfied. Another way to see this is to analyze the eigenspec-trum of US0U†St. Its distance from UI0U†It is O��t ,�0�. Thetwo eigenvalues of UI0U†It, relevant for quantum search, areseparated by O��U�. A perturbation greater than O��U� will,in general, shift them too much to maintain a successful

QUANTUM COMPUTERS CAN SEARCH RAPIDLY BY USING… PHYSICAL REVIEW A 78, 022332 �2008�

022332-3

quantum search. Note again that we are considering �U�1,which makes the iterative quantum amplitude amplificationvery sensitive to small errors.

The recursive quantum search algorithm is defined, at themth level, by the relation

Um�0� = Um−1S0Um−1† StUm−1�0� , �12�

with U0 U. At the first level, U1�0�= �US0U†St�U�0�is a simple generalization of the quantum amplitudeamplification step GU�0�. But at higher levels, the operatorsUm involve �St ,S0�, as well as �St

† ,S0†�, and cannot be

expressed using repeated iterations of a single operatorsuch as G. �For instance, U2=U1S0U1

†StU1=US0U†StUS0U†St

†US0†U†StUS0U†StU involves operators S

and S† in a nonperiodic pattern.� The idea of recursive quan-tum search is not new. It has been used by Hoyer et al. �14�and by Grover �15� for specific error models, as discussed inthe next section. What is new here is the demonstration thatrecursion works even for general errors.

The number of queries used at the mth level of recursionis determined by the relation qm=3qm−1+1, since qm−1 is thenumber of queries used by Um−1 and St needs one extraquery. Using the fact that q0=0 �as implementing U does notneed any query�, we get

qm =3m − 1

2= � �3m� . �13�

The recursive algorithm increases the number of queries in ageometric progression with the level number, a factor of 3 inthe present case. On the other hand, the iterative algorithmincreases the number of queries in an arithmetic progressionwith the iteration number, a step of 2 in the algorithm of theprevious section. We will see that the larger jumps in theallowed number of queries for the recursive algorithm arenot a major disadvantage, because the total number of que-ries needed to obtain the target state remains about the same.�The worst case overhead is a tolerable factor of 3 in thenumber of queries.�

At the first level, the initial state U�0� evolves to U1�0�,whose projection on the target subspace is �U1= j�T��U1� j0�2. In recursive quantum search, what mattersis the amplification factor

� =�U1

�U=

j�T

��U1� j0�2

j�T

�Uj0�2, �14�

and the target state can be obtained using O�1 /�Ulog� 3� que-

ries. To get the nearly optimal algorithm, the amplificationfactor � should be as close to 3 �the number of U-type op-erators used by U1� as possible. We will show that for small��t ,�0�, � is indeed close to 3, and the performance of therecursive algorithm is close to the optimal algorithm thattakes O�1 /�U� queries.

We estimate � by estimating the ratio � j = ��U1� j0 /Uj0� forj�T. In terms of � j, we have

� =j�T

� j2�Uj0�2

j�T

�Uj0�2. �15�

Clearly, if � j is close to 3 for each j�T, then � is also closeto 3. To find � j, let

��� = StU�0� = j

Uj0ei�j�j� , �16�

so that U1�0�=US0U†���. We decompose S0 as S0=S0�R0�0,

where S0�= �0��0�+ j�0ei�j�j��j� leaves the �0� state un-changed but acts like S0 on all the other states, and R0

�0 is aselective phase rotation of the �0� state.

We have U1�0�=US0�U†UR0

�0U†���. With UR0�0U†���

= ���− �1−ei�0��0�U†���U�0� and 1−ei�0 =2ei�0/2 cos�0

2 , weget

U1�0� = US0�U†���� , �17�

where

���� = j

Uj0�ei�j − 2ei�0/2 cos�0

2���j� . �18�

Here, �= �0�U†���= j�Uj0�2ei�j. As � j =�� jt+� j, the bound�� j���t gives

�1 − Re���� � 0.5�t2 + 2�U

2 , �Im���� � �t. �19�

Since �t2 and �U

2 are small, we can write �= ���ei�, where�����t. Then

���� = j

Uj0ei�j�1 − 2�− 1��jt��ei�j���j� , �20�

where ��=cos�0

2 ��� and � j�=�−� j +�0

2 . The bounds on �, �,�0, and � j give

�1 − ��� � 0.5�t2 + 0.125�0

2 + 2�U2 ,

�� j�� � 2�t + 0.5�0. �21�

Using Eq. �20�, we get ��j ���� /Uj0� j�T= �1+2��ei�j��. Thebounds on �� and � j� then yield

�3 − � �j����Uj0

��j�T

�7

3�t

2 +2

3�t�0 +

1

3�0

2 + 4�U2 . �22�

Special case. Consider the situation S0=R0�0, i.e., S0�= I. In

this case U1�0�= ����, and we have � j = ��j ���� /Uj0�, whichobeys the bound �22� for j�T. Using Eq. �15�, we get

�3 − �� �7

3�t

2 +2

3�t�0 +

1

3�0

2 + 4�U2 . �23�

Thus the projection on the target subspace is amplified by afactor close to 3 as �t, �0, and �U are small quantities. Themain idea behind recursion is to note that the above analysisholds for any unitary operator U, and hence it also holds forU1, which is a unitary operator. Therefore, U2=U1S0U1

†StU1will obey

AVATAR TULSI PHYSICAL REVIEW A 78, 022332 �2008�

022332-4

�3 − �2� = �3 −�U2

�U1

� �7

3�t

2 +2

3�t�0 +

1

3�0

2 + 4�U1

2 ,

�24�

where �U2= j�T��j�U2�0��2. Thus the projection on the tar-

get subspace is amplified again by a factor close to 3, makingthe total amplification close to 32=9. Continuing the process,the mth level of recursion gives �Um

=�l=1m �l�U, where �3

−�l��73�t

2+ 23�t�0+ 1

3�02+4�Ul−1

2 . As long as �Um

2 �1, thecomplete amplification factor obeys 3m��l=1

m �l��m, where

� � 3 −7

3�t

2 −2

3�t�0 −

1

3�0

2. �25�

This analysis shows that m levels of recursion can be usedfor amplifying the projection on target subspace to at least�Um

=O��m�U�. We can always choose m such that the con-dition �Um

2 =c�1 is satisfied, and then repeat the algorithmc−1 times to get a target state. The number of queries requiredby the algorithm to get a target state is, therefore, at mostqm=O�3log��1/�U��=O�1 /�U

log�3�. In other words, the querycomplexity of the algorithm is O��U

−�1+p��, with

0 � p = � ln 3

ln �− 1� � 0.71�t

2 + 0.20�t�0 + 0.10�02.

�26�

General case. For more general S0 transformations, thestate U1�0�=US0�U

†���� is not equal to ����. S0� is close toidentity, however, and �US0�U

†− I�= �S0�− I�=�0. Up to aphase factor, we have

�j�US0�U† = cos � j�j� + sin � j�xj� , �27�

where �xj� is a normalized vector orthogonal to �j�. As�US0�U

†− I�=�0, we have the bound �� j���0 so that sin � j�� j. Now

�U1� j0 = �j�US0�U†���� = cos � j�j���� + � j�xj���� . �28�

Using Eq. �20� for ����, we find the ratio � j to be

� j�T = � �U1� j0

Uj0�

j�T= �cos � je

i�j�1 + 2��ei�j�� + � j

�xj����Uj0

� .

�29�

As ����=UR0�0U†���, we have �����U�0��= ����U�0��= ���.

Hence, up to a phase factor,

���� = �U�0� + ��y�, � = 1 − ���2, �30�

where �y� is a normalized vector orthogonal to U�0�. The

bound on � �19� implies ���t2+4�U

2 . Equation �29� thenreduces to

� j�T = �C1j + C2j + C3j� ,

C1j = cos � jei�j�1 + 2��ei�j�� ,

C2j = � j��xj�U�0�

Uj0,

C3j = � j��xj�y�Uj0

. �31�

Since cos � j =1−O��02� and 1+2��ei�j�=3−O��t

2 ,�02 ,�t�0�

�as proved earlier�, we have �C1j��3 for small ��t ,�0�. Us-ing the definition �27� of �xj� and the bound � j ��0,

�xj�U�0� = Uj01 − cos � j

� j= Uj0O��0� , �32�

which makes C2j =O��02� and �C1j +C2j�=3

−O��t2 ,�0

2 ,�t�0�. The ratio � j�T will then be close to 3 ifand only if

�C3j� = � j�� �xj�y�Uj0

� � 3. �33�

By their definitions, the vectors �xj� and �y� depend upon theeigenvalues of S0 and St, respectively. In most cases, theeigenvalues of these two different operators are uncorrelated�in case they are correlated, we need to randomize one ofthem by random operations�, and hence �x� and �y� are tworelatively random unit vectors in the N-dimensional Hilbertspace. So, the expectation value of their inner product ��x �y��is 1 /N, and the above condition translates to

� j�

N� 3�Uj0� . �34�

As long as this condition is satisfied for all j�T, the ratio� j�T and the amplification factor � are close to 3. More pre-cisely,

� = 3 − O��t2,�0

2,�t�0� . �35�

If this condition is not satisfied for a particular target state j,then the amplitude along it will not be amplified by the re-cursive algorithm as if it were a nontarget state.

The condition �34� is only a sufficient, not necessary, con-dition for � to be close to 3. If it is satisfied for the first levelof recursion, then it is automatically satisfied for higher lev-els as �Uj0� ��Ul� j0� for any l. Also, even if this condition isnot satisfied, then amplification may still be possible by a

factor greater than 1, but not close to 3. Note that if � j or �is O�Uj0�, then the condition is satisfied. It can be shown thatthis is the case when either of St or S0 becomes a selectivephase rotation Rt or R0 �the special case discussed earliercorresponds to S0=R0�. Also, the condition is always satis-

fied for U=W as Wj0=1 /N and � j���0�t

2+4�U2 �1.

A. Comparison with Grover’s algorithm

When �St ,S0�= �It , I0�, the recursive algorithm reduces tothe iterative Grover’s algorithm and the optimal query com-plexity of O�1 /�U� is achieved. The state at the mth level ofrecursion Um�0� is nothing but �3m−1� /2 applications ofUI0U†It on the initial state U�0�. Explicitly, with It

†= It andI0

†= I0,

QUANTUM COMPUTERS CAN SEARCH RAPIDLY BY USING… PHYSICAL REVIEW A 78, 022332 �2008�

022332-5

Um+1 = �UI0U†It�qmUI0U†�It†UI0

†U†�qmIt�UI0U†It�qmU

= �UI0U†It�qmUI0U†�ItUI0U†�qmIt�UI0U†It�qmU

= �UI0U†It�3qm+1U .

With q0=0, Um= �UI0U†It��3m−1�/2U is just quantum ampli-tude amplification, except for the jumps in the number ofqueries.

In recursive quantum search, we are interested in the am-plification factor �=�U1

/�U of the projection on the targetsubspace, achieved by applying US0U†St to U�0�. Detailedeigenspectrum of US0U†St is not of much relevance, sincewhat matters is only one �rather than multiple� application ofUS0U†St. In general, the state US0U†StU�0�=UI0U†ItU�0�+ ���, where ��� has norm O��t ,�0�. � is certainly close to 3,when ��t ,�0��O��U�. What we have shown above is thateven when ��t ,�0��” O��U�, � can be close to 3. That isbecause what matters for � is not the norm of ��� but itsprojection on the target subspace, which can be small com-pared to �U, even when ��t ,�0��” O��U�.

The recursive algorithm needs O�1 /�U1+O��2�� queries,

with �=O��t ,�0� characterizing the size of errors. The in-crease in query complexity, due to nonzero �, is only a con-stant factor provided �=O�−1 / ln �U�. This is a much bet-ter performance than the quantum amplitude amplificationalgorithm, which needs �=O�1 /�U� for success. Further-more, the recursive algorithm can succeed even for larger �at the cost of more queries.

IV. DISCUSSION

Finally, we consider the situation when �I0 , It� are re-placed by nondiagonal operators �P ,Q�. The iterative algo-rithm then evaluates �UP†U†Q†UPU†Q�nU�0�. Using diago-nal decompositions of �P ,Q�, i.e., P=EPS0EP

† and Q=EQStEQ

† with S0 and St diagonal, that becomesEQ�VS0

†V†St†VS0V†St�nVEP

† �0�, where V=EQ† UEP. The algo-

rithm therefore converges to the target state in O�1 /�V�steps, provided �St ,S0� satisfy conditions for successfulquantum search and �EP�00, �EQ�tt are close to 1. The condi-tion �EP�00, �EQ�tt�1 is important for any search algorithm,because only then can we rightfully call the transformationsselective, performing an operation on the intended state andleaving the other states alone. Thus, as long as Vt0�” Ut0,there is no significant slowdown in quantum search.

Similarly, the recursive algorithm evaluates Um�0�=EQVmEP

† �0� at the mth level, with

Vm = Vm−1S0Vm−1† StVm−1. �36�

As before, the algorithm succeeds, provided �St ,S0� satisfyconditions for successful quantum search and �EP�00, �EQ�ttare close to 1.

Next we point out a few applications of our algorithms.�1� Correction of certain systematic errors: Quantum am-

plitude amplification is a repetitive application of the opera-tor G=UI0U†It. Small errors in G may accumulate over itera-tions to produce a large deviation at the end, causing thealgorithm to fail. Completely random errors have to be pro-

tected against, using the techniques of quantum error correc-tion and fault-tolerant quantum computation �16�. That addsredundancy to the quantum states and gates, i.e., extra re-sources, to overcome small errors. For errors exhibiting spe-cific structures, however, it is worthwhile to investigatewhether the dependence on quantum error correction can bereduced by designing quantum algorithms that are intrinsi-cally robust to these errors.

In this paper, we have studied a particular class of sys-tematic errors, those that are perfectly reproducible and re-versible. For an imperfect apparatus in this category, we havepresented two algorithms that exploit the structure of errorsand succeed in quantum search while the standard quantumsearch fails. These types of errors are not uncommon, e.g.,the errors arising from imperfect pulse calibration and offseteffect in NMR systems �8�. Thus our algorithms offer a sig-nificant flexibility in physical implementation of quantumsearch.

�2� Handling errors in work-space: The It transformationused in quantum search is implemented using an oracle. Atypical implementation uses an ancilla qubit initialized to the�0�−�1�

2state, and a CNOT gate applied to it from a Boolean

function f�j�. In general, f�j� has to be computed using thetechniques of reversible computation, and has to be uncom-puted afterwards to ensure reversibility. Inevitably, we needto couple our search-space to an ancilla work-space to imple-ment It, and the two get entangled. For a perfect algorithm,the work-space returns to its initial state at the end of thealgorithm, and the search-space and the work-space get dis-entangled. But when there are errors, the work-space maynot exactly return to its initial state, leaving some entangle-ment between the search-space and the work-space at theend. That deteriorates the performance of quantum search,and our algorithms come to the rescue in such cases.

Let H=Hs � Hw be the joint Hilbert space of the search-space and the work-space. The perfect oracle is It= j��j��j� f�j�=1 � �−I�+ �j��j� f�j�=0 � I�. In case of imperfectoracles, it may become Q= j��j��j� f�j�=1 � A+ �j��j� f�j�=0 � B�,where A ,B are unitary operators. First consider the case B= I, i.e., the work-space remains unaltered for f�j�=0. Withthe diagonal decomposition A=EASAEA

† , we have Q= j��j��j� f�j�=1 � EASAEA

† + �j��j� f�j�=0 � I�. That is equivalentto Rt of Sec. II, performing a selective phase rotation by �k

of the effective target state �j� f�j�=1 � �EA��k�� in H, where�EA��k�� is the eigenvector of A with the eigenvalue ei�k. Our

iterative algorithm would use T= UI0U†St†UI0U†St, where U

=U � I and I0 is the selective phase inversion of

�0�= �0� � �0w� with �0w� the initial state of the work-space. As

shown in Sec. II, iterating T leads us to a state �j� f�j�=1� ���, whose projection on the search-space is a target state.The number of queries depends on the eigenvalues of A, butit will be O�1 /�U� as long as the eigenvalues are away from1. The same result applies if the operator A is different fordifferent target states. Note that this is a much more relaxedcriterion than the phase-matching condition, which demandsthe eigenvalues of A to be within O��U� of −1.

When B� I as well, the iterative algorithm cannot take usto a target state and we have to use the recursive algorithm.

AVATAR TULSI PHYSICAL REVIEW A 78, 022332 �2008�

022332-6

The condition that �St− It� should be small, restricts A to beclose to −I �unlike the iterative algorithm, which allows amuch wider range of A� and B to be close to the identityoperator. For small errors in the work-space transformations,therefore, quantum search works and complete eliminationof the entanglement between the search-space and the work-space is not necessary.

�3� Bounded-error quantum search: Our recursive searchalgorithm is similar to the quantum search algorithm onbounded-error inputs by Hoyer et al. �14� �labeled HMWhenceforth�, except that our error model is much more gen-eral. HMW considered computationally imperfect oracles,which provide the correct value of f�j�, not with certainty,but with a probability close to 1. For instance, if j is a target�nontarget� state, the Boolean oracle may output 1 �0� with atleast a probability 9/10. We have considered physically im-perfect oracles, where the errors affect the unitary transfor-mations corresponding to the oracle. In particular, the algo-rithm by HMW �see facts 1 and 2 in Sec. 3 of �14�� usesfixed unitary transformations �S0�HMW, �S1�HMW �amplitudeamplification� and EHMW �error reduction�, with �S1�HMW re-placing the oracle It. Our algorithm applies to the situationwhere these unitary transformations themselves contain er-rors. We have shown that as long as the errors are small,quantum search is possible.

Indeed, the HMW error model can be reduced to our errormodel. The HMW oracle transformation O computes thevalue of f�j� using work-space qubits and stores it in a qubit.It takes the initial state jaj�j��0w��0� to jaj�j��pj�� j1��1�+1− pj�� j0��0��, where �� jb� ,b� �0,1� denote the work-space states. The probability pj is at least 9/10 if f�j�=1 andat most 1/10 if f�j�=0. Consider the operator GO=OI0O†S1O instead of only O, where S1 inverts the stateswith the last qubit �1� and I0 is the selective phase inversionof the �0w��0� state. The operator GO is an amplitude ampli-fication operator, and its eigenvalues are e�2ij with sin2 j= pj �3�. Hence, for f�j�=1�0�, the eigenvalues are close to−1�1�. This is similar to the work-space error model dis-cussed above, where �St− It� is small.

Moreover, if we assume that there are no errors in work-space transformations, our error model can also be reducedto the HMW error model. We simply attach a qubit to the

work-space in the �0�+�1�2

state. A controlled St transformationtakes the qubit to the state ��0�+ei�j�1�� /2, where ei�j areeigenvalues of St. A Hadamard gate then transforms the qubitto the state ei�j/2�cos

� j

2 �0�− i sin� j

2 �1��. Since � j =�f�j�+� jwith small �� j�, we obtain the HMW model.

The difference arises when the work-space transforma-tions of the HMW model also suffer from errors. To get ridof these errors, we cannot keep on attaching extra ancillaqubits until the new ancilla qubits are free of errors. Ourresults show that there is no need to worry about it, andrecursion works as long as the errors are small.

A peculiar feature of the HMW error model is that theimperfect oracle can be used to simulate an almost perfectoracle by making O�ln N� oracle queries. Thereafter, thestandard quantum search can be used. In our model, we can-not simulate It using St. In fact, we have shown that there isno need to simulate It; St is good enough for quantum searchas long as it is close to It. More importantly, our algorithmalso works when I0 is affected by errors, a case not consid-ered by HMW.

To conclude, we have presented two algorithms whichallow a significant flexibility in the selective transformationsused by quantum search. The iterative algorithm takes O�N�queries and requires the oracle to be neutral for nontargetstates. But the oracle may mark the target states by phasesother than phase inversion, and hence almost any oracletransformation is good enough for quantum search. The re-cursive algorithm tackles the situations when the oracle per-turbs nontarget states also. For error size �, it reaches atarget state using O�N�NO��2�� queries. Needless to say,errors are inevitable in any physical implementation of quan-tum search. As long as the errors are small, the algorithmswe have constructed are more robust and better adapted tophysical implementation than the standard quantum search.

ACKNOWLEDGMENTS

I thank Professor Apoorva Patel for going through themanuscript and for useful comments and discussions. I thankDr. Avik Mitra and Professor Anil Kumar for discussions onthe experimental implementation of the iterative algorithm.

�1� L. K. Grover, Phys. Rev. Lett. 79, 325 �1997�.�2� L. K. Grover, Phys. Rev. Lett. 80, 4329 �1998�.�3� G. Brassard, P. Hoyer, M. Mosca, and A. Tapp, Contemporary

Mathematics �American Mathematical Society, Providence,2002� Vol. 305, pp. 53–74; e-print arXiv:quant-ph/0005055.

�4� G. L. Long, Y. S. Li, W. L. Zhang, and L. Niu, Phys. Lett. A262, 27 �1999�.

�5� P. Hoyer, Phys. Rev. A 62, 052304 �2000�.�6� G. L. Long, Y. S. Li, W. L. Zhang, and C. C. Tu, Phys. Rev. A

61, 042305 �2000�.�7� G. L. Long, C. C. Tu, Y. S. Li, W. L. Zhang, and H. Y. Yan,

e-print arXiv:quant-ph/9911004.

�8� A. Mitra, A. Tulsi, and A. Kumar �unpublished�.�9� A. Tulsi, e-print arXiv:0806.1257.

�10� E. Farhi and S. Gutmann, Phys. Rev. A 57, 2403 �1998�.�11� S. A. Fenner, e-print arXiv:quant-ph/0004091.�12� J. Bae and Y. Kwon, Phys. Rev. A 66, 012314 �2002�.�13� J. Roland and N. J. Cerf, Phys. Rev. A 68, 062311 �2003�.�14� P. Hoyer, M. Mosca, and R. D. Wolf, Proceedings of the 30th

ICALP 03, Lecture Notes in Computer Science, Vol. 2719�Springer, New York, 2003�, pp. 291-299; e-print arXiv:quant-ph/0304052.

�15� L. K. Grover �private communication�.�16� J. Preskill, Proc. R. Soc. London, Ser. A 454, 385 �1998�.

QUANTUM COMPUTERS CAN SEARCH RAPIDLY BY USING… PHYSICAL REVIEW A 78, 022332 �2008�

022332-7