Quantum search of a real unstructured database

A simple circuit implementation of the oracle for Grover's quantum search of a real unstructured classical database is proposed. The oracle contains a kind of quantumly accessible classical memory, which stores the database.

Introduction.-Quantumcounterparts of some classical algorithms substantially speed up various computational tasks [1].In particular, the famous Grover search algorithm [2], which is a quantum counterpart of classical search, achieves a quadratic speed-up in terms of oracle queries.Namely, if N is the number of elements in a search space or a database, in the quantum case one should query the oracle only O √ N times, rather than O (N) times, as classically expected.Actually, there is some obscurity concerning the very notion of the quantumness in the context of the database [3], as well as the notion of the database in the context of quantum search [1,[4][5][6][7].As far as the notion of the database is concerned, one can conclude that there are actually two qualitatively distinct categories of databases [5][6][7]: the real (actual or explicit) database, which is a database in classical meaning, and the virtual (abstract or implicit) database, which is a search space.Roughly speaking, the real database corresponds to the data prepared in advance in a ready for use form, whereas the virtual one is not actually a true database at all.In the context of quantum search, most of the papers is devoted to the virtual database, instead in the present work we are concerned with quantum search of properly defined unsorted real databases.
More precisely, the aim of our work is to explicitly show that to find an element in a real quantum database, one actually needs only (exactly) log 4 N (with N = 2 2n ) oracle queries rather than O √ N , as expected in the context of generic quantum search.To this end, in the first step of our approach, referring to the above mentioned notion of the quantumness of the database, we introduce a simple general model of the real quantum database with clearly defined search tasks.In the second step, making use of Grover's search operation, we utilize a very effective quantum search algorithm for searching digitized quantum databases.
Finally, for illustrative purposes, we present a simple example of the real quantum database search, and next discuss some issues and possible generalizations.
Quantum database.-Thestarting point of the standard Grover search algorithm is the equal superposition state where H is the Hadamard operation, and N = 2 n is dimension of the Hilbert space (the number of elements in a search space or a database) [1].Next, as a result of repeated executions of the Grover operation G, the state |ψ goes towards the specified state |x o .
Obviously, from the perspective of the real database search, the result of such a search is trivial.In other words, as a real database, the database defined by |ψ is empty (a virtual database).For example [1], when we are given a map containing many cities, and wish to determine the shortest route passing through all cities on the map we start with the virtual database given by |ψ in (1).
For our purposes, a sufficiently general class of real quantum N-record databases is defined by the state where the index σ (x) is a permutation of the index x.Here, to assure (for simplicity) oneto-one relation between the both indices numbering the states, we have assumed that the second index is a permutation of the first one.In principle one could call the first index in (2) the address of the register, and the second one, the data (such a point of view has appeared in [8] in the context of the quantum RAM, and next applied in [9]), but symmetric treatment of the both indices in ( 2) is more natural, because there is no particular order of the components in the superposition (2), nor with respect to x, nor with respect to σ (x) (such a symmetric point of view has been assumed in [4]).
As a favorite example of the real database, we can take a (hotel) telephone directory, where the pair (x, σ (x)) represents the pair (telephone number, room number ).To find the room number σ (x o ) ascribed to the given telephone number x o according to the database This observation follows from the fact that we can apply Grover's operation exactly once to each digit in quaternary numeral system independently.Actually, in the language of 4-qudits, we have exactly only one quantum query per digit.Originally, the algorithm has been proposed in the context of the virtual database [10], whose digitization is unfortunately disputable (the algorithm has been invoked in [9] in the context of the quantum RAM).
Instead, since any real database is already (implicitly) digitized by construction, searches of 2 "address" qubits: 2 oracle selecting bits: 1 oracle qubit: 2 "searched" data qubits: real databases should be very efficient.
Let us suppose that we search for the index (directly identified with data) σ (x o ) corresponding to the given index (data) For each i = 1, . . ., n we define the oracle function, implemented by 2 classical bits (see Fig. 1), ) denotes the Grover operation corresponding to the oracle function ) , and let us define the search operation Since, on each step (defined by ) ) of the operation (4), the current number of the solutions equals one quarter of the current number of the vectors in the superposition, the number of the vectors in the superposition reduces exactly by the factor of 4, i.e.
When the procedure defined by ( 4) stops, we are exactly given the solution state which contains the data we are looking for, i.e. σ (x o ).Next, the result can be revealed by a measurement.
Example and generalizations.-Toillustrate the algorithm, we will give a simple example in terms of a hotel telephone directory containing 16 registers (i.e.n = 2 and N = 2 2n = 16).
Let us suppose that we are looking for the room number corresponding to the given telephone number 0001 encoded in the quantum database |Ψ below.Applying log 4 16 = 2 Grover's operations we obtain Thus, after 2 oracle queries (after 2 Grover's operations), instead of approximately √ 16 = 4 ones, as in the standard Grover search, we find (with absolute certainty) that the room number corresponding to the telephone number 0001 equals σ (0001), as expected according to the telephone directory |Ψ in (6).Here, σ (0001) is an actual number previously introduced to |Ψ according to real situation.
We can easily generalize the database (2) to an (r + 1)-attribute quantum database where r = 1, 2, . .., and for r = 0, |Ψ 0 ≡ |ψ defined in (1).In particular, r = 0 corresponds to the virtual database, whereas r = 1 corresponds to the real database given in (2), i.e.In the definition (2) (as well as in ( 7)) the simplifying technical assumption that the second index (other indices) is a permutation of x could seem restrictive and unrealistic (the hotel room numbers could start from 0001 instead of 0000).Actually, this restriction is necessary, because the domain of the indices should be exactly 0, 1, . . ., 4 n − 1.Otherwise, some quaternary digits would be missing in (2), and consequently the 4-qudit-wise Grover searches would be ineffective.To solve the problem, one can simply appropriately enlarge the database introducing some fictitious data corresponding to the previously missing indices (e.g.new telephone and room numbers could be 000000, 000001, . .., 111111).Since the search is very effective, the expected cost we pay searching a larger database including useless data should not be high.
Another potential difficulty appears when the relations are not one-to-one.To solve that problem, one can further enlarge the database, introducing additional auxiliary marks appropriately distinguishing the data that are not in one-to-one relation (see [4,9]). to the algorithm proposed in [10] in the context of the virtual database our approach is purely unitary.More precisely, no measurement is present on any intermediate step of our procedure.As a result, not only is our approach clearer and simpler, but also data can possibly be unitarily further processed or recycled.

