experimental implementation of fast quantum...

4
VOLUME 80, NUMBER 15 PHYSICAL REVIEW LETTERS 13 APRIL 1998 Experimental Implementation of Fast Quantum Searching Isaac L. Chuang, 1, * Neil Gershenfeld, 2 and Mark Kubinec 3 1 IBM Almaden Research Center K10yD1, 650 Harry Road, San Jose, California 95120 2 Physics and Media Group, MIT Media Lab, Cambridge, Massachusetts 02139 3 College of Chemistry, D7 Latimer Hall, University of California, Berkeley, Berkeley, California 94720-1460 (Received 21 November 1997; revised manuscript received 29 January 1998) Using nuclear magnetic resonance techniques with a solution of chloroform molecules we implement Grover’s search algorithm for a system with four states. By performing a tomographic reconstruction of the density matrix during the computation good agreement is seen between theory and experiment. This provides the first complete experimental demonstration of loading an initial state into a quantum computer, performing a computation requiring fewer steps than on a classical computer, and then reading out the final state. [S0031-9007(98)05850-5] PACS numbers: 89.70. + c, 03.65. – w The study of computation in quantum systems began with the recognition of the theoretical possibility [1–3]. This was followed by a series of results leading up to proofs that a quantum computer requires fewer operations than a classical computer for problems including factoring [4] and searching [5,6]. Appreciation of the power of quantum computing was quickly tempered by the realization that preserving quantum coherence made the implementation of practical quantum computers appear to be unlikely [7–9]. Two recent developments have changed that conclusion. The first is the recognition that quantum error correction can be used to compute with imperfect computers [10,11]. And the second is that it is possible to decrease the influence of decoherence by computing with mixed-state ensembles rather than isolated systems in a pure state. This can be done by introducing extra degrees of freedom [12] using quantum spins [13], space [14], or time [15] to embed within the overall system a subsystem which transforms like a pure state. We apply these ideas here in the first experimental realization of a significant quantum computing algorithm, using nuclear magnetic resonance (NMR) techniques to perform Grover’s quantum search algorithm [5,6]. Classically, searching for a particular entry in an unordered list of N elements requires O sN d attempts. The list could be stored as a table, such as finding a name to go along with a phone number in a phone book, or computed as needed, like testing possible combinations to unlock a padlock. Grover’s surprising result is that a quantum computer can obtain the result with certainty in O s p N d attempts. The simplest interesting application of Grover’s algo- rithm is the N 4 case, which can be posed as follows: on the set x h0, 1, 2, 3j a function f sxd 1 except at some x 0 , where f sx 0 d 21. How many evaluations of f are required to determine x 0 ? In the worst case, x 0 has a uniform probability of being either 0, 1, 2, or 3, and so the average number of evaluations required classically is 9y4 2.25. With a quantum computer using Grover’s algorithm, this is reduced to a single evaluation. We have experimentally implemented this case using molecules of chloroform as a quantum computer, and confirmed the pe- riodic behavior expected of the algorithm. The algorithm works by representing x as a pair of two- state quantum systems. We take these to be the spins of the carbon and hydrogen nuclei, writing j"l j1l and j#l j0l. The function f sxd is implemented as a unitary transform that flips the phase of the x 0 element. If the operator corresponding to x 0 3 is applied to the superposition jc 0 l sj00l 1 j01l 1 j10l 1 j11ldy2 the result is sj00l 1 j01l 1 j10l 2 j11ldy2. Measurement of this state is not useful because each answer occurs with equal probability. Grover’s algorithm amplifies the correct answer by following the conditional flip with a second operation that inverts each state about the mean. Applied to a superposition P k a k jkl this step gives a new state P k b k jkl with b k 2a k 1 2kal, where kal is the mean value of a k . For N 4 and x 0 3 the result of the conditional flip followed by the inversion about the mean is the state jc 1 l j11l, providing the answer immediately. For general N , about p p N y4 repetitions of these two steps are required to find x 0 [16]. Further iteration of the flip and inversion operations leads to a periodicity in the state. Let U be the unitary transform which does these two operations, so that jc n l U n jc 0 l is the state after the nth iteration. Boyer et al. have shown that the amplitude kx 0 j c n l l sinfs2n 1 1dug, where u arcsins1y p N d; this periodi- city arises from the finite size of the system and the uni- tarity of U. For N 4 the theoretical expectation is the sequence j11l jc 1 l 2jc 4 l jc 7 l 2jc 10 l ... ,a period of 6 (or 3 if the overall sign is disregarded). Our experiments used a 0.5 milliliter, 200 millimolar sample of Carbon-13 labeled chloroform (Cambridge Isotopes) in d 6 acetone. Data were taken at room temperature with a Bruker DRX 500 MHz spectrometer. The coherence times were measured to be T 1 20 sec 3408 0031-9007y 98y 80(15) y3408(4)$15.00 © 1998 The American Physical Society

