Skip to main content
Proceedings of the National Academy of Sciences of the United States of America logoLink to Proceedings of the National Academy of Sciences of the United States of America
. 2001 Aug 14;98(17):9490–9493. doi: 10.1073/pnas.171317798

Quantum optical implementation of Grover's algorithm

Marlan O Scully *,†,, M S Zubairy *,§,
PMCID: PMC55479  PMID: 11504938

Abstract

We present a scheme for a quantum optical implementation of Grover's algorithm based on resonant atomic interactions with classical fields and dispersive couplings with quantized cavity fields. The proposed scheme depends on preparation of entangled states and is within current state-of-the-art technology.


As was first shown by Grover (1), search of a database by using quantum mechanics can be substantially faster than any classical search of unsorted data. For example, it was shown by Grover that, by using quantum superpositions and quantum entanglement, we can find an object in an unsorted database containing N objects in O(Inline graphic) quantum mechanical steps instead of O(N) steps (13).

The implementation of search algorithms by using optical methods is a subject of intense interest (48), and Grover's search algorithm has been implemented by using nuclear magnetic resonance (NMR) techniques for a system with four states (911). However, NMR experiments for quantum computing are carried out at room temperature, and questions have been raised concerning the appearance of entanglement in the physical state at any stage of such experiments (12). Braunstein et al. show that “all states so far used in NMR for quantum computations or for other quantum-information protocols are separable,” and therefore “no entanglement appears in the physical states at any stage of present NMR experiments.”

In this paper, we propose a scheme for quantum optical implementation of Grover's algorithm that is not sensitive to such thermal decoherence effects. The scheme is based on resonant atomic interactions with classical fields and dispersive coupling with quantized cavity fields. We first formulate the problem in terms of a “circuit” logic involving one-bit unitary transformation and a two-bit quantum phase gate. For an atomic system, the one-bit unitary transformation is accomplished by means of resonant interaction with a classical field, whereas a quantum phase gate can be implemented by using dispersive coupling with a cavity field having either 0 or 1 photon. Such a quantum phase gate has been demonstrated recently [for a beautiful demonstration of quantum phase gate, see Rauschenbeutel et al. (13); conditional phase shifts are also demonstrated in Turchette et al. (14)]. The proposed scheme involving atomic interaction with classical field and two cavities therefore lies within present experimental limitations and should be realizable (15).

Grover proposed an algorithm to search an item in an unsorted database. The problem he addressed is as follows. We are given a function f(x) with x = 1, 2 … N. The function has the property that it is 0 for all values of x except for x0, for which f(x0) = 1. The task is to find x0. Classically, it would require an average of N/2 steps to accomplish this task. Grover showed that we can find x0 in O(Inline graphic) quantum mechanical steps instead of O(N) steps.

The basic idea of Grover's algorithm is to invert the phase (e.g., change + → −, as in the passage from Eqs. 6 to 8) of the desired basis state and then invert all the basis states about the average amplitude of all the states. In this paper, we restrict ourselves to the simplest interesting Grover's algorithm with N = 4 with two qubits. First, we discuss the implementation of Grover's algorithm in terms of quantum logic gates.

A universal quantum computer consists of only two gates, namely a unitary transformation (one-bit gate) and a two-bit conditional quantum phase gate. The one-bit quantum gate for the ith qubit is given by

graphic file with name M3.gif 1

A convenient representation of Uθ,φ in terms of Pauli spin matrices is given by

graphic file with name M4.gif 2

The transformation for a two-bit quantum phase gate is given by Qη|α, β > = exp(iηδα,1δβ,1)|α, β >, where |α > and |β > stand for the basis states |0 > or |1 > of the qubit. Thus, the quantum phase gate introduces a phase η only when both qubits in the input state are 1. In the following, we shall need the quantum phase gate only with η = π, for which we have

graphic file with name M5.gif 3

and because |0 >< 0| = (1 + σz)/2 and |1 >< 1| = (1 − σz)/2,

graphic file with name M6.gif 4

