<<

arXiv:0709.1704v2 [quant-ph] 30 Nov 2007 u measurements tum rvrsqatmsac algorithm search Grover’s orcinadfuttlrn unu computation quantum fault-tolerant and correction n ions and n hrsqatmagrtmfritgrfactorization integer for includ- algorithm computation, quantum quantum Shor’s of ing apects various of tions computation. quantum a of develop power help the We will of book . intuition this physical quantum from of snapshots book that believe picture real a produce es unu iuao ih6 with simulator prob- quantum mechanical the A quantum allows , basic lems. of of number simulation quantum small efficient single-particle that a with show the concrete already to of , the wish simulator We in quantum computer Schr¨odinger equation. a quantum of a example of features main computation. classical of capabilities the computing quan- advance beyond In scale would power large constructed, mechanics. a if computer, interest, quantum tum fundamental of its laws to the addition with operations logic agreement that perform machine in and a information is, the that process can logic, quantum on based machine point, that compo- At dominant. circuit unavoidably nanometers). become 100 of will of size effects order typical quantum the 2020 the of year for is the time size nents around present atomic information the of the (at bit reach single shall a we storing one that circuits estimate integrated of would process miniaturization Extrapolat- the scales. ing smaller and smaller technological reaching to mechanics. progress due quantum important of increasingly becomes laws This fundamental communication, more and the computation with to classi- of applied the laws physics, with the cal physics, replaces tech- and information in science Quantum field of nology. topic areas many hot revolutionize new to potential the of one come ainpoesn ymaso ula antcreso- magnetic nuclear of techniques means nance by processing mation uigtels er unu information quantum years last the During u ae dst te xsigpdggclpresenta- pedagogical existing other to adds paper Our h ups ftepeetppri oilsrt the illustrate to is paper present the of purpose The a build to is computation quantum of aim final The 8 rwt uecnutn circuits superconducting with or , oraieaueu unu iuao aal fsligi a in solving of capable simulator quantum useful problems. that mechanical a show We realize Schr¨odingerto equation. single-particle the of 3 2 iatmnod iia nvri` el td iMilano, di Studi Universit`a degli Fisica, di Dipartimento h okn faqatmcmue sdsrbdi h concret the in described is computer quantum a of working The siuoNzoaed iiaNcer,Szoed iao v Milano, di Sezione Nucleare, Fisica di Nazionale Istituto unu iuaino h igepril Schr¨odinger eq single-particle the of simulation Quantum .INTRODUCTION I. 6 sn ieroptics linear using , 10 decoherence , nvri` el td elIsbi,VaVlego1,2 11, Valleggio Via dell’Insubria, Studi Universit`a degli 1 NS,CRIF etrfrNnieradCmlxSystems, Complex and Nonlinear for Center & CNR-INFM CNISM, ilaoBenenti Giuliano 11 4,5 7 − unu error- quantum , ihcl atoms cold with , unu infor- quantum , 0qbt could qubits 10 1,2 9 Dtd a 1 2018) 21, May (Dated: quan- , a be- has 12 ,2, 1, . 3 , ∗ n ilaoStrini Giuliano and ytm hscly ui satolvlsse,like system, - two-level a many- a of a states is spin as qubit two viewed a the Physically, be may system. computer quantum a qubit h aus0ad1o lsia i.Teetosae form states two the These From bit. basis. classical computational a a of 1 and 0 values the a optri ecie nbnr oainb ninteger an by notation binary k in an described of is state computer the cal While space. Hilbert complex n a hoeapi fnraie n uulyor- mutually and normalized of called states, pair quantum space, a thogonal this choose In by may space. described one Hilbert system, complex quantum two-dimensional two-level a a is (qubit) bit fsize of with 1 hr h amplitudes the where cos s igebnr ii.Teol osbeoperations possible (0 identity only that the are 1, The system and a such digit. 0 in represent gates) binary (classical to single used a are is, atom. which an states, of tinct states two or photon single a of states ed ntora aaeesadw a write may we and parameters real two on pends an n tt fteqbtmyb rte as written be may qubit the of state any tandb h omlzto condition normalization the by strained fn hsclsgicne Therefore, phase significance. global physical a to no up defined of are vectors state Moreover, ui,and qubit, where adnotation hand → { ∈ h lmnayui fqatmifraini the is information quantum of unit elementary The olcinof collection A lsia i sasse htcneiti w dis- two in exist can that system a is bit classical A n 2 θ qbtqatmcmue is computer quantum -qubit )adNT(0 NOT and 1) | 0 k 0 teqatmcutrato h lsia i)and bit) classical the of counterpart quantum (the , 0 | i k n 1 k , eitro 6 of register a + | ≡ i ..., , t aefnto eie na2 a in resides function wave Its . i eoi 6 03 iao Italy Milano, 20133 16, Celoria Via 1 aClra1,213Mln,Italy Milano, 20133 16, Celoria ia e k , . . . , P ffiin a tnadquantum standard way efficient n iφ k 2 xml faqatmsimulator quantum a of example e k 2 k n sin = n n =0 I UNU LOGIC QUANTUM II. | − − − k 10Cm,Italy Como, 2100 k 1 1 n n 2 θ n n 1 | · · · i 3, − − | | − } 1 | c uisi nw sa as known is qubits 1 ψ 1 | , → k 1 † i ψ | · · · i ih0 with , | i { ∈ − 2 α 2 i n k = ,1 1, = .Nt htw s h short- the use we that Note 1. = 0qbt ssufficient is qubits 10 and − 1 i| 0 α 1 k 2 , k X k | + n 1 → 1 0 =0 0 i| − β } i i · · · 1 ≤ k 2 1 with , + r ope ubr,con- numbers, complex are ) ncnrs,aquantum a contrast, In 0). iaydgt,tesaeof state the digits, binary 0 c atce h polarization the particle, k i θ β + uation | | uepsto principle superposition 0 o h esrproduct tensor the for | ≤ k 1 i k i i 1 , and π | , k + 2 j n 0 and i unu register quantum | tt fthe of state | 1 k α i 0 n | orepresent to , | 2 , -dimensional ψ ≤ n + i btclassi- -bit < φ | nyde- only β | 2 | ψ 2 → 1. = j π i (2) -th (3) (1) . 0, = , 2 kn 1 k1 k0 . Taking into account the nor- sources (energy) grows only linearly with n. malization| − i ⊗ · · ·condition ⊗ | i ⊗ and| i the fact that a To implement a quantum computation, we must be is only defined up to an overall phase, the state of an able to control the evolution in time of the many-qubit n-qubit quantum computer is determined by 2 2n 2 state describing the quantum computer. As far as the independent real parameters. × − coupling to the environment may be neglected, this evo- The superposition principle is clearly visible in Eq. (3): lution is unitary and governed by the Schr¨odinger equa- while n classical bits can store only a single integer k, the tion. It is well known that a small set of elementary n-qubit quantum register can be prepared in the corre- logic gates allows the implementation of any complex sponding state k of the computational basis, but also | i computation on a classical computer. This is very im- in a superposition. We stress that the number of states portant: it means that, when we change the problem, of the computational basis in this superposition can be we do not need to modify our computer hardware. For- n as large as 2 , which grows exponentially with the num- tunately, the same property remains valid for a quan- ber of qubits. The superposition principle opens up new tum computer. It turns out that, in the possibilities for efficient computation. When we perform model, each unitary transformation acting on a many- a computation on a classical computer, different inputs qubit system can be decomposed into (unitary) quantum require separate runs. In contrast, a quantum computer gates acting on a single qubit and a suitable (unitary) can perform a computation for exponentially many in- quantum gate acting on two qubits. Any unitary op- puts on a single run. This huge parallelism is the basis eration on a single qubit can be constructed using only of the power of quantum computation. Hadamard and phase-shift gates. The Hadamard gate is We stress that the superposition principle is not a defined as follows: it turns 0 into ( 0 + 1 )/√2 and | i | i | i uniquely quantum feature. Indeed, classical waves satis- 1 into ( 0 1 )/√2. The phase-shift gate (of phase fying the superposition principle do exist. For instance, δ| )i turns |0i −into | i 0 and 1 into eiδ 1 . Since global we may consider the wave equation for a vibrating string phases have| i no physical| i meaning,| i the states| i of the com- with fixed endpoints. It is therefore also important to putational basis, 0 and 1 , are unchanged. However, point out the role of entanglement for the power of quan- a generic single-qubit| i state| iα 0 + β 1 is mapped into tum computation, as compared to any classical compu- α 0 + βeiδ 1 . Since relative phases| i | arei , the tation. Entanglement is arguably the most spectacular state| i of the| qubiti has been changed by the application of and counter-intuitive manifestation of quantum mechan- the phase-shift gate. We can decompose a generic uni- ics, observed in composite quantum systems: it signifies tary transformation acting on a many-qubit state into the existence of non-local correlations between measure- a sequence of Hadamard, phase-shift and controlled-not ments performed on particles who interacted in the past (CNOT) gates, where CNOT is a two-qubit gate, defined but now are located arbitrarily far away. Mathemati- as follows: it turns 00 into 00 , 01 into 01 , 10 into cally, we say that a two-particle state ψ is entangled, or 11 and 11 into 10| .i As in| thei classical| i XOR| i gate,| i the | i non-separable, if it cannot be written as a simple product |CNOTi gate| i flips the| i state of the second (target) qubit if k1 k2 of two states describing the first and the second the first (control) qubit is in the state 1 and does noth- | i| i subsystem, respectively, but only as a superposition of ing if the first qubit is in the state 0| .i Of course, the | i such states: ψ = ck1k2 k1 k2 . For instance, the CNOT gate, in contrast to the classical XOR gate, can | i Pk1,k2 | i| i (Bell) state 1 ( 00 + 11 ) is entangled, while the state also be applied to any superposition of the computational √2 | i | i 1 ( 00 + 10 ) is separable (i.e., not entangled), since basis states. √2 | i | i we can write it in the form 1 ( 0 + 1 ) 0 . The decomposition of a generic unitary transformation √2 | i | i | i of an n-qubit system into elementary quantum gates is in There is no entanglement in classical physics. There- n general inefficient, that is, it requires a number of gates fore, in order to represent the superposition of 2 levels exponentially large in n (more precisely, O(n24n) quan- by means of classical waves, these levels must belong to tum gates). However, there are unitary transformations the same system. Indeed, classical states of separate sys- that can be computed efficiently in the quantum circuit tems can never be superposed. The overall state space model, namely by means of a number of elementary gates of a composite classical system is the Cartesian product polynomial in n. This is the case in many computational of the individual state spaces of the subsystems, while problems of interest. A very important example is given in it is the tensor product. Thus, by the quantum , mapping a generic to represent the generic n-qubit state of (3) by classical N 1 N 1 ˜ n n-qubit state − f(k) k into − f(l) l , where waves we need a single system with 2 levels. If ∆ is the Pk=0 | i Pl=0 | i N = 2n and the vector f˜(0), ..., f˜(N 1) is the dis- typical energy separation between two consecutive lev- { − } els, the amount of energy required for this computation crete Fourier transform of the vector f(0), ..., f(N 1) , 1 N 1 2πikl/N{ − } is given by ∆2n. Hence, the amount of physical resources that is, f˜(l) = − e f(k). It can be √N Pk=0 needed for the computation grows exponentially with n. shown that this transformation can be efficiently im- 2 2 In contrast, due to entanglement, in quantum physics plemented in O(n = (log2 N) ) elementary quantum a general superposition of 2n levels may be represented gates, whereas the best known classical algorithm to sim- by means of n qubits. Thus, the amount of physical re- ulate the Fourier transform, the fast Fourier transform, 3