Upload: others

Post on 26-Sep-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Experimental Implementation of Fast Quantum Searchingcba.mit.edu/docs/papers/98.03.grover.pdfClassically, searching for a particular entry in an unordered list of N elements requires

VOLUME 80, NUMBER 15 P H Y S I C A L R E V I E W L E T T E R S 13 APRIL 1998

460

ntonent.men

3408

Experimental Implementation of Fast Quantum Searching

Isaac L. Chuang,1,* Neil Gershenfeld,2 and Mark Kubinec31IBM Almaden Research Center K10yD1, 650 Harry Road, San Jose, California 95120

2Physics and Media Group, MIT Media Lab, Cambridge, Massachusetts 021393College of Chemistry, D7 Latimer Hall, University of California, Berkeley, Berkeley, California 94720-1

(Received 21 November 1997; revised manuscript received 29 January 1998)

Using nuclear magnetic resonance techniques with a solution of chloroform molecules we implemeGrover’s search algorithm for a system with four states. By performing a tomographic reconstructiof the density matrix during the computation good agreement is seen between theory and experimThis provides the first complete experimental demonstration of loading an initial state into a quantucomputer, performing a computation requiring fewer steps than on a classical computer, and threading out the final state. [S0031-9007(98)05850-5]

PACS numbers: 89.70.+c, 03.65.–w

ofe-

ins

rs

an.

at

i-

e

.

The study of computation in quantum systems begawith the recognition of the theoretical possibility [1–3].This was followed by a series of results leading up tproofs that a quantum computer requires fewer operatiothan a classical computer for problems including factorin[4] and searching [5,6]. Appreciation of the poweof quantum computing was quickly tempered by threalization that preserving quantum coherence madeimplementation of practical quantum computers appearbe unlikely [7–9].

Two recent developments have changed that conclusioThe first is the recognition that quantum error correctiocan be used to compute with imperfect computers [10,11And the second is that it is possible to decrease tinfluence of decoherence by computing with mixed-staensembles rather than isolated systems in a pure staThis can be done by introducing extra degrees of freedo[12] using quantum spins [13], space [14], or time [15to embed within the overall system a subsystem whictransforms like a pure state. We apply these ideas herethe first experimental realization of a significant quantumcomputing algorithm, using nuclear magnetic resonan(NMR) techniques to perform Grover’s quantum searcalgorithm [5,6].

Classically, searching for a particular entry in anunordered list ofN elements requiresO sNd attempts.The list could be stored as a table, such as finding a nato go along with a phone number in a phone book, ocomputed as needed, like testing possible combinatioto unlock a padlock. Grover’s surprising result is thatquantum computer can obtain the result with certaintyO s

pNd attempts.

The simplest interesting application of Grover’s algorithm is theN ­ 4 case, which can be posed as followson the setx ­ h0, 1, 2, 3j a functionfsxd ­ 1 except atsomex0, wherefsx0d ­ 21. How many evaluations off are required to determinex0? In the worst case,x0 hasa uniform probability of being either0, 1, 2, or 3, andso the average number of evaluations required classica

0031-9007y98y80(15)y3408(4)$15.00

n

onsgretheto

n.n].

hetete.m]hin

ceh

mernsain

-:

lly

is 9y4 ­ 2.25. With a quantum computer using Grover’salgorithm, this is reduced to asingleevaluation. We haveexperimentally implemented this case using moleculeschloroform as a quantum computer, and confirmed the priodic behavior expected of the algorithm.

The algorithm works by representingx as a pair of two-state quantum systems. We take these to be the spof the carbon and hydrogen nuclei, writingj "l ­ j1land j #l ­ j0l. The functionfsxd is implemented as aunitary transform that flips the phase of thex0 element.If the operator corresponding tox0 ­ 3 is applied to thesuperpositionjc0l ­ sj00l 1 j01l 1 j10l 1 j11ldy2 theresult is sj00l 1 j01l 1 j10l 2 j11ldy2. Measurementof this state is not useful because each answer occuwith equal probability. Grover’s algorithm amplifies thecorrect answer by following the conditional flip with asecond operation that inverts each state about the meApplied to a superposition