Grover's algorithm is accomplished in three steps. The initial state of the two qubits is |1, 1 >. In the first step, we apply the Walsh–Hadamard transformation,

graphic file with name M7.gif 5

which rotates each qubit from |0 > to (|0 > −|1 >)/Inline graphic and |1 > to (|0 > +|1 >)/Inline graphic. The resulting state is

graphic file with name M10.gif 6

In the second step, the unitary operator 𝒞α,β flips the sign of state |α, β > (α = 0 or 1 and β = 0 or 1). In the original Grover's algorithm, this is accomplished through operator (1 − 2|α, β > < α, β|). Here we follow a different approach. We first flip the sign of state |1, 1 > via a quantum phase gate Qπ, followed by unitary operators that either retain the state of the qubit or change the state of the qubit from 0 to 1 and 1 to 0. The sign flip operators for the four possible states in this approach are given by

graphic file with name M11.gif 7a
graphic file with name M12.gif 7b
graphic file with name M13.gif 7c
graphic file with name M14.gif 7d

Here the resulting state may have an unimportant overall phase factor.

At this point, the oracle applies one of the Cα,β operators to state 6 and thus changes one of the signs from + to −. For example, if C0,1 is chosen, then Eq. 6 becomes

graphic file with name M15.gif 8

It is now our job to find the marked state (|0, 1 > in the above example). This is accomplished by the application of operator 𝒩 = 1 − 2|s >< s|. The resulting state is the desired state |a, b > apart from an unimportant π phase shift. To find a representation for 𝒩 in terms of operators Uθ,φ and Qπ, we first note that

graphic file with name M16.gif 9

so that, from Eqs. 8 and 9, we have 𝒩C0,1|s >= −|0, 1 >. If we use the fact that rotating σz about the y axis yields σx, that is,

graphic file with name M17.gif 10

we note the remarkable fact that operator 𝒩 as given by Eq. 9 is the appropriately rotated quantum phase operator Qπ of Eq. 7b, i.e.,

graphic file with name M18.gif 11

This is the essence of Grover's algorithm and the departure point for our implementation of the algorithm.

On combining the various operators from Eqs. 5, 7, and 11, we can write Grover's algorithm in terms of simple transformations corresponding to one- and two-bit quantum gates as 𝒩𝒞α,β𝒲|1, 1 >= eiψ|α, β >, where ψ is a phase depending on the choice of α and β. These steps are summarized in the “circuit” diagram of Fig. 1 for the present (N = 4) implementation of Grover's algorithm. Only the one-bit unitary gates and two-bit conditional quantum phase gates are required for this purpose.

Figure 1.

Figure 1

Level diagram for the implementation of Grover's algorithm.

Next, we consider schemes for the implementation of Grover's algorithm on the basis of cavity quantum electrodynamics (1620), using resonant atomic interaction with classical Ramsey fields and dispersive atomic interaction with quantized high Q cavity fields. First, we present a scheme that requires two species of atoms and two cavities. This scheme is conceptually simple but difficult to implement. We then consider a second scheme that requires single species of atoms interacting with only one cavity that supports two modes, and the atomic level spacings are appropriately changed by electric or magnetic fields.

First, we consider the schematic for the proposed implementation as given in Fig. 2. The two qubits are represented by two different three-level atoms of types A and B (Fig. 2a). Levels |a > and |b > of these atoms represent qubits |0 > and |1 >, respectively. The levels scheme is such that ωa1b1 = ωc2b2 + Δ1 and ωa2b2 = ωc1b1 + Δ2. Cavities C1 and C2 are resonant with transitions ωa1b1 and ωa2b2, respectively. Here, and in the following, the odd subscripts 1, 3, 5, and 7 refer to the atom, cavity, and classical fields corresponding to the atoms of type A, whereas the even subscripts 2, 4, 6, and 8 refer to atoms of type B. Four atoms (two of type A and two of type B) pass through cavities C1 and C2 and a sequence of classical fields, as follows (Fig. 2b).

Figure 2.

Figure 2