Figure 1 :
Figure 1: A schematic quantum circuit for the quantum search algorithm G (x o ) of the unsorted real quantum 4 n -register database |Ψ defined in (2).(a) The block scheme of the circuit for 2n qubits (a parallel array of the blocks of the type described in (b)).(b) The scheme of the block i in (a).The internal structure of the block G in (b) is given in Box 6.1 of[1], where one of the 4 quantum oracles is selected by 2 classical bits.

|Ψ 1 =
|Ψ .More formally, in a (single) table-based format of the simplest relational model (flat file model) of the quantum database, |Ψ r represents the body of the database with r + 1 attributes, N is the number of the registers, and the tensor products entering(7) are the (r + 1)-tuples.
Conclusions.-Recapitulating, in the present work we have proposed a consistent set-up consisting of a properly defined unsorted real quantum database and a very efficient search algorithm with only (exactly) log 4 N oracle queries (N = 2 2n ), with 100 % success rate.The search algorithm utilizes n Grover's operations acting 4-quidit-wise on the data.Contrary [10]tum search.-In the context of the virtual database, it has been observed that mere digitization of the quantum database is sufficient for a very efficient search with only (exactly) log 4 N number of queries[10](where N = 2 2n , for simplicity) and with 100 % success rate.
|Ψ , we can perform the standard Grover search procedure, and after O √ N Grover's operations (after O √ N oracle queries) hope to obtain the state (or a state very close to) |x o ⊗ |σ (x o ) , where the room number σ (x o ) corresponds (possibly, only with high probability) to the phone number x o .