Pk akjkl this step gives a new

stateP

k bkjkl with bk ­ 2ak 1 2kal, wherekal is themean value ofak . For N ­ 4 and x0 ­ 3 the resultof the conditional flip followed by the inversion aboutthe mean is the statejc1l ­ j11l, providing the answerimmediately. For generalN , aboutp

pNy4 repetitions of

these two steps are required to findx0 [16].Further iteration of the flip and inversion operations

leads to a periodicity in the state. LetU be the unitarytransform which does these two operations, so thjcnl ­ Unjc0l is the state after thenth iteration. Boyeret al. have shown that the amplitudekx0 j cnl øsinfs2n 1 1dug, where u ­ arcsins1y

pNd; this periodi-

city arises from the finite size of the system and the untarity of U. For N ­ 4 the theoretical expectation is thesequencej11l ­ jc1l ­ 2jc4l ­ jc7l ­ 2jc10l . . . , aperiod of 6 (or 3 if the overall sign is disregarded).

Our experiments used a 0.5 milliliter, 200 millimolarsample of Carbon-13 labeled chloroform (CambridgIsotopes) in d6 acetone. Data were taken at roomtemperature with a Bruker DRX 500 MHz spectrometerThe coherence times were measured to beT1 ­ 20 sec

© 1998 The American Physical Society

Page 2: Experimental Implementation of Fast Quantum Searchingcba.mit.edu/docs/papers/98.03.grover.pdfClassically, searching for a particular entry in an unordered list of N elements requires

VOLUME 80, NUMBER 15 P H Y S I C A L R E V I E W L E T T E R S 13 APRIL 1998

n

k

etogura

n

r

h

-

-il-s,

and T2 ­ 0.4 sec for the proton, andT1 ­ 21 sec andT2 ­ 0.3 sec for the carbon (the large ratio is dueC-Cl relaxation), and the coupling was measured toJ ­ 215 Hz. All resonance lines from other nuclei anthe solvent were far from the region of interest in thexperiment. In the rotating frame of the proton (aabout 500 MHz) and carbon (at about 125 MHz), thHamiltonian for this system can be approximated as [17

H ­ 2p hJIzAIzB 1 PfAstdIfA 1 PfBstdIfB 1 Henv ,

(1)

whereIfA and IfB are the angular momentum operatoin the f direction for the proton (A) and carbon (B),and Henv represents the coupling to the environmenresponsible for the decoherence.PfA and PfB describethe strength of radio-frequency (rf) pulses which aapplied on resonance to perform single-spin rotationseach of the two spins. These rotations will be denotedX ; expsipIxy2d for a 90± rotation about thex axis, andY ; exps2ipIyy2d for a 90± rotation about2y, with asubscript specifying the affected spin.

We used temporal labeling [15] to obtain the signfrom the pure initial state

jcinl ­ j00l ­

26641000

3775 (2)

by repeating the experiment three times, cyclically pemuting the j01l, j10l, and j11l state populations beforethe computation and then summing the results.

The calculation starts with a Walsh-Hadamard tranform W , which rotates each quantum bit (qubit) fromj0lto sj0l 1 j1ldy

p2, to prepare the uniform superpositio

state

jc0l ­ W jcinl ­12

26641 1 1 11 21 1 211 1 21 211 21 21 1

37752664

1000

3775­

12

26641111

3775 . (3)

Note thatW ­ HA ≠ HB, where H ­ X2Y (pulses ap-plied from right to left) is a single-spin Hadamartransform.

The operator corresponding to the application offsxdfor x0 ­ 3 is as

C ­

26641 0 0 00 1 0 00 0 1 00 0 0 21

3775 . (4)

This conditional sign flip, testing for a Boolean strinthat satisfies theAND function, is implemented by

tobediste]

rs

t,

retoas

al

r-

s-

n

d

g

using the coupled-spin evolution which occurs wheno rf power is applied. During a timet the systemundergoes the unitary transformation exps2piJIzAIzBtdin the doubly rotating frame. Denoting at ­ 1y2J(2.3 millisecond) period evolution as the operatort, wefind that C ­ YAXAYAYBXBYBt (up to an irrelevantoverall phase factor).