(a) Atomic-level spacings for types A and B atoms. Here ωa1b1 = ωc2b2 + Δ1 and ωa2b2 = ωc1b1 + Δ2. (b) Schematics for the cavity quantum electrodynamics implementation of Grover's algorithm. Here all the atoms are initially in their ground states |b >, i.e., |b1, b2, b3, b4 >. After passage through the box corresponding to the Walsh–Hadamard transformation 𝒲, the state of the atoms is (|a1, a2 > +|a1, b2 > +|b1, a2 > +|b1, b2 >)/2 ⊗ |b3, b4 >. After passage through box 𝒞 corresponding to the oracle for, say, state |0, 1 >, the atomic state is (|b1 > ⊗|a3, a2 > −|a3, b2 > +|b3, a2 > +|b3, b2 >)/2 ⊗ |b4 >. Finally, after passage through box 𝒩 corresponding to the inversion about the average, the atomic state is |b1, b2 > ⊗|a3, b4 >.

All the atoms are initially in their ground states |b >, i.e., |b1, b2, b3, b4 >, and we assume that the classical Ramsey fields are on only when the appropriate atoms are passing through them. Atom 1 of type A and atom 2 of type B are initially in their ground states |b1 > and |b2 >, i.e., in qubits |1, 1 >. The Walsh–Hadamard transformation on these atoms is carried out by interacting with classical fields R1 and R2 of frequencies ωa1b1 and ωa2b2, respectively. The interaction of an atom with the classical field results in the unitary transformation (Eq. 1) on the atomic states |a > and |b >, such that θ depends on the Rabi frequency and the interaction time, and φ depends on the phase of the driving field (21, 22). We choose, for the interaction of R1 with atom 1 and R2 with atom 2, θ1 = θ2 = π/4 and φ1 = φ2 = −π/2, so that the state of the atoms is (|a1, a2 > +|a1, b2 > +|b1, a2 > +|b1, b2 >)/2.

In the next step, we consider operation 𝒞a,b. This step requires, in addition to the unitary operations, a quantum phase gate. The operation of the quantum phase gate is accomplished as follows. Atom 1 in the state (|a1 > +|b1 >)/Inline graphic passes through the empty cavity C1. The interaction time is chosen such that the atom leaves in the ground state |b1 >, and the field state inside the cavity becomes (|01 > +|11 >)/Inline graphic. Atom 2, which is of type B, then passes through the cavity. Because of the dispersive coupling, the effective Hamiltonian for the interaction between atom 2 and cavity C1 is (21, 22)

graphic file with name M21.gif 12

where g is a coupling coefficient, and a1 and aInline graphic are destruction and creation operators for the field state inside cavity C1. The resulting entangled state between atom 2 and the field in cavity C1 is ½ (|01, a2 > +|01, b2 > +|11, a2 > +eiη|11, b2 >), where η = g2τ/Δ1. The net result is that there is no photon number change inside the cavity, and there is a phase change only when there is one photon inside the cavity and the atom is in state |b2 >. Interaction time τ and detuning Δ1 are chosen such that η = π. This operation corresponds to the quantum phase gate discussed above and experimentally implemented in refs. 13 and 14.

Atom 3 of type A in ground state |b3 > now passes through cavity C1, followed by a classical field RC1. The interaction times with the cavity and classical fields are such that the cavity field is reduced to |0 >, and the resultant entangled state between atoms 2 and 3 is given by (|a3, a2 > +|a3, b2 > +|b3, a2 > −|b3, b2 >)/2. Here and in the following, we neglect the unimportant overall phase factor. Now 𝒞0,0, 𝒞0,1, 𝒞1,0, and 𝒞1,1 are implemented by turning classical fields R3 and R4 on, only R3 on, only R4 on, and none of the fields on, respectively. In the present example where the oracle picks 𝒞0,1, field R3 is tuned to frequency ωa1b1 and interacts with atom 3, and field R4 tuned to frequency ωa2b2 is off. The interaction time for field R3 is chosen such that θ = π/2 and φ = 0. Atoms 2 and 3 are in an entangled state (|a3, a2 > −|a3, b2 > +|b3, a2 > +|b3, b2 >)/2. This completes the oracle operation 𝒞0,1 corresponding to the π phase shift of state |a3, b2 >.