HR 2 R n−1 R n the output state. The problem is that this information is, in a sense, hidden. Any quantum computation ends H RRn−2 n−1 up with a projective measurement in the computational basis: we measure the qubit polarization (0 or 1) for all the qubits. The output of the measurement process is inherently probabilistic and the of the dif- HR 2 ferent possible outputs are set by the basic postulates of quantum mechanics. Given the state (4), we obtain H ¯ ¯ 2 outcome k f(k) with ck¯ . Hence, we end up with the| i| evaluationi of the function| | f(k) for a single FIG. 1: A quantum circuit implementing the quantum Fourier k = k¯, exactly as with a classical computer. Nevertheless, transform (except for the fact that the order of qubits in the output is reversed, so that one has simply to relabel qubits there exist quantum algorithms that exploit quantum in- in the output state). As usual in the graphical representation terference to efficiently extract useful information. Note of quantum circuits, each line corresponds to a qubit and any that in principle one could consider more general, non sequence of logic gates must be read from the left (input) projective measurements. However, this would not mod- to the right (output). From bottom to top, qubits run from ify considerations on the efficiency of a given quantum the least significant (k0, according to binary notation (2)) to algorithm. The is that generalized mesurements, the most significant (kn−1). Here a qubit is said to be more after the addition of ancillary qubits, can always be rep- significant than another if its flip gives a larger variation in the resented by unitary transformations followed by standard integer number coded by the state of the n qubits. A square projective measurements1,2. with H written inside stands for the Hadamard gate, while 2π for controlled-phase shift gates CPHASE` 2k ´ gates we draw In 1994, Shor discovered a which a circle on the control qubit and a square with Rk written factorizes large integers exponentially faster than any inside on the target qubit. Note that to implement the inverse known classical algorithm. It was also shown by Grover Fourier transform it is sufficient to run the circuit in this figure † that the search of an item in an unstructured database from right to left and with Rk instead of Rk. This is dueto the † −1 can be done with a square root speed up over any classical facts that the Hadamard gate is self-inverse and Rk = Rk . algorithm. A third relevant class of quantum algorithms is the simulation of physical systems. In particular, the power of a quantum computer is intuitive for quantum requires O(N log N) elementary operations. A quan- 2 many-body problems. It is indeed well known that the tum circuit computing the quantum Fourier transform is simulation of such problems on a classical computer is a shown in Fig. 1: it requires n Hadamard and n(n 1)/2 difficult task as the size of the grows ex- controlled phase-shift gates. By definition, the controlled− ponentially with the number of particles. For instance, phase-shift gate CPHASE(δ) applies a phase shift δ to the if we wish to simulate a chain of n spin- 1 particles, the target qubit only when the control qubit is in the state 2 size of the Hilbert space is 2n. Namely, the state of this 1 : it turns 00 into 00 , 01 into 01 , 10 into 10 system is determined by 2n complex numbers. As ob- |andi 11 into| eiδi 11 .| Thei | quantumi | Fourieri | i transform| i served by Feynman in the 1980’s, the growth in memory is an| essentiali subroutine| i in many quantum algorithms, requirement is only linear on a quantum computer, which including the described in this paper. is itself a many-body quantum system. For example, to 1 simulate n spin- 2 particles we only need n qubits. There- III. QUANTUM ALGORITHMS fore, a quantum computer operating with only a few tens of qubits can outperform a classical computer. Of course, this is only true if we can find efficient quantum algo- As we have seen, the power of quantum computation is rithms to extract useful information from the quantum quantum parallelism due to the inherent associated with computer. Quite interestingly, it has been shown that a the superposition principle. In simple terms, a quantum quantum computer can be useful not only for the investi- computer can process a large number of classical inputs gation of the properties of many-body quantum systems, in a single run. For instance, starting from the input 2n 1 but also for the study of the quantum and classical dy- state k=0− ck k 0 , we may obtain the output state namics of complex single-particle systems. As we shall P | i| i 2n 1 see in the next section, basic quantum mechanical prob- − c k f(k) . (4) lems already can be simulated with 6 10 qubits, while X k| i| i about 40 qubits would allow one to make− computations k=0 inaccessible to today’s supercomputers. We note that Therefore, we have computed the function f(k) for all this figure has to be compared with the more than 1000 k in a single run. Note that a quantum computer im- qubits required to the Shor’s algorithm to outperform plements reversible unitary transformations and that we classical computations. Moreover, these estimates ne- need two quantum registers in (4) to compute in a re- glect the computational overhead needed to correct errors versible way a generic function f. We emphasize that and error-correction becomes necessary to obtain reliable it is not an easy task to extract useful information from results by means of a large-scale quantum computer. 4

IV. THE QUANTUM SIMULATOR Note that this equation, known as the Trotter decom- position, is only exact up to terms of order ǫ2 since the To illustrate the working of a quantum algo- operators H0 and V do not commute. The on rithm by means of a concrete example, let us con- the right-hand side of Eq. (11) is still unitary and sim- sider the quantum-mechanical of a particle pler than that on the left-hand side. We can now take in one dimension (the extension to higher dimen- advantage of the fact that the Fourier transform can sions is straightforward)13,14,15. It is governed by the be efficiently performed by a quantum computer. We Schr¨odinger equation call p the momentum variable conjugate to x, that is, 1 i~(d/dx)= F − pF , where F is the Fourier transform. d − i~ ψ(x, t)= H ψ(x, t) , (5) Therefore, we can write the first operator in the right- dt hand side of (11) as where the Hamiltonian H is given by 2 i i p ~ H0 ǫ 1 ~ “ 2m ”ǫ e− = F − e− F. (12) ~2 d2 H = H0 + V (x)= + V (x) . (6) −2m dx2 In this expression, we pass, by means of the Fourier 2 2 2 transform F , from the x-representation to the p- The Hamiltonian H0 = (~ /2m) d /dx governs the free − representation, in which this operator is diagonal. Then, motion of the particle, while V (x) is a one-dimensional 1 using the inverse Fourier transform F − , we return to the potential. To solve Eq. (5) on a quantum computer with ~ finite resources (a finite number of qubits and a finite se- x-representation, in which the operator exp( iV (x)ǫ/ ) is diagonal. The ψ(x, t) at time− t = lǫ is quence of quantum gates), we must first of all discretize 2 the continuous variables x and t. If the motion essentially obtained (up to errors O(ǫ )) from the initial wave func- takes place inside a finite region, say d x d, we de- tion ψ(x, 0) by applying l times the unitary operator n − ≤ ≤ n compose this region into 2 intervals of length ∆ = 2d/2 2 i p i 1 ~ “ 2m ”ǫ ~ V (x) ǫ and represent these intervals by means of the Hilbert F − e− Fe− . (13) space of an n-qubit quantum register (this means that the discretization step drops exponentially with the number Therefore, simulation of the Schr¨odinger equation is of qubits). Hence, the wave function ψ(x, t) is approxi- now reduced to the implementation of the Fourier trans- mated by form plus diagonal operators of the form

2n 1 2n 1 − 1 − x eif(x) x . (14) ck(t) k = ψ(xk,t) k , (7) | i → | i X | i X | i k=0 N k=0 Note that an operator of the form (14) appears where both in the computation of exp( iV (x)ǫ/~) and of − exp( iH0ǫ/~), when this latter operator is written in 1 xk d + k + ∆, (8) − ≡− 2  the p-representation. Any operator of the form (14) can be implemented by means of 2n/2 generalized controlled- k = k k ... k is a state of the computational n 1 n 2 0 phase shift gates, which apply the transformation F to basis| i of| the− i|n-qubit− i quantum| i register and k the target qubit only when the n 1 (control) qubits are − 2n 1 in the state k . Here Fk is a single-qubit gate, mapping v − if(2|k)i if(2k+1) u ψ(x ,t) 2 (9) 0 into e 0 and 1 into e 1 . It is easy to N ≡ u X | k | check| i this construction| i | fori the three-qubit| i case shown in t k=0 Fig. 2. F0 acts only when the first two qubits are in the is a factor that ensures correct normalization of the wave state 00 and therefore it sets the phases eif(0) and eif(1) | i function. It is intuitive that (7) provides a good approx- in front of the basis vectors 000 and 001 , respectively. | i | i imation to ψ when the discretization step ∆ is much Similarly, F1 acts only when the first two qubits are in smaller than| i the shortest length scale relevant for the the state 01 and therefore it sets the phase eif(2) and | i description of the system. eif(3) in front of the basis vectors 010 and 011 and so | i | i The Schr¨odinger equation (5) may be integrated for- on. mally by propagating the initial wave function ψ(x, 0) for Note that the implementation described in Fig. 2 is each time-step ǫ as follows: inefficient, as it scales exponentially with the number of

i qubits. On the other hand, efficient (that its, polynomial [H0+V (x)]ǫ ψ(x, t + ǫ)= e− ~ ψ(x, t) . (10) in n) implementations are possible for most of the cases of physical interest. For instance, n2 two-qubit phase-shift If the time-step ǫ is small enough (that is, much smaller gates are sufficient for the harmonic oscillator potential than the time scales of interest for the dynamics of the 1 2 2 V (x) = 2 mω x . Using Eqs. (8) and (2), we can write system), it is possible to write n 1 j the discretized variable x as α j=0− (kj 2 + β), with the i i i P [H0+V (x)] ǫ H0 ǫ V (x) ǫ d+∆/2 2 e− ~ e− ~ e− ~ . (11) constants α = ∆ and β = − . Therefore, x = ≈ αn 5

FFF0 1 2F 3

FIG. 2: A quantum circuit implementing a generic diagonal unitary transformation (14), for the case of n = 3 qubits. Empty or full circles indicate that the operation on the target qubit is active only when the control qubits are set to 0 or 1, respectively.

2 n 1 j l α − (kj 2 + β)(kl2 + β) and finally Pj,l=0 n 1 i − j l e ~ V (x)ǫ = e iγ(kj 2 +β)(kl2 +β), (15) − Y − j,l=0 where γ = mω2α2ǫ/(2~). This is the product of n2 phase- shift gates, each acting non-trivially (differently from 2 FIG. 3: Plots of |ψ(x,t)| with n = 6 qubits (t horizontal identity) only on the qubits j and l. Since the kinetic 2 axis, divided in 40 time steps; x vertical axis, discretized by energy H0 is proportional to p , an analogous decompo- means of a grid of 2n = 64 points): accelerated particle (top sition is readily obtained, in the momentum eigenbasis, left), transmission and reflection through a square barrier (top for exp( iH0ǫ/~). Efficient implementations are possi- right), harmonic potential, with a squeezed state of initial − ble for piecewise analytic potentials V (x) but require, in width twice that of a (bottom left), anharmonic general, the use of ancillary qubits. potential (bottom right). The initial state ψ(x, 0) in all cases Finally, we point out that there is an exponential ad- is a Gaussian wave packet. vantage in memory requirements with respect to classical computation, While a classical computer needs O(N) bits to load the state vector of a system of size N (that is, H H the coefficients ψ(xk,t) of its expansion over the compu- tational basis), a quantum computer accomplishes the n same task with just n = log2 N qubits, namely with W(t) W * (t) memory resources only logarithmic in the system size. As we have discussed in Sec. II, this is possible thanks to entanglement of the qubits in quantum computer. FIG. 4: Quantum circuit measuring the squares of the real and imaginary parts of the wave function ψ(x,t). The line with a dash represents a set of n qubits. V. A FEW SNAPSHOTS

To illustrate the working of the quantum simulator, Fig. 3 exhibits several interesting features of quantum we simulate it on a classical computer, obviously with an mechanics. In the top left plot we can see the spread- exponential slowing down with respect to a true quan- ing (quadratic in time) of a Gaussian wave packet for tum computation. Let us consider a few significant ex- an accelerated particle. In the top right plot interfer- amples of single-particle quantum mechanical problems, ence fringes appear when a Gaussian packet impinges on for which plots of ψ(x, t) 2 are shown in Fig. 3. In con- a square barrier. The bottom left plot shows the width trast to classical simulations,| | in quantum computation oscillations for a squeezed state, back and forth between we cannot access the wave function ψ(x, t) after a sin- a minimum and a maximum value. Finally, the bottom gle run up to time t. Indeed, each run is followed by a right plot illustrates the motion of a wave packet in a po- standard projective measurement on the computational tential harmonic for x> 0 and anharmonic (V (x)= αx3) 2 basis, giving outcome xk with probability k ψ(x, t) . for x< 0. We can see the deformation and spreading of Therefore, the ψ(x,|h t)| 2 mayi| be the wave packet when it moves in the anharmonic part reconstructed, up to statistical errors, only| if| the quan- of the potential. As a result, the initial of the tum simulation is repeated many times. If outcome xk is state is lost in a couple of oscillation periods. 2 obtained Nk times in N runs, we can estimate ψ(xk,t) As shown in Fig. 4, it is also possible to measure as 2 Nk , with normalization factor defined in| Eq. (9).| the squares of the real and imaginary parts of ψ(x, t) N N N 6 by means of a Ramsey type quantum interferometry method. For this purpose, we need a single ancillary qubit, initially in the state 0 . The input state of the other n qubits is 0 = 00 | i0 and they end up, de- pending on the 0| ior 1| state··· i of the ancillary qubit, in the states ψ(|t)i = |Wi(t) 0 or ψ⋆(t) = W ⋆(t) 0 . Note that the| operatori W (t)=| i U(t)|S includesi both| thei state preparation ( ψ(0) = S 0 ) and the time evolution ( ψ(t) = U(t) ψ(0)| ). Finally,i | ai Hadamard gate applied to| thei ancillary| qubiti leads to the (n + 1)-qubit output state 2 2 1 1 FIG. 5: Plots of {Re[ψ(x,t)]} and {Im[ψ(x,t)]} for the uni- Φ(t) = 0 ( ψ(t) + ψ⋆(t) )+ 1 ( ψ(t) ψ⋆(t) ). formly accelerated particle of Fig. 3 top left. | i 2 | i | i | i 2 | i | i − | i (16) Hence, the probabilities of obtaining outcomes 0 or 1 from the measurement of the ancillary qubit and xk from the measurement of the other n qubits are given by P (x ,t) = 0 k Φ(t) 2 = Re [ψ(x ,t)] 2 , (17) 0 k |h |h | i| { k } P (x ,t) = 1 k Φ(t) 2 = Im [ψ(x ,t)] 2 . (18) 1 k |h |h | i| { k } 2 From the measurement of Re [ψ(xk,t)] and 2 { } Im [ψ(xk,t)] we can derive the phase velocity from {the isophase} curves of the wave function ψ(x, t) = ψ(x, t) eiθ(x,t), corresponding to θ(x, t)=0, π (imply- ing| Im| [ψ(x ,t)] = 0) and θ(x, t) = 1 π, 3 π (implying k 2 2 FIG. 6: Plots of |ψ(x,t)| for the superposition of two counter- Re [ψ(xk,t)] = 0). The phase velocity is just given by the 2 propagating wave packets in a harmonic potential, simulated slope of the isophase curves. In Fig. 5, Re [ψ(xk,t)] with n = 6 (left) and n = 8 (right) qubits. 2 { } and Im [ψ(xk,t)] are shown for the quantum motion of a{ uniformly accelerated} particle. It is interesting to note that in this example the phase velocity has strong In general, it might be interesting for several physical local variations: it can change sign and also diverge. problems to consider non-periodic boundary conditions. The huge memory capabilities of the quantum com- Keeping the quantum Fourier structure of the problem, puter appear in the plots of Fig. 6, where the dynamics this can be done if suitable fictitious potentials are added. of the superposition of two counterpropagating Gaussian For instance, zero boundary conditions may be approx- packets in a harmonic potential is considered. When the imated if a very high, in practice impenetrable poten- two packets collide interference fringes appear, similarly tial barrier encloses the region of interest for the motion. to the double-slit experiment for free particles. These Twisted boundary conditions [ψ(d, t) = eiφψ( d, t)] are fringes are hardly visible with n = 6 qubits but already obtained by adding a suitable Aharonov-Bohm− flux φ to very clear with n = 8 qubits. Since the number of lev- the problem. els grows exponentially with the number of qubits, the discretization step reduces exponentially. Therefore, po- sition resolution improves 4 times when moving from 6 to 8 qubits (of course, there is a lowest resolution limit VI. FINAL REMARKS imposed by the Heisenberg ). Finally, we point out that the use of the quantum To asses the feasibility of a quantum computer, Fourier transform in the simulation of the Schr¨odinger one should take into account that, in any realis- equation automatically imposes periodic boundary con- tic implementation, errors due to imperfections in ditions. Such boundary effects become relevant when the the quantum computer hardware or to the unde- finite region d x d is not large enough for a cor- sired computer-environment coupling unavoidably ap- rect description− of≤ the≤ motion. This problem can be seen pear. First studies1,15 have shown that a quantum sim- in the two top plots of Fig. 3. In the case of the uni- ulator with n = 6 10 qubits is quite robust against formly accelerated particle, when the wave packet gets errors. Nowadays,− these numbers of qubits are avail- close to the upper border x =+d, there exists a spurious able in experiments with liquid state nuclear magnetic non-negligible probability to find the particle close to the resonance-based quantum processors and with cold ions lower border x = d. With regard to the problem of the in a trap1. On the other hand, the number of elementary scattering of a particle− by a square potential, we observe quantum gates required for the simulations discussed in interference fringes between the transmitted and the re- Figs. 3, 5, and 6 is O(104), much larger than the se- flected packets, when both are close to the boundaries. quences of 10 100 gates that can be reliably imple- − 7 mented in present-day laboratory experiments. proach to teaching basic quantum mechanics, because Even though the time when a useful quantum com- they deal in an intuitive, appealing and mathematically puter will be realized is uncertain, quantum computation simple way with the main features of the quantum the- is a very promising and fascinating field of investigation ory, from the superposition principle to entanglement, in physics, mathematics and computer science. Further- quantum interference and quantum measurements. more, we believe that quantum computation and more One of us (G.B.) acknowledges support by MIUR- generally provide an excellent ap- PRIN 2005 (2005025204).

∗ Electronic address: [email protected] mechanical description of linear optics”, Am. J. Phys. 72, † Electronic address: [email protected] 1385–1391 (1004). 1 G. Benenti, G. Casati and G. Strini, Principles of Quan- 8 J.I. Cirac and P. Zoller, “New frontiers in quantum infor- tum Computation and Information, Vol. I: Basic concepts mation with atoms and ions”, Phys. Today 57 (3), 38–44 (World Scientific, Singapore, 2004); Vol. II: Basic tools and (2004). special topics (World Scientific, Singapore, 2007). 9 J.Q. You and F. Nori, “Superconducting circuits and quan- 2 M.A. Nielsen and I.L. Chuang, Quantum computation and tum information”, Phys. Today 58 (11), 42–47 (2005). quantum information (Cambridge University Press, Cam- 10 H.E. Brandt, “Positive operator valued measure in quan- bridge, 2000). tum information processing”, Am. J. Phys. 67, 434–439 3 E. Gerjuoy, “Shor’s factoring algorithm and modern cryp- (1999). tography. An illustration of the capabilities inherent in 11 G.W. Ford and R.F. O’Connell, “Wave packet spreading: quantum computers”, Am J. Phys. 73, 521–540 (2005). Temperature and squeezing effects with applications to 4 L.K. Grover, “From Schr¨odinger equation to the quantum quantum measurement and decoherence”, Am J. Phys. 70, search algorithm”, Am. J. Phys. 69, 769–777 (2001). 319–324 (2002). 5 J. Zhang and Z. Lu, “Similarity between Grover’s quantum 12 J. Preskill, “Battling decoherence: The fault-tolerant search algorithm and classical two-body collisions” Am. J. quantum computer”, Phys. Today 52 (6), 24-30 (1999). Phys. 71, 83–86 (2003). 13 S. Wiesner, “Simulation of many-body quantum systems 6 T.F. Havel, D.G. Cory, S. Lloyd, N. Boulant, E.M. For- by a quantum computer”, quant-ph/9603028. tunato, M.A. Pravia, G. Teklemarian, Y.S. Weinstein, A. 14 C. Zalka, “Efficient simulation of quantum systems by Bhattacharyya, and J. Hou, “Quantum information pro- quantum computers”, Fortschr. Phys. 46, 877–879 (1998). cessing by nuclear magnetic resonance spectroscopy”, Am. 15 G. Strini, “Error sensitivity of a quantum simulator I: a J. Phys. 70, 345–362 (2002). first example”, Fortschr. Phys. 50, 171–183 (2002). 7 J. Skaar, J.C.G. Escart/i/n,´ and H. Landro, “Quantum