An arbitrary logical function can be tested by a networof controlled-NOT and rotation gates [13,18], leaving theresult in a scratch pad qubit. This qubit can then bused as the source for a controlled phase-shift gateimplement the conditional sign flip, if necessary reversinthe test procedure to erase the scratch pad. In oexperiment these operations could be collapsed intosingle step without requiring an extra qubit.

The operatorD that inverts the states about their meacan be implemented by a Walsh-Hadamard transformW ,a conditional phase shiftP, and anotherW :

D ­ WPW ­ W

26641 0 0 00 21 0 00 0 21 00 0 0 21

3775

W ­12

266421 1 1 1

1 21 1 11 1 21 11 1 1 21

3775 (5)

This corresponds to the pulse sequenceP ­YAXAYAYBXBYBt.

Let U ­ DC be the complete iteration. The state afteone cycle is

jc1l ­ UW jc0l ­ j11l ­

26640001

3775 . (6)

A measurements of the system’s state will now give witcertainty the correct answer,j11l. For further iterations,jcnl ­ Unjc0l,

jc2l ­12

2664212121

1

3775 jc3l ­12

266421212121

3775jc4l ­

2664000

21

3775 . (7)

We see that a maximum in the amplitude of thex0 statej11l recurs every third iteration.

Like any computer program that is compiled to a microcode, the rf pulse sequence forU can be optimizedto eliminate unnecessary operations. In a quantum computer this is essential to make the best use of the avaable coherence. Ignoring irrelevant overall phase factorand noting thatH ­ X2Y also works, we can simplifyU

3409

Page 3: Experimental Implementation of Fast Quantum Searchingcba.mit.edu/docs/papers/98.03.grover.pdfClassically, searching for a particular entry in an unordered list of N elements requires

VOLUME 80, NUMBER 15 P H Y S I C A L R E V I E W L E T T E R S 13 APRIL 1998

rtce

-

r

by removing sequential rotations which cancel each othout, to get

U ­ XAYAXBYBtXAYAXBYBt sx0 ­ 3d . (8)

The other possible cases are obtained by changingsigns of the first twoX rotations,

U ­

8<: XAYAXBYBtXAYAXBYBt sx0 ­ 2d ,XAYAXBYBtXAYAXBYBt sx0 ­ 1d ,XAYAXBYBtXAYAXBYBt sx0 ­ 0d .

(9)

Because the magnetization that is detected in an NMexperiment is the result of a weak measurement othe ensemble, the signal strength gives the fraction

ithmearly2% to

FIG. 1. Theoretical and experimental deviation density matrices (in arbitrary units) for seven steps of Grover’s algorperformed on the hydrogen and carbon spins in chloroform. Three full cycles, with a periodicity of three iterations are clseen. Only the real component is plotted (the imaginary portion is theoretically zero and was found to contribute less than 1the experimental results). Relative errorsjjrtheory 2 rexptjjyjjrtheory jj are shown as percentages.

3410

er

the

Rn

of

the population with the measured magnetization rathethan collapsing the wave function into a measuremeneigenstate. The readout can be preceded by a sequenof single spin rotations to allow all terms in the deviationdensity matrixrD ­ r 2 trsrdyN to be measured [19].Nine experiments—no rotation, rotation aboutx, andabout y, for each of the two spins—were performed todo this reconstruction of the density matrix to facilitatecomparison between theory and experiment.

Figure 1 shows the theoretical and measured deviation density matricesrDn ­ jcnl kcnj 2 trsjcnl kcnjdy4for the first seven iterations ofU. As expected,rD1 clearlyreveals thej11l state corresponding tox0 ­ 3. Analo-gous results were obtained for experiments repeated fo

Page 4: Experimental Implementation of Fast Quantum Searchingcba.mit.edu/docs/papers/98.03.grover.pdfClassically, searching for a particular entry in an unordered list of N elements requires

VOLUME 80, NUMBER 15 P H Y S I C A L R E V I E W L E T T E R S 13 APRIL 1998

-k

d

-M,i-

,

c.

lk

i.

to

Le

n-

g,

the other possible values ofx0. Measuring each densitymatrix required9 3 3 ­ 27 experimental repetitions, ninefor the tomographic reconstruction and three for the pustate preparation. Both of these operations were performas tests of the computation, but neither was necessary.our experiment, starting from the thermal state the maxmum population can be identified in a single iteration, withthe result obtained from a single output spectrum. In thgeneralN case, readout of logN expectation value mea-surements would be required, and good inputs for Groveralgorithm can be distilled in a number of steps polynomiain logsNd [15].