Next, we implement operator 𝒩, which inverts the states about the average. Atoms 3 and 2 interact with classical Ramsey field R5 and R6, which are resonant with |a > to |b > transitions of atoms 3 and 2 with θ = π/4 and φ = π/2.

According to Eq. 12, we should next apply a quantum phase gate Qα with α = π. This step is accomplished as above by first transferring the atomic coherence of atom 2 to the empty cavity C2 by adjusting the interaction time with the cavity appropriately. And then, on passing atom 3 through cavity C2, the entangled state of atom 3 and cavity C2 is (|a3, 02 > −|a3, 12 > +|b3, 02 > −|b3, 12 >)/2.

Subsequently, a fourth atom of type B passes through cavity C2, and a classical field, RC2, leaves the cavity empty and transfers the field coherence to the atom yielding (|a3, a4 > −|a3, b4 > +|b3, a4 > −|b3, b4 >)/2. As a last step, atoms 3 and 4 pass through a sequence of classical fields, R7, resonant with |a > to |b > transitions of atom 3 and R8 resonant with |a > to |b > transitions of atom 4, such that θ = π/4, φ = π/2 for R7, R8. This step completes the implementation of operator 𝒩, and the resulting state of atoms 3 and 4 is |a3, b4 >. The final state of atoms 3 and 4 would be |a3, a4 >, |a3, b4 >, |b3, a4 > or |b3, b4 >, depending on the choice of 𝒞α,β.

Motivated by the above scheme, we consider an equivalent scheme that requires only one species of atoms and a single cavity, as shown in Fig. 3. Here the atoms have one lower level and two excited levels, whose splitting can be adjusted by applying electric or magnetic fields (23). These Stark or Zeeman splittings can be used to carry out resonant or dispersive atomic couplings with the cavity fields.

Figure 3.

Figure 3

(a) Level spacings in three-level atoms corresponding to different applied electric or magnetic fields. (b) Applied classical fields Ri and cavity fields Ci on the incoming atoms. (c) Table indicating the configurations corresponding to Fig. 3a that the four atoms experience during their passage through various Ramsey and cavity fields.

We consider a cavity that can support two modes of frequencies ν1 and ν2. The three-level atoms having a lower level |b > and two upper levels |a1 > and |a2 > can have level spacings that depend on the applied electric or magnetic fields, as shown in Fig. 3a. Level |b > corresponds to qubit |1 >, and levels |a1 > and |a2 > correspond to qubit |0 > for atoms 1 and 3 and atoms 2 and 4, respectively. In configuration 0, levels |a1 > and |a2 > are completely detuned with respect to cavity resonance frequencies ν1 and ν2, and the atom is effectively decoupled from the cavity fields. In configuration 1, the atom resonantly interacts with ν1 but is decoupled with ν2. In configuration 2, the atom interacts dispersively with ν2 but is decoupled with ν1. Similarly, in configurations 3 and 4, the atom interacts resonantly with ν2 with no interaction with ν1, dispersively with ν1, and with no interaction with ν2.

As before, four atoms are sent inside the cavity initially in their ground state |b > such that they interact with a sequence of classical driving fields Ri (i = 1 − 8) and cavity fields C1 and C2 of frequencies ν1 and ν2, respectively, as shown in Fig. 3b. The interaction times are the same as in the first scheme. The appropriate interactions leading to the implementation of Grover's algorithm corresponding to the first scheme are obtained if the sequence of the atomic level spacings during the passage through Ri and Ci is chosen for various atoms as that given in Fig. 3c.

In conclusion, we have shown how Grover's algorithm can be implemented by using the known methods and techniques of quantum optics. Limitations are imposed by considerations of spontaneous emission and by cavity field damping. A potential source of error is the uncertainty associated with the location of atoms in the various fields.

Acknowledgments

We thank L. Davidovich, J. Dowling, K. Kapale, H. Lee, and C. P. Williams for valuable discussions. This research is supported by the Office of Naval Research, the National Science Foundation, and the Welch Foundation.

References

  • 1.Grover L K. Phys Rev Lett. 1997;79:325–328. [Google Scholar]
  • 2.Farhi E, Gutmann S. Phys Rev A. 1998;57:2403–2406. [Google Scholar]
  • 3.Lloyd S. Phys Rev A. 2000;61:0103011–0103014. [Google Scholar]
  • 4.Kwiat P G, Mitchell J R, Schwindt P D D, White A G. J Mod Optics. 1999;47:257–266. [Google Scholar]
  • 5.Cerf N J, Adami C, Kwiat P G. Phys Rev A. 1998;57:R1477–R1480. [Google Scholar]
  • 6.Ahn J, Weinacht T C, Bucksbaum P H. Science. 2000;287:463–465. doi: 10.1126/science.287.5452.463. [DOI] [PubMed] [Google Scholar]
  • 7.Knight P. Science. 2000;287:441–442. [Google Scholar]
  • 8.Scully M O, Zubairy M S. Phys Rev A. 2001;64:0223041–0223045. [Google Scholar]
  • 9.Chuang I L, Gershenfeld N, Kubinec M. Phys Rev Lett. 1998;80:3408–3411. [Google Scholar]
  • 10.Jones J A, Mosca M, Hansen R H. Nature (London) 1998;393:344. [Google Scholar]
  • 11.Jones J A. Science. 1998;280:229. [Google Scholar]
  • 12.Braunstein S L, Caves C M, Jozsa R, Linden N, Popescu S, Schack R. Phys Rev Lett. 1999;83:1054–1057. [Google Scholar]
  • 13.Rauschenbeutel A, Nogues G, Osnaghi S, Bertet P, Brune M, Raimond J M, Haroche S. Phys Rev Lett. 1999;83:5166–5169. [Google Scholar]
  • 14.Turchette Q A, Hood C J, Lange W, Mabuchi H, Kimble H J. Phys Rev Lett. 1995;75:4710–4713. doi: 10.1103/PhysRevLett.75.4710. [DOI] [PubMed] [Google Scholar]
  • 15.Skarja M, Borstnik N M, Loffler M, Walther H. Phys Rev A. 1999;60:3229–3232. [Google Scholar]
  • 16.Meschede D, Walther H, Muller G. Phys Rev Lett. 1985;54:551–554. doi: 10.1103/PhysRevLett.54.551. [DOI] [PubMed] [Google Scholar]
  • 17.Haroche S, Raimond J M. In: Advances in Atomic, Molecular, and Optical Physics. Bates D R, Bederson B, editors. Vol. 20. New York: Academic; 1985. p. 350. [Google Scholar]
  • 18.An K, Childs J J, Desari R R, Feld M S. Phys Rev Lett. 1994;73:3375–3378. doi: 10.1103/PhysRevLett.73.3375. [DOI] [PubMed] [Google Scholar]
  • 19.Raithel G, Wagner C, Walther H, Narducci L M, Scully M O. In: Advances in Atomic, Molecular, and Optical Physics. Berman P, editor. New York: Academic; 1994. , Suppl. 2, p. 57. [Google Scholar]
  • 20.Hood C J, Chapman M S, Lynn T W, Kimble H J. Phys Rev Lett. 1998;80:4157–4160. [Google Scholar]
  • 21.Brune M, Haroche S, Lefevre V, Raimond J M, Zagury N. Phys Rev Lett. 1990;65:976–979. doi: 10.1103/PhysRevLett.65.976. [DOI] [PubMed] [Google Scholar]
  • 22.Scully M O, Zubairy M S. Quantum Optics. London: Cambridge; 1997. [Google Scholar]
  • 23.Maitre X, Hagley E, Nogues G, Wunderlich C, Goy P, Brune M, Raimond J M, Haroche S. Phys Rev Lett. 1997;79:769–772. doi: 10.1103/PhysRevLett.77.4887. [DOI] [PubMed] [Google Scholar]

Articles from Proceedings of the National Academy of Sciences of the United States of America are provided here courtesy of National Academy of Sciences

RESOURCES