Optimal Database Search: Waves and Catalysis

Grover's database search algorithm, although discovered in the context of quantum computation, can be implemented using any system that allows superposition of states. A physical realization of this algorithm is described using coupled simple harmonic oscillators, which can be exactly solved in both classical and quantum domains. Classical wave algorithms are far more stable against decoherence compared to their quantum counterparts. In addition to providing convenient demonstration models, they may have a role in practical situations, such as catalysis.

The algorithm evolves |s towards |t , by discrete rotations in the two-dimensional space formed by |s and |t , using the two reflection operators, U t is the binary oracle which flips the sign of target state amplitude, while −U s performs the reflection-inthe-mean operation. Solution to Eq.(3) determines the number of queries as (2Q + 1) sin −1 (1/ √ N ) = π/2 . (4) * Electronic address: E-mail: adpatel@cts.iisc.ernet.in (In practice, Q must be an integer, while Eq.(4) may not have an integer solution. In such cases, the algorithm is stopped when the state has evolved sufficiently close to, although not exactly equal to, |t . Then one finds the desired item with a high probability.) In the qubit implementation of the algorithm, one chooses N = 2 n and the items in the database are labeled with binary digits. Using a uniform superposition as the starting state, (H is the Hadamard operator), the implementation requires only O(log 2 N ) spatial resources [1]. It has been proved that this is the optimal algorithm for unsorted database search [2].
Several variations of this algorithm have been studied, using different physical realizations of the database items and the target query oracle. In the original algorithm, the states are encoded in an n-qubit register, and the oracle is a discrete binary operation (denoted by U t above). In the analogue version of the algorithm, the discrete unitary oracle is traded for a continuous time interaction Hamiltonian (it evolves the target state somewhat differently than the rest) that acts for the entire duration of the algorithm, and the number of queries is replaced by the time one has to wait for before finding the target state [3]. The wave version of the algorithm requires N distinct wave modes, instead of n qubits, but does not involve quantum entanglement at any stage [4]. Such a wave search has also been experimentally implemented using classical Fourier optics, with a phase-shift plate providing the oracle [5]. A classical coupled pendulum model of the analogue version of the algorithm has been described, where one of the pendulums is slightly different from the rest and the uniform superposition state |s is identified with the center-of-mass mode [6]. In what follows, I describe a binary oracle version of the wave search algorithm using identical coupled harmonic oscillators.

II. HARMONIC OSCILLATOR IMPLEMENTATION
A system of coupled harmonic oscillators is frequently studied in physics. It involves only quadratic forms, and hence can be solved exactly in both classical and quantum domains. This property makes it extremely useful in situations where cross-over between classical and quantum behaviour is to be analyzed. We shall first look at the classical system, and then observe that the quantum system essentially follows the same pattern.

A. Classical oscillators
Let the items in the database be represented by N identical harmonic oscillators. While they are oscillating in a specific manner, someone taps one of the oscillators (i.e. elastically reflects it by touching it). The task is to identify which of the oscillators has been tapped, without looking at the tapping. The optimization criterion is to design the system of oscillators, and their initial state, so as to make the identification as quickly as possible.
Grover's algorithm requires identical coupling between any pair of oscillators. This can be accomplished by coupling all the oscillators to a big oscillator, as shown in Fig.1. The big oscillator then becomes an intermediary between any pair of oscillators, with the same strength, since it is coupled to the center-of-mass mode. The Lagrangian for the whole system is With the center-of-mass displacement, x ≡ N i=1 x i /N , the Lagrangian can be rewritten as Ã Å Now we can fix the oscillator parameters to implement Grover's algorithm. In the algorithm, we are interested in the dynamics of the tapped oscillator. All the other oscillators (i.e. i = t) influence the dynamics of x t only through the combination x. The dynamics of (N − 2) linearly independent modes orthogonal to x t and x (they all have the form (x j =t −x k =t )) decouples from the modes of interest; we can drop them and effectively work in the 3-dimensional space of the modes {X, x, x t }. (In what follows, we shall first specify initial conditions such that all x i =t are identical and all the decoupled modes vanish. Subsequently, we will look at the general situation by adding back all the decoupled modes.) Choosing units of mass and time such that m = 1, k = 1, and in terms of the variables the effective Lagrangian becomes The potential energy terms in L eff are easily diagonalized, and yield the eigenvalues The corresponding eigenmodes are The initial uniform superposition state can be realized as all the oscillators moving together, while the big oscillator is at rest.
(We will consider situations with general initial conditions later.) The reflection operators correspond to shifting the appropriate oscillator phases by half a period.
The binary tapping oracle flips the sign of the target oscillator velocity, when its displacement is zero.
The binary tapping oracle can be realized as the elastic reflection illustrated in Fig.2. That implements U t in the velocity space, by reversing the target oscillator velocity at the instance when all the displacements vanish. Time evolution of the coupled oscillators redistributes the total kinetic energy, and that can implement the operator U s with a suitable choice of time interval and frequencies.
With the natural frequency of individual oscillators ω = k/m = 1, the reflection-in-the-mean operation requires ω ± to be rational numbers. Optimization means that they should be selected to make the dynamics of the whole system of oscillators have as small a period as possible. The solution is not unique. One set of solutions is (p is a positive integer) In these cases, in the absence of oracles, the dynamics of the whole system of oscillators has the period, T = 4π. The big oscillator returns to its initial rest state (X = 0,Ẋ = 0), whenever t is an integral multiple of 2π, i.e. after every half a period. Time evolution for the same interval of half a period reversesẋ, while leavinġ x t −ẋ unchanged, i.e. it implements the operator U s in the velocity space. Thus Grover's algorithm, Eq.(3), can be realized by applying the tapping oracle at every time interval ∆t = 2π.
A more interesting set of solutions is , K = 0 .
(14) In these cases, the big oscillator is not coupled to any support, and e − becomes a translation mode for the whole system of oscillators. The translation mode can be eliminated from the dynamics with the initial conditions Then, in the absence of oracles, the dynamics of the whole system of oscillators has the smallest possible period, T = 2π. After half a period, the big oscillator is back to its initial state,ẋ also returns to its initial value, whileẋ t −ẋ changes its sign. This is equivalent to applying −U s in the velocity space, and Grover's algorithm can be implemented by tapping the target oscillator at every time interval ∆t = π.
There is an important physical distinction between the quantum and the wave interpretations of the amplitude amplification process in Grover's algorithm-quantum probability is mapped to wave energy. The enhancement of the quantum amplitude increases the probability of finding the target state N -fold, while the enhancement of the wave amplitude increases the energy of the target oscillator N -fold. The well-known phenomenon of "beats" is responsible for energy transfer amongst coupled oscillators. The elastic reflection oracle does not change energy, and it is interesting to observe that the oscillator which is obstructed by tapping picks up energy.