The longest computation, forn ­ 7, took less than35 milliseconds, which was well within the coherencetime. The periodicity of Grover’s algorithm is clearly seenin Fig. 1, with good agreement between theory and expement. The large signal-to-noise ratio (typically better tha104 to 1) was obtained with just single-shot measurementNumerical simulations indicate that the 7%–44% errorare primarily due to inhomogeneity of the magnetic fieldmagnetization decay during the measurement, and impfect calibration of the rotations (in order of importance).

These experimental results demonstrate the operationa simple quantum computer that can load an initial statperform a computation, and read out the answer. Whithere is a long way to go from such a demonstratioto a system that can exceed the performance of tfastest classical computers, the experimental studyquantum computation has already come much fartherits short life than either early theoretical predictions othe history of mature computing technologies would havsuggested. While scaling up to much larger systems posdaunting challenges, many optimizations remain to btaken advantage of, including increasing the sample sizusing coherence transfer to and from electrons, and opticpumping to cool the spin system [19]. FurthermoreGrover’s algorithm can be matched to convenient physicoperations by performing generalized rapid search, whicuses transforms other than the Walsh-Hadamard [20].

The NMR system that we have described already hasof the components of a complete computer architecturincluding the rudiments of compiler optimizations. Itcan implement a nontrivial quantum computation; thchallenge now is to accomplish a useful one.

reedIn

i-

e

’sl

ri-ns.s,er-

ofe,lenheofinreesee,al,alh

alle,

e

We gratefully acknowledge the support of DARPAunder the NMRQC Initiative, Contract No. DAAG55-971-0341, and the MIT Media Lab’s Things That Thinconsortium. We thank Gilles Brassard, Lov Grover, anAlex Pines for helpful comments.

*Electronic address: [email protected][1] P. A. Benioff, Int. J. Theor. Phys.21, 177 (1982).[2] R. P. Feynman, Int. J. Theor. Phys.21, 467 (1982).[3] D. Deutsch, Proc. R. Soc. London A400, 97 (1985).[4] P. W. Shor, in Proceedings of the 35th Annual Sympo

sium on Foundations of Computer Science, Santa Fe, N1994, edited by Shafi Goldwasser (IEEE Computer Socety Press, Los Alamitos, CA, 1994), pp. 124–134; SIAMJ. Comput.26, 1484–1509 (1997).

[5] L. Grover, in Proceedings of the 28th Annual ACMSymposium on the Theory of Computation(ACM Press,New York, 1996), pp. 212–219.

[6] L. K. Grover, Phys. Rev. Lett.79, 325 (1997).[7] W. G. Unruh, Phys. Rev. A51, 992 (1995).[8] I. L. Chuang, R. Laflamme, P. Shor, and W. H. Zurek

Science270, 1633 (1995).[9] G. M. Palma, K.-A. Suominen, and A. Ekert, Proc. R. So

London A 452, 567 (1996).[10] A. Steane, Proc. R. Soc. London A452, 2551 (1996).[11] A. R. Calderbank and P. W. Shor, Phys. Rev. A54, 1098

(1996).[12] I. Chaung and N. Gershenfeld, “State Labeling for Bu

Quantum Computation” (unpublished).[13] N. Gershenfeld and I. L. Chuang, Science275, 350 (1997).[14] D. Cory, A. Fahmy, and T. Havel, Proc. Nat. Acad. Sc

U.S.A. 94, 1634 (1997).[15] E. Knill, I. Chuang, and R. Laflamme, “Effective Pure

States for Bulk Quantum Computation,” Phys. Rev. A (be published).

[16] M. Boyer, G. Brassard, P. Høyer, and A. Tapp, LANe-print quant-ph/9605034; Fortschr. Phys. (to bpublished).

[17] R. R. Ernst, G. Bodenhausen, and A. Wokaun,Principlesof Nuclear Magnetic Resonance in One and Two Dimesions(Oxford University Press, Oxford, 1994).

[18] A. Barencoet al., Phys. Rev. A52, 3457 (1995).[19] I. L. Chuang, N. Gershenfeld, M. Kubinec, and D. Leun

Proc. R. Soc. London A454, 447 (1998).[20] L. Grover, LANL e-print quant-ph/9711043 (1997).

3411