---
abstract: 'Quite often in database search, we only need to extract portion of the information about the satisfying item. Recently Radhakrishnan and Grover \[RG\] considered this problem in the following form: the database of $N$ items was divided into $K$ equally sized blocks. The algorithm has just to find the block containing the item of interest. The queries are exactly the same as in the standard database search problem. \[RG\] invented a quantum algorithm for this problem of partial search that took about $0.33\sqrt{N/K}$ fewer iterations than the quantum search algorithm. They also proved that the best any quantum algorithm could do would be to save $0.78 \sqrt(N/K)$ iterations. The main limitation of the algorithm was that it involved complicated analysis as a result of which it has been inaccessible to most of the community. This paper gives a simple analysis of the algorithm. This analysis is based on three elementary observations about quantum search, does not require a single equation and takes less than 2 pages.'
author:
- 'Vladimir E. Korepin$^{1}$ and Lov K. Grover$^{2}$'
title:  Simple Algorithm for Partial Quantum Search
---

Database search is one of the few applications for which a fast quantum algorithm is known [@Grover]. The Grover algorithm has been shown to be optimal and cannot be improved even by a single query [@Zalka; @NC]. Therefore it is of great interest to find any circumstance under which we can improve the performance of the quantum search algorithm. The problem of partial database search is also of independent interest . For example when using Google to search the internet (which is a large database), we are typically interested in only some of the attributes of the entity being searched - e.g. while searching for a grocery store in the neighborhood, we may only want the address of the store, not its corporate information.

The concept of partial search was invented recently in [@jaik]. That was a surprising result because it gave a means for improving the quantum search algorithm with no knowledge of the problem structure, except of course the block nature. Unfortunately, that paper, though an important discovery, is mathematically, very rigorous and not accessible to most of the quantum information community. In this paper we set ourselves the task of designing a simple partial search algorithm that clearly brought out the nature of the algorithm.

The original Grover search algorithm is based on two operations: (i) selective inversion and (ii) inversion about average. We shall denote a selective inversion of the target, followed by an inversion about average, as a Grover iteration. Figure 1 depicts this sequence of two operations which is being used to search for a single target out of twelve items. In the original algorithm, it takes $({\pi}/{4})\sqrt{N}$ Grover iterations to locate the desired (target) item. The idea of partial search is a trade-off of precision for speed, i.e. we do not need the exact address of the target, but only the first several bits of it as illustrated in figure 2.

Let us consider a more general setup **$N$ items are divided into $K$ blocks of $b=N/K$ items each**. As in [@jaik], we do a partial search for the appropriate block. The following are the three conceptual steps of the algorithm:

-   Step 1: $\frac{\pi}{4}\sqrt{N}-\sqrt{\frac{3b}{4}}$ Grover iterations (global search).

-   Step 2: $\frac{\pi}{6}\sqrt{b}$ iterations of local searches in each block done in parallel. Note that this drives the amplitude negative in the target block.

-   Step 3: one global inversion about average annihilates amplitudes of all items in non-target blocks and finds the target block

So the total number of queries $\left(  Q\right)  $ is $$Q=\frac{\pi}{4}\sqrt{N}-\left(  \sqrt{\frac{3}{4}}-\frac{\pi}{6}\right)
\sqrt{b}.$$ The coefficient of $\sqrt{b}$ is $(\sqrt{3/4}-\pi/6)\approx0.34$ and so the improvement over quantum searching is $0.34\sqrt{b}$ iterations, just for reference the original algorithm of [@jaik] achieved a saving of $0.33\sqrt{b}$ iterations after considerably more work.

In order to see qualitatively, why the above procedure works and why this is the best we can do within this framework, consider the following argument based on three simple observations ((a), (b) & (c)):

a. Scattering out of a state -

:   If we start with all the amplitude in a single basis state, and apply $\eta$ iterations of Grover search, then the sum of the amplitudes in all $b$ states will be $\sqrt{b}\sin\frac{2\eta}{\sqrt{b}}$.

b. Going into a state

:   - If we stop the search algorithm $\eta$ iterations before it finds the target, then the sum of amplitudes in all $N$ states will be $\sqrt{N}\sin\frac{2\eta}{\sqrt{N}}$.$\ $In case $\eta<<\sqrt{N},$ this sum becomes $2\eta$.

c.  Zeroing the amplitudes in certain states

:   - If the amplitude in some state has to fall to zero after a Grover iteration (step 3 of our algorithm), the state should have an amplitude of two times the average before the iteration$.$

Working backward from the final result:

-   Assume $\eta$ iterations in step 2, and neglecting the initial iterations it takes for the amplitudes in the target block to come to zero, it follows by (a), that after step 2, the sum of the amplitudes in the target block should be $-\sqrt{b}\sin\frac{2\eta}{\sqrt{b}}$.

-   Therefore in order for step 3 to work, it follows by (c), the sum of the amplitude in all states (in non-target blocks), after step 1, should have been $2\sqrt{b}\sin\frac{2\eta}{\sqrt{b}}.$

-   Therefore by (b), the saving in step 1  is $\frac{1}{2}\times2\sqrt
    {b}\sin\frac{2\eta}{\sqrt{b}}$ Grover iterations$.$

-   This gives an overall saving of $-\eta+\sqrt{b}\sin\frac{2\eta}{\sqrt
    {b}}$ iterations. This function assumes its maximum value at $\eta=\frac{\pi
    }{6}\sqrt{b}$ which is $\sqrt{b}\left(  -\frac{\pi}{6}+\frac{\sqrt{3}}%
    {2}\right)  .$

Lower Bound
===========

It is relatively easy to find a lower bound for the total number of queries, $S$. Let us try to find the target by first locating the target block and then use Grover’s algorithm to find the target in the block. We know that it takes $(\pi/4)\sqrt{b}$ queries to find the target in a block. The overall number of queries should be greater than $({\pi}/{4})\sqrt{N}$ [@Zalka]. Therefore $Q+({\pi}/{4})\sqrt{b}\geq({\pi}/{4})\sqrt{N}$ . This gives a lower bound for $Q$ : $\ Q\geq ({\pi}/{4})\sqrt{N}-({\pi}/{4})\sqrt{b}.$The lower bound is rather obvious, the existence of an algorithm, that was discovered in [@jaik] that came so close to the lower bound was a lot more surprising.

Summary
=======

In the paper we have presented a simple algorithm for partial search of a database of $N$ items separated into $K$ blocks of $b$ items each, $N=Kb$. The saving in the run-time as compared to an exhaustive search, is slightly better than the original partial quantum search algorithm. However, the distinguishing feature is not the savings but its simplicity. Through three elementary observations about the Grover search algorithm, without a single equation, we derive one of the fastest possible search algorithms.

Acknowledgments
===============

Research was partly supported by NSA , ARO under contract no. DAAG55-98-C-0040.

[9]{}

L. K. Grover,  Quantum Mechanics helps in searching for a needle in a haystack, *Phys. Rev. Letters*, 78(2),  325, 1997.

M.A. Nielsen and I.L. Chuang: Quantum Computation and Quantum Information. Cambridge University Press (2000).

C. Zalka: Grover’s quantum searching algorithm is optimal. Phys. Rev. A60 (1999) 2746-2751.

L. K. Grover and J. Radhakrishnan, Is partial quantum search of a database any easier?, quant-ph/0407122.