B. Stability considerations
Now we can look at the behaviour of the wave implementation under general circumstances. First consider the initial conditions. Despite appearances, precise synchronization of oscillators is not an issue in the algorithm, because of the explicit coupling to the center-of-mass mode. For instance, the algorithm can be started off with an initial push to the big oscillator,Ẋ = B,ẋ i = 0, and the system of oscillators would evolve to the stagė X = 0,ẋ i = A. Furthermore, any arbitrary distribution of initial velocities of oscillators can be accommodated in the analysis by bringing back the (N − 2) decoupled modes. The decoupled modes have no effect whatsoever on the dynamics of the {X, x, x t } modes. Consequently, the algorithm is only modified to the extent that the energy amplification of the target oscillator is limited to the initial energy present in the {X, x, x t } modes, instead of being N -fold. Explicitly, the maximum gain is which can be substantial for the generic situation where the initialẋ t andẋ are of the same order of magnitude.
To extract the maximum gain, the algorithm must be stopped at a precise instant (i.e at a precise value of Q); otherwise the evolution continues in repetitive cycles. The state evolution in Grover's algorithm is a uniform rotation in the two dimensional |s -|t subspace. The average overlap of the target state, with the state |q(Q) after Q queries, is therefore | q(Q)|t | 2 av = sin 2 θ av = 1/2 .
Thus if the algorithm is stopped at a random instant, the energy gain on the average is half of its maximum value in Eq.(16)-which can still be substantially larger than 1.
Next consider the effect of damping [7]. The crucial ingredient in the algorithm is the coherence amongst the phases of the oscillators. That is governed by the frequencies of the oscillators, and is independent of the amplitudes. For a weakly damped oscillator, its amplitude changes linearly with the damping coefficient, while its frequency changes quadratically. The time evolution of the above implementation, therefore, remains essentially unaffected if the oscillators experience a small damping. The leading effect is a decrease in the energy amplification due to decaying amplitudes.
Among other variations, simultaneous scaling of masses and spring constants of the oscillators (i.e. m i = α i m and k i = α i k) does not alter the algorithm at all, since the scale factors can be absorbed by redefining x i . One can also contemplate some changes of global conditions that let the algorithm go through but change its physical interpretation. For example: (i) Application of simultaneous tapping oracle to more than one oscillator (with suitable changes in M and K) can focus the energy into the tapped oscillators. (ii) Interchange of initial and final states can run the algorithm backwards, whence the large initial energy of the target oscillator gets uniformly distributed among all oscillators. (iii) Elastic reflection of all but the target oscillator implements the oracle −U t in the velocity space, in which case it is the unobstructed oscillator that picks up energy.

C. Quantum domain
The dynamics of harmonic oscillators is simple enough to permit exact quantum analysis as well. It is convenient to interpolate between classical and quantum domains using the coherent state formulation [8]. Coherent states are superpositions of the eigenstates, parametrized by a single complex variable α, They describe Gaussian wavepackets with minimal spread (i.e. displaced versions of the ground state eigenfunction), A coherent state with the initial condition α(t = 0) = α 0 has energyhω(|α 0 | 2 + 1 2 ), and the centre of its wavepacket performs the same simple harmonic motion as a classical particle would: The wavefunction of the state evolves according to while the explicit structure of the wavepacket is given by Thus the analysis of Section II.A can be carried over unchanged to the quantum domain, provided we can figure out how the tapping oracle works for the coherent states. The tapped oscillator corresponds to a particle moving in the half-oscillator potential The impenetrable wall at x = 0 is equivalent to enforcing the boundary condition ψ(x = 0) = 0. So the eigenstates of the half-oscillator are the same as those for the harmonic oscillator, with odd n. It is straightforward to ensure the node at x = 0 using the method of images, and the tapped oscillator coherent states become with the normalization constant C = (1 − e −2|α| 2 ) −1/2 . Tapping amounts to change-over between |α and | − α , which reverses x and p compared to the untapped motion. In addition, the wavefunction changes sign, which is the geometric phase corresponding to wave reflection. The evolution of a coherent state wavepacket undergoing reflection from the wall is depicted in Fig.3.

III. POSSIBLE APPLICATIONS
The oscillator based search process discussed above has the same algorithmic efficiency as the proposals of Refs. [4,5,6]-where it differs from them is in the actual physical implementation. Wave algorithms are classical, but they have not been explored much historically. The main reason is that they require exponentially more spatial resources compared to their digital counterparts,  (log 2 N ). On the other hand, they can reduce the number of oracle calls by exploiting superposition of states. Note that no algorithm based on Boolean logic, either with serial or with parallel implementation, can reduce the number of oracle calls for an unsorted database search to less than O(N ).
Quantum algorithms are superior to wave algorithms, because they can use superposition as well as reduce spatial resources. The reduction of spatial resources, however, comes with the cost that quantum algorithms have to work with entangled states. Quantum entanglement is far more sensitive to decoherence caused by environmental disturbances than mere superposition, and that has made physical implementations of quantum algorithms very difficult. On the other hand, superposition of classical waves can be fairly stable, even when a small amount of damping is present, and that can make wave implementations advantageous in specific physical contexts.
These comparisons suggest that wave algorithms fall in a regime inbetween classical and quantum algorithmsmore efficient than the former and more robust than the latter. They are likely to be useful in practical situations, where N is not very large and environmental disturbances are not negligible. Indeed it is worthwhile to systematically explore them, just like randomized algorithms have been [9].
In the specific case of the unsorted database search problem, the remarkable simplicity of the oscillator implementation makes one wonder about possible applications, besides constructing convenient demonstration models. The implementation of Ref. [6] has one oscillator with a frequency different from the rest, which gets singled out by dynamical evolution of the coupled system. In the present scenario, all oscillators are identical, but one of them is discretely tapped by an external agency and gets selected. I point out a physical situation below, that can fit such a scenario, and where involvement of new mechanisms can enhance our understanding of the observed phenomena.

A. Catalysis
The practically useful property of the wave search algorithm is that it focuses energy into one of the oscillator modes. There exist a large number of chemical reactions which, although not forbidden by energy conservation, are extremely slow because they have to pass through an intermediate state of high energy. In these reactions, the dominant term governing the reaction rate is the Boltzmann factor, exp(−E b /kT ), with the barrier energy in the exponent. Only a tiny fraction of the molecules in the tail of the thermal distribution are energetic enough to go over the barrier and complete the reaction. It is known that the rates of many such reactions can be enhanced by orders of magnitude by adding suitable catalysts (enzymes in case of biochemical reactions) to the reactants. The conventional explanation for the reaction rate enhancement, called transition state theory, is that the catalysts lower the energy of the intermediate state by modifying the chemical environment of the reactants.
The preceding analysis of the wave search algorithm suggests another mechanism for catalysis. Vibrations and rotations of molecules are ubiquitous harmonic oscillator modes. The catalyst can act as the big oscillator and focus energy of many modes into the reactant which faces the energy barrier. For example, the catalytic substrate can have many identical molecules of one reactant stuck to it and vibrating, the second reactant then comes drifting along and interacts with one of the stuck molecules, that molecule picks up energy from its neighbours and the reaction gets completed. In such a scenario, for maximum efficiency, the physical parameters (masses and spring constants) need to have specific values. But even without perfectly tuned parameters, there can be partial energy focusing that provides useful increase in the reaction rate. Whether this mechanism exists among the known catalysts, or whether we can design new type of catalysts that use this mechanism, is an open question.
The catalytic role of chemical environment vs. physical waves can be tested by isotopic substitution in the reactants, since isotopic substitution changes physical parameters without altering chemical properties. The conventional transition state theory has no mass dependence, so any isotope dependence of reaction rates is a signal of involvement of physical (in contrast to chemical) features in the process. Many examples of isotopic dependence of catalytic reaction rates have been discovered, and the effect is referred to as the "Westheimer effect" or the "kinetic isotope effect" [10]. The effect is the largest for substitution of hydrogen by deuterium, and has been extensively studied for the rupture of C-H/C-D bonds. The transition state theory has been found inadequate for theoretical understanding of the observations, and vibrationally enhanced quantum tunneling has been invoked as an alternative [11].
In this context, the oscillator based search process described above has two novel features to suggest yet another alternative: (i) The energy focusing mechanism enhances reaction rates beyond their naive classical values. This enhancement is both mass and temperature dependent, because the energy enhancement depends on the masses involved while the Boltzmann factor contains the temperature. (ii) The wavefunction sign-flip caused by reflection can switch between bonding and anti-bonding molecular orbitals, and thus help in the transfer of atoms. This feature is not related to either mass or temperature. It would be therefore worthwhile to explore the oscillator inspired catalytic mechanism with careful modeling of specific reactions.
In closing, I mention an intriguing possibility. I had constructed a quantum database search scenario for the DNA replication process, whose stumbling block was the maintenance of quantum coherence in presence of con-tinuous jostling of molecules [12]. It should be feasible to construct a wave database search scenario involving vibrational and rotational modes of the molecules. That would be far less troubled by decoherence effects, and make interpretation of the genetic language as optimal solution to the database search process likely.