<<

arXiv:physics/9702023v1 [physics.comp-ph] 20 Feb 1997 ie yasmo rninso h omep( exp form the of transients of sum a by given fe elcn h time the the replacing time of the after solution In imaginary the scale positive. assuming considers are Schr¨odinger actually equation The one all method that question. DMC such chosen in be system can quantum the of ttsi hc h iedpnec sgvnb phase a by given is ( dependence exp time stationary factor the of which superposition linear in a states as written be can tion quantum many of state ground the systems. describe to suitable Carlo the Schr¨odinger Monte equation, nu- the recent Diffusion solving relatively paper of a this to method reader In merical the introduce descriptions. to numerical one want the we to systems realistic resort Unfortunately, most systems to for needs cases; state idealized a equation. highly in solid only few analytically this solved and be by can Schr¨odinger molecular equation governed Many are non-relativistic at phenomena energies. microscopic for scription n nr ie h ogs atn rnin orsod to imag- corresponds in energy transient with evolves lasting state ground system longest the the quantum time, a inary as that, servation ieln nuhoecndtriebt h ground the both determine imaginary can in energy one function state enough wave long the of time evolution the lowing emo h croigreuto orsod otedif- energy the ( to (potential) fusion corresponds Schr¨odinger kinetic equation the between The of similarity term equation. the general- on diffusion a and based ized Schr¨odinger equation is time imaginary one the first The ways. function. obtaining, wave and and energy system time state quantum imaginary ground a the in of ultimately, evolving function in of wave method state way the DMC initial practical The the a prepared. been provides of had regardless system the system, which quantum a of h ouino h iedpnetSchr¨odinger equa- time-dependent the of solution The de- accepted the provides Schr¨odinger equation The h M ehdcnb omltdi w different two in formulated be can method DMC The 0 = , 1 source/sink . . . , − h M ehdi ae pnteob- the upon based is method DMC The . tm n h lcrncgon tt fteH the of algorithm state numerical oscill ground harmonic a electronic the then the of and state and ground atom, derived the systems is determine quantum to method of applied function the wave of and basis energy state ground the nwihtesml acltosaebsdi vial upon available is E-print: based are calculations sample the which on iE E 0 efcnandadttra rsnaino h diffusion the of presentation tutorial and self–contained A n n h rudsaewv function wave state ground the and t/ .INTRODUCTION I. ¯ h or ,where ), physics/9702023 reaction DC ehd hsmto is method This method. (DMC) nrdcint h iuinMneCroMethod Carlo Monte Diffusion the to Introduction t by eateto hsc,Uiest fIlni tUrbana-Ch at Illinois of University Physics, of Department E E − 0 n emi h generalized the in term ) iτ E < sthe is h ouini then is solution The . onKstn yo ae n lu Schulten Klaus and Faber Byron Kosztin, Ioan n 10Ws re tet raa lios61801 Illinois Urbana, Street, Green West 1110 , n n t nrylevel energy -th 1 = , 2 − . . . , E τ n Ags 5 1995) 25, (August .Fol- .. i.e., , τ/ ¯ h φ ), 0 2 + 1 o n fteH the of and ion n a esle yemploying by solved be aris- can equation ing diffusion–reaction The equation. diffusion a rtsgetdb em rud1945 around Fermi by suggested first was h M ehdi rsne nSc I nSc I a quan- III simple some Sec. for In simulation DMC the constructed. II. of is results Sec. method The DMC in the presented for algorithm is numerical method DMC the sample some for the function systems. wave numer- on the quantum and calculate a based energy to present program state program this ground also apply computer we We and a method DMC and method. algorithm formula- DMC path-integral ical the the of of tion presentation tutorial and mechan- quantum of ics. familiarity formulation a corresponding requires processes; the obviously with stochastic formulation of integral theory DMC path the the of of requires adopts knowledge equation formulation basic one diffusion–reaction the a of method on based expertise: one DMC method one’s Which the on the of depends method. and formulations one DMC two essentially the the yield of function formulation wave representa- same the integral path of the the tion solve evaluate function to to wave algorithms Algorithms the and by obeyed method. multi- equation Carlo employ-diffusion–reaction a Monte by as evaluated the expressed be ing can be which can integral time– in- function dimensional path the wave of of the means tegrals solution By integral Schr¨odinger equation. path dependent Feynman the from uaetegon tt nryo ml oeue uhas such molecules small for of given H energy state was ground method. method the DMC culate Anderson DMC by the the time first of of the formulation applicability a of Such range wave which for the feature, only a limits possible everywhere, positive is are This which functions function. iden- wave is the walks to random tical the term. of source/sink distribution the probability The by to imposed subject processes by are which birth/death solved particles of be walks random can simulating Schr¨odinger equation time imaginary 3 + h ril sognzda olw:Tefruainof formulation The follows: as organized is article The self-contained a provide to is article this of purpose The arises method DMC the of formulation second A . tr h os siltr h hydrogen the oscillator, Morse the ator, request. ot al ehdfrdetermining for method Carlo Monte spoie.Frt h theoretical the First, provided. is 2 sfruae.Teagrtmis algorithm The formulated. is oeue optrprogram computer A molecule. ampaign, 3 h sdti ehdt cal- to method this used who tcatccalculus stochastic 1 , 2 ned the Indeed, . sit as tum mechanical systems are presented in Sec. IV. Fi- samples the after each time step. The nally, Sec. V provides suggestions for further numerical spatial coordinate distribution of the replicas involved experiments and guides the reader to the literature on in the combined diffusion and birth–death processes, af- the DMC method. ter each (finite) time step, provides an approximation to the wave function of the system at that given time. The wave function converges in (imaginary) time towards II. THEORY the (time–independent) wave function, if and only if the origin of the energy scale is equal to the ground state energy. Since the ground state energy is ini- The theoretical formulation of the DMC method, pre- tially unknown, one starts with a reasonable guess and, sented below, follows three steps. These steps will be after each time step in which a diffusive displacement outlined first, to provide the reader with an overview. and birth–death process is applied to all particles once, First Step: Imaginary Time Schr¨odinger Equa- one improves the estimate of the ground state energy. tion. In this step, the solution of the time–dependent Ultimately, this estimate converges towards the desired Schr¨odinger equation of a quantum system is expressed ground state energy and the distribution of particles con- as a formal series expansion in terms of the eigenfunctions verges to the ground state wave function. of the Hamiltonian. One then performs a transformation In the following, we shall provide a detailed account of from real time t to imaginary time τ, replacing t iτ. the above steps. The solution of the obtained imaginary time Schr¨odinger→− equation becomes a series of transients which decay ex- ponentially as τ . The longest lasting transient A. Imaginary Time Schr¨odinger Equation corresponds to the→ ground ∞ state (i.e., the state with the lowest possible energy) of the system. For simplicity, let us consider a single particle of mass Second Step: Path Integral Formulation and m which moves along the x–axis in a potential V (x). Its Monte Carlo Integration. In this step, the imagi- wave function Ψ(x, t) is governed by the time-dependent nary time Schr¨odinger equation is investigated by means Schr¨odinger equation5 of the path integral method. By using path integrals the solution of this equation can be reduced to quadra- ∂Ψ i¯h = Hˆ Ψ , (2.1) ture, provided that an initial state wave function is given. ∂t Standard Monte Carlo methods4 permit one to evaluate where the Hamiltonian has the form numerically the path integral to any desired accuracy, assuming that the initial state wave function and, there- ¯h2 ∂2 Hˆ = + V (x) . (2.2) fore, the ground state wave function as well, is positive −2m ∂x2 definite. In this case the wave function itself can be inter- preted as a probability density and the “classical” Monte Assuming that the potential for x becomes infi- → ±∞ Carlo method can be applied. According to the gen- nite, i.e., the particle motion is confined to a finite spatial eral principles of quantum mechanics, only the square of domain, the formal solution of (2.1) can be written as a the absolute value of the wave function has the meaning series expansion in terms of the eigenfunctions of Hˆ of a probability density; the fact that the ground state ∞ wave function has to be a positive definite real quan- − i E t Ψ(x, t) = c φ (x) e h¯ n . (2.3) tity imposes severe limitations on the applicability of n n n=0 the Monte Carlo technique for solving the Schr¨odinger X equation. An efficient implementation of the standard The eigenfunctions φn(x), which are square–integrable Monte Carlo algorithm for calculating the wave function in the present case, and the eigenvalues En are obtained as a large multi-dimensional integral is realized through from the time-independent Schr¨odinger equation an alternation of diffusive displacements and of so-called birth–death processes applied to a set of imaginary par- Hφˆ n(x) = Enφn(x) , (2.4) ticles, termed “replicas”, distributed in the configuration space of the system. The spatial distribution of these subject to the boundary conditions limx→±∞ φn(x) = 0. replicas converges to a probability density which repre- We label the energy eigenstates by n = 0, 1, 2,... and sents the ground state wave function. The diffusive dis- order the energies placements and birth–death processes can be simulated E < E E . . . (2.5) on a computer using random number generators. 0 1 ≤ 2 ≤ Third Step: Continuous Estimate of the Ground The eigenfunctions φn(x) are assumed to be orthonormal State Energy and Sampling of the Ground State and real, i.e., Wave Function. In this step, the ground state energy ∞ and the ground state wave function are actually deter- dxφ (x)φ (x) = δ . (2.6) mined. As mentioned above, the Monte Carlo method n m nm Z−∞

2 The expansion coefficients cn in (2.3) are then B. Path Integral Formalism ∞ cn = dxφn(x)Ψ(x, 0) , n = 0, 1, 2,... , (2.7) Z−∞ The solution of the imaginary time Schr¨odinger equation i.e., they describe the overlap of the initial state Ψ(x, 0), (2.10) can be written else assumed real, with the eigenfunctions φn(x) in (2.4). ∞ Shift of Energy Scale. We perform now a trivial, Ψ(x, τ) = dx0 K(x, τ x0, 0)Ψ(x0, 0) , (2.12) but methodologically crucial shift of the energy scale in- −∞ | Z troducing the replacements V (x) V (x) ER and E E E . This leads to the Schr¨odinger→ − equation n n R where the propagator K(x, τ x0, 0) is expressed in terms → − | 6 ∂Ψ ¯h2 ∂2Ψ of the well-known path integral , modified by the replace- i¯h = + [V (x) ER]Ψ , (2.8) ment t = iτ ∂τ − 2m ∂x2 − − ∞ ∞ N and to the expansion m 2 K(x, τ x0, 0) = lim dx1 . . . dxN−1 ∞ →∞ E −E | N −∞ −∞ 2π¯h∆τ × −i n R t h¯ Z Z   Ψ(x, t) = cn φn(x) e . (2.9) (2.13) n=0 X N Wick Rotation of Time. Now let us perform a ∆τ m 2 exp (xj xj− ) + V (xj ) ER . transformation from real time to imaginary time (also − ¯h 2∆τ 2 − 1 −  j=1 known as Wick rotation) by introducing the new vari-  X h i able τ = it. The Schr¨odinger equation (2.8) becomes   Here ∆τ = τ/N is a small time step. One sets xN x. ∂Ψ ¯h2 ∂2Ψ The wave function Ψ(x, τ) can be written in the form≡ ¯h = [V (x) ER]Ψ , (2.10) ∂τ 2m ∂x2 − − and the expansion (2.9) reads ∞ N−1 N Ψ(x, τ) = lim dxj W (xn) ∞ →∞ E −E N −∞   × − n R τ Z j=0 n=1 Ψ(x, τ) = cn φn(x) e h¯ . (2.11) Y Y n=0   X Noting the energy ordering (2.5), one can infer from P (xn, xn− ) Ψ (x , 0) , (2.14) (2.11) the following asymptotic behavior for τ × 1 0 → ∞ (i) if ER > E0, limτ→∞ Ψ(x, τ)= , the wave func- where we have defined tion diverges exponentially fast; ∞

1 2 (ii) if ER < E0, limτ→∞ Ψ(x, τ) = 0, the wave func- m 2 m (xn xn−1) P (xn, xn−1) exp − , tion vanishes exponentially fast; ≡ 2π¯h∆τ "− 2¯h∆τ #   (iii) if ER = E0, limτ→∞ Ψ(x, τ)= c0φ0(x), the wave (2.15) function converges, up to a constant factor c0 de- fined through (2.7), to the ground state wave func- and tion.

This behavior provides the basis of the DMC method. [V (xn) ER] ∆τ W (xn) exp − . (2.16) For ER = E0, the function Ψ(x, τ) converges to the ≡ − ¯h   ground state wave function φ0(x) regardless of the choice of the initial wave function Ψ(x, 0), as long as there is The function P (xn, xn−1) is related to the kinetic energy a numerically significant overlap between Ψ(x, 0) and term in (2.2). This function can be thought of as a Gaus- φ0(x), i.e., as long as c0 is not too small. The ground sian probability density for the random variable x with state wave function, for a single particle, has no nodes (in n mean equal to x − and variance case of many fermion systems this might not be true) and n 1 one can always fulfill the requirement of non–vanishing σ = ¯h∆τ/m . (2.17) c0 by choosing a positive definite initial wave function centered in a region of space where φ0(x) is sufficiently p large. The so-called weight function W (xn) depends on both We now seek a practical way to integrate equation the potential energy in (2.2) and the reference energy (2.10) for an arbitrary reference energy ER and initial ER. The main difference between the functions P and wave function Ψ(x, 0). We shall accomplish this by using W is that the former can be interpreted as a probability the path integral formalism. density since

3 ∞ dyP (x, y)= 1 , (2.18) and (2.18) the probability distribution (2.22) does indeed −∞ obey the property (2.20). The expression (2.21) can now Z be invoked to evaluate Ψ(x, τ) by means the path inte- while the latter can not. gral (2.14). This requires the generation of sets of co- The path integral (2.14) can be evaluated analyti- ordinate vectors x(i) , x(i) = x(i), x(i),...,x(i) for cally only for particular forms of the potential energy ∈ P 0 1 N 7 V (x) . Fortunately, by choosing N sufficiently large, one i =1, 2,..., , where x(i) = x.   N N can evaluate (2.14) numerically to any desired accuracy. (i) However, since a suitable N is necessarily a large number, In order to obtain vectors x which sample the prob- ability density one proceeds as follows: In a first step the standard algorithms of numerical integration cannot P i 8 ( ) be employed directly , instead, one uses the so-called one generates, for a fixed x = xN , a Gaussian random 4 (i) (i) Monte Carlo method . According to this method any number xN−1 with mean value xN (i.e., a Gaussian ran- (convergent) N–dimensional integral of the form (i) dom number distributed about xN ) and variance σ, ac- (i) (i) − ∞ N 1 cording to the probability density P xN , xN−1 given I = dxj f (x0,...,xN−1) (x0,...,xN−1) , by (2.15). In a second step, a Gaussian random num- −∞   P Z j=0 (i) (i) Y ber xN−2, with mean xN−1 and variance σ, is generated   (2.19) (i) (i) according to P xN−1, xN−2 . The steps are continued   (i) (i) where is a probability density, i.e., to produce random numbers xn until one reaches x0 . P (i) (i) Two consecutive random numbers xn and xn−1 are re- (x ,...,xN− ) 0 , and P 0 1 ≥ lated through the equation

∞ N−1 (i) (i) (i) x = x − + σρ , (2.25) dxj (x0,...,xN−1)= 1 , (2.20) n n 1 n −∞   P j=0 Z Y   (i) can be approximated by the expression where σ is given by (2.17) and ρn is a Gaussian ran-

N dom number with zero mean and a variance equal to (i) 1 (i) (i) one. The ρn ’s can be generated numerically by means = f x ,...,x − . (2.21) I 0 N 1 of algorithms referred to as random number generators. N i=1 x(Xi)∈P   One can check, using (2.25) and (2.15), that the mean (i) (i) (i) (i) (i) (i) and the variance of xn xn−1 are equal to xn−1 xn Here the notation x means that the numbers xj , i = 1, 2,..., ; j = 0,...,N∈P 1, are selected randomly and σ, respectively. Therefore,  the coordinate vectors  N − (i) (i) with the probability density . The larger , the bet- x − ,...,x , obtained through equation (2.25) for P N N 1 0 ter is the approximation I . In fact, according to ni =1, 2,..., ,o are distributed according to the probabil- the central limit theorem4, the≈ I values of obtained as N I ity density (2.22). We note in passing that the sequence a result of different simulations are distributed normally, of positions xn given by (2.25) defines a stochastic pro- i.e., according to a Gaussian distribution, around the ex- cess, namely the well known Brownian diffusion process. act value I, the standard deviation being proportional to Repeating times the sampling of the wave func- 1/√ . tion Ψ(x, τ) canN be determined accordingP to (2.21) and InN order to evaluate Ψ(x, τ) in (2.14), for given x, τ (2.14). Unfortunately, the algorithm outlined is imprac- and N, one defines tical since it provides only a route to calculate Ψ(x, τ) for N a chosen time τ, but no systematic method to obtain the (x ,...,xN− ) = P (xn, xn− ) , (2.22) ground state energy and wave function, which requires a P 0 1 1 n=1 description for τ . Y → ∞ and Fortunately, the above so-called Monte Carlo algo- rithm can be improved and used to determine simulta- N neously both E0 and φ0. The basic idea is to consider f (x0,...,xN−1) = Ψ(x0, 0) W (xn) , (2.23) the wave function itself a probability density. This im- n=1 Y plies that the wave function should be a positive definite such that one can apply (2.19) and (2.21). For this pur- function, a constraint which limits the applicability of the pose we note that due to suggested method. By sampling the initial wave function Ψ(x, 0) at points one generates as many Gaussian ran- ∞ 0 dom walksN which evolve in time according to (2.22) or, dyP (x, y)P (y,z) = P (x, z) , (2.24) equivalently, according to (2.25); instead of tracing the Z−∞

4 motion of each random walk separately, one rather fol- particles, where int[x] denotes the integer part of x and lows the motion of a whole ensemble of random walks where u represents a random number uniformly dis- simultaneously. The advantage of this procedure is that tributed in the interval [0, 1]. In case mn = 0 the particle one can sample the wave function of the system, through is deleted and one stops the diffusion process; this is re- the actual position of the random walks and the products ferred to as a “death” of a particle. In case of mn = 1 of the weights W along the corresponding trajectories, the particle is unaffected and one continues with the next after each time step ∆τ. This procedure, as we explain diffusion step. In case mn = 2, 3 one continues with the below, also provides the possibility to readjust the value next diffusion step, but begins also a new series (in case of ER after each time step and to follow the time evolu- of mn = 3 two new series) of diffusive displacements tion of the system for as many time steps as are needed starting at the present location xn. This latter case is to converge to the ground state wave function and energy referred to as the “birth” of a particle (of two particles . for mn = 3). From (2.28) one can see that at most two The procedure, the so-called DMC method, interprets new particles can be generated whereas one would ex- the integrand in (2.14), i.e., pect that for int[W (xn) + u] 4 three or more new series would be started. This limitation≥ on the birth rate W (xN ) P (xN , xN−1) W (x2) P (x2, x1) of the particles is necessary in order to avoid numeri- · · · × cal instabilities, especially at the beginning of the Monte process 2N process 2N−1 process 4 process 3 Carlo simulation, when ER may differ significantly from | {z } | {z } | {z } | {z } E . The error resulting from the limitation mn 3 is 0 ≤ W (x ) P (x , x ) Ψ (x , 0) , (2.26) expected to be small since for sufficiently small ∆τ holds × 1 1 0 0 process 2 process 1 process 0 V (x) ER W (x) 1 − ∆τ (2.29) ≈ − ¯h as a product| of{z probabilities} | {z } and| {z weights} to be mod- which, evidently, assumes values around unity. eled by a series of sequential stochastic processes 0, 1, 2,... 2N. We will explain now how these processes are described numerically. C. The Diffusion Monte Carlo Method Initial State. The 0-th process describes “particles” (random walks) distributed according to the initial wave We want to summarize now the algorithmic steps actu- function Ψ (x0, 0), which is typically chosen as a Dirac δ–function ally taken in a straightforward application of the DMC method. To realize the suggested algorithm one starts with 0 “particles”, referred to as “replicas”, which are Ψ (x0, 0) = δ(x x0) , (2.27) N − placed according to a distribution Ψ (x0, 0). As pointed where x is located in an area where the ground state out above, the actual numbers of replicas will vary as 0 replicas “die” and new ones are “born”. The replicas of the quantum system is expected to be large. The ini- (j) tial distribution (2.27) is obtained by simply placing all are characterized through a position xn where the suf- fix n counts the diffusive displacements and where (j) particles initially at position x0. Diffusive Displacement. As we explained earlier, the counts the replicas. The number of replicas after n dif- successive positions x − , x in (2.26) can be generated fusive displacements will be denoted by n. In the ini- n 1 n N (i) through (2.25). The Monte Carlo algorithm produces tial step one samples 0 replicas assigning positions x , N 0 then the positions x = x + σρ , x = x + σρ , (i =1,..., 0) according to the distribution Ψ (x0, 0). 1 0 1 2 1 2 N etc by generating the series of random numbers ρn, n = As mentioned, we actually choose all replicas to begin 1, 2,.... at the same point x0. Birth–Death Process. Instead of accumulating the Rather than following the fate of each replica and of its product of the weight factors W for each particle, it is descendants through many diffusive displacements, one more efficient numerically to replicate (see below) the follows all replicas simultaneously. Accordingly, one de- (j) particles after each time step with a probability propor- termines the positions x1 following equation (2.25), i.e., tional to W (xn). In this way, after each time step ∆τ, one sets the (unnormalized) wave function is given by a histogram x(j) = x(j) + ¯h∆τ/m ρ(j) (2.30) of the spatial distribution of the particles. The calcula- 1 0 · 1 tion of the wave function Ψ(x, τ) can be regarded as a for replicas j = 1, 2,... p0 generating appropriate ran- simulated diffusion–reaction process of some imaginary (j) N particles. dom numbers ρ1 . This can be regarded as a one–step diffusion process of the system of replicas. Once the In the replication process each particle is replaced by new positions (2.30) have been determined, one evalu- a number of (i) ates the weight W (x1 ) given by (2.16) and, according (j) mn = min [ int[W (xn) + u] , 3] (2.28) to (2.28), one determines the set of integers m1 for

5 j = 1, 2,... . Replicas j with m(j) = 0 are ter- In order to justify that (2.34) serves our purpose one N0 1 (j) notes that exp[ ∆τ( V ER)/¯h], for sufficiently small minated, replicas m1 = 1, 2, 3 are left unaffected, ex- − h i− (j) ∆τ, is 1 ∆τ( V ER)/¯h. In the subsequent birth– cept, that in case m1 = 2, 3 one or two new replicas − h i− ′ death process this would lead to an value (recall that j are added to the system and their position is set to N1 ′ during the diffusion process the number of replicas does x(j ) = x(j). The number of replicas is counted and, 1 1 not change) related to ER by thus, is determined. During the combined diffu- N1 sion and birth–death process the distribution of replicas ¯h 1 ER = V 1 N . (2.35) changes in such a way that the corresponding coordinates h i1 − ∆τ − (j)  N0  x1 will now be distributed according to a probability density which will be identified with Ψ(x, ∆τ). However, one would like the total number of replicas dur- Adaptation of the Reference Energy ER. As a re- ing the next birth–death process to return to the initial sult of the birth–death process the total number 1 of value 0 and ER to be given by an expression similar replicas changes from its original value. As discussedN to (2.33).N This can be achieved by adding to both sides N0 above, for ER values less then the ground state energy of equation (2.35) the same quantityh ¯ (1 1/ 0) /∆τ. the distribution Ψ(x, τ) decays asymptotically to zero, Hence, the redefined value for the reference− N energyN is i.e., the replicas eventually all die; for ER values larger than the ground state energy, the distribution will in- (2) (1) ¯h 1 ER = ER + 1 N , (2.36) crease indefinitely, i.e., the number n will exceed all ∆τ − 0 N  N  bounds. Only for ER = E0 can one expect a stable asymptotic distribution such that the number of replicas which, by taking (2.33) into account, is identical to fluctuates around an average value 0. The spatial distri- (2.34). bution and increases/decreases of theN number of replicas Equation (2.34) should be regarded as an empirical re- allow one to adjust the value of ER as to keep the total sult rather than an exact one. In fact, any expression number of replicas approximately constant. To this end, of the form ER = V + α (1 / 0), with arbitrary h i − N N 9 one proceeds from (2.29). Averaged over all replicas this positive α, can be used equally well in place of (2.34) . equation reads Usually, the actual value of the “feedback” parameter α is chosen empirically for each individual problem so as V 1 ER to reduce as much as possible the statistical fluctuations W 1 1 h i − ∆τ (2.31) h i ≈ − ¯h in 0 and, at the same time, to diminish unwanted cor- relationsN between the successive generation of replicas. where the average potential energy is Equation (2.34) suggests that a good starting value for

N1 α is ¯h/∆τ, a value used in our DMC program. 1 (j) 2nd, 3rd, . . . Displacements. The diffusive displace- V 1 = V (x1 ) (2.32) h i 1 ments, birth–death processes and estimates for new E N j=1 R X values are repeated until, after a sufficiently large number The reader should note that this average varies with the of steps, the energy ER and the distribution of replicas number of diffusion steps taken for all replicas; in the becomes stationary. The ground state energy is then present case we consider the average after the first diffu- sive displacement. One would like the value of W to be E0 = lim V n (2.37) n−>∞h i eventually always unity such that the number ofh replicasi remains constant. This leads to the proper choice of ER since n/ n− 1. The distribution of replicas pro- N N 1 → vides the ground state function φ0(x). E(1) = V (2.33) R h i1 However, if the distribution of replicas deviates too D. Systems with Several Degrees of Freedom strongly from φ0(x) the number of replicas can experi- ence strong changes which need to be repaired by ‘over- The DMC method described above is valid for a quan- compensating’ through a suitable choice of ER. In fact, tum system with one degree of freedom x. However, the in case 1/ 0 < 1 one would like to increase subse- quentlyN theN number of replicas in order to restore the method can be easily extended to quantum systems with several degrees of freedom. Such systems arise, for exam- initial number of replicas and, hence, choose an ER value ple, in case of a particle moving in two or three spatial larger than (2.33); in case 1/ 0 > 1 one would like to decrease subsequently the numberN N of replicas and, hence, dimensions or in case of several interacting particles. For these two cases the DMC method can be readily gener- choose an ER value smaller than (2.33). A suitable choice is alized. Particle in d Dimensions. The Hamiltonian of a par- (2) ¯h 1 ticle of mass m moving in a potential V (x ,...x ) can E = V + 1 N . (2.34) 1 d R h i1 ∆τ − be written  N0 

6 d ¯h2 ∂2 the total wave function is antisymmetric with respect to Hˆ = + V (x ,...,xd) , (2.38) −2m ∂x2 1 such permutation. This constraint determines the sym- α=1 α X metry of the orbital part of the ground state wave func- tion for fermionic systems (but not for bosonic ones): in where xα, α =1, ..., d, denotes the Cartesian coordinates of the particle and d (= 2, 3) represents the spatial di- many cases of interest, the (orbital) ground state wave mension. For the Hamiltonian (2.38), the DMC algo- function of fermionic systems will have nodes, i.e., re- rithm can be devised in a similar way as for (2.2). The gions with different signs, which make the DMC method, only difference to the one degree of freedom case is that as presented here, inapplicable. We shall not address during each time step ∆τ one needs to execute d ran- this issue in further detail and shall consider only cases dom walks for each replica. Indeed, the kinetic energy where the so-called “sign problem” of the ground state term in (2.38) can be formally regarded as the sum of wave function does not arise. kinetic energies of d “particles” having the same mass m To summarize, a DMC algorithm for a system with one degree of freedom can be adopted to a system of S and moving along the xα, α =1, ..., d, directions. Conse- interacting particles moving in d spatial dimensions with quently, the diffusive displacements are governed by the ′ distribution an effective dimension of d = S d. Exactly this feature of the DMC method makes it so× attractive for the evalu-

P (xn,1, xn−1,1; ... xn,d, xn−1,d) = (2.39) ation of the ground state of a quantum system. However, 1 2 in the case of identical fermions, one needs to obey the d m(x −x − ) m 2 exp n,α n 1,α . actual symmetry of the ground state wave function and α=1 2πh¯∆τ − 2¯h∆τ the method often is not applicable.  h i TheQ product of probabilities can be described through independent random processes, i.e., one can reproduce the probability (2.39) through d independent diffusive III. ALGORITHM displacements applied for each replica to the d spatial directions. Our goal is to provide an algorithm for the DMC S Particles. In the caseof S interacting particles, which method presented in the previous section and to apply move in d spatial dimensions, the most general form of this algorithm to obtain the ground state energy and the Hamiltonian is given by (assuming that no internal, wave function for sample quantum systems. Some of e.g., spin, degrees of freedom are involved) the examples chosen below, e.g., the harmonic oscillator, have an analytical solution and, therefore, allow one to S 2 d 2 ˆ ¯h ∂ test the diffusion Monte Carlo method. Other examples, H = 2 + V ( xjα ) , (2.40) − 2mj ∂x { } e.g., the hydrogen molecule, can not be solved analyti- j=1 " α=1 jα # X X cally and, hence, the DMC method provides a convenient way of solving the problem. The obtained results turn where V ( xjα ) accounts for both an interaction be- tween particles{ } and for an interaction due to an external out to be in good agreement with results obtained by means of other numerical methods10. field; xjα denotes the dependence on the coordinates of all particles.{ } By rescaling the coordinates in (2.40)

m ′ A. Dimensionless Units xjα = xjα , j =1,...,S, α =1,...,d mj r In order to implement the DMC method into a numeri- (2.41) cal algorithm, one needs to rewrite all the relevant equa- tions in dimensionless units. One can go from conven- where m is an arbitrary mass, one can make the Hamil- tional (e.g., SI) units to dimensionless units by explicitly tonian (2.40) look formally the same as the Hamiltonian writing each physical quantity as its magnitude times the (2.38) describing a single particle of mass m which moves ′ corresponding unit. In mechanics the unit of any phys- in d = S d spatial dimensions. Hence, the generaliza- ical quantity can be expressed as a proper combination tion of the× DMC algorithm for this case is again apparent. of three independent units, such as, L, T and , which Sign Problem. The case in which (2.40) actually de- denote the unit of length, time and energy, respectively.E scribes a system of identical particles cannot be treated ′ By denoting the value of a given physical quantity with like that of a single particle moving in d = S d spa- the same symbol as the quantity itself (e.g., xL x in tial dimensions. For such systems a prescribed boson× or the case of coordinate x), the Schr¨odinger equation→ (2.10) fermion symmetry of the wave function with respect to can be recast an interchange of particles must be obeyed. For bosons (particles with integer spin) the total wave function (i.e., ∂Ψ ¯hT ∂2Ψ T the product of the orbital and the spin wave functions) is = E [V (x) ER]Ψ . (3.1) ∂τ 2mL2 ∂x2 − ¯h − symmetric with respect to any permutation of the parti- cles while for fermions (particles with half–integer spin) It is convenient to choose L, T , and such that E

7 ¯hT 1 T max = 2000, τ0 = 1000, ∆τ = 0.1, xmin = 20, 2 = , and E = 1 (3.2) N − 2mL 2 ¯h xmax = 20 and nb = 200. holds. Since there are three unknown units and only two relationships between them, one has the freedom to spec- ify the actual value of either L, T , while the value of Input the other two units follows from (3.2).E In dimensionless units obeying (3.2) the original 1 imaginary–time Schr¨odinger equation reads Initialize replicas ∂Ψ 1 ∂2Ψ = [V (x) ER]Ψ . (3.3) ∂τ 2 ∂x2 − − 2 It is not difficult to transcribe also the other relevant equations above in dimensionless units; for example, the walk functions (2.15, 2.16) become 6 2 3 1 (xn xn−1) P (xn, xn− ) = exp − , 1 2π∆τ − 2∆τ r " # branch test and 4 5 W (xn) = exp [V (xn) ER] , {− − } 7 count respectively. As a consequence, the diffusive displace- ments (2.25) are described by Output xn = xn−1 + √∆τρn (3.4)

Fig. 1. Flow diagram of the DMC algorithm.

B. Computer Program In the next block, Initialize replicas, a two di- mensional matrix, called psips, is defined with the fol- The flow diagram of the computer program11 imple- lowing structure: The first (row) index identifies the replicas and takes integer values between one and max. menting the DMC method is shown in Fig. 1. Each N block in the diagram performs specific tasks which are The second (column) index points to information regard- explained now. ing the replica identified by the first index, and is a posi- tive integer less or equal to the number of degrees of free- All external data required for the calculation are col- ′ lected through a menu driven, interactive interface in the dom of the system (i.e., d , see Sec.II D) plus one. For a Input block. First, one has to select the quantum system given replica, say i, psips[i][1] is used as an existence flag: it is zero (one) if the replica is dead (alive). The on which the calculation is performed. At the program ′ level this means to define the right spatial dimensionality other elements psips[i][j], (j =2,...,d +1) are used d and the potential energy V (see Sec. IV) which corre- to store the coordinates of the replica (i.e., xj,α according sponds to the selected system. The quantum systems to the notations of Sec.II D) during the simulation. covered by our program are the ground state of the har- To initialize the matrix psips one sets equal to one the monic oscillator, of the Morse oscillator, of the hydrogen value of the existence flag psips[j][1] for j =1,... 0 + N atom, of the H ion (electronic state) and of the hydrogen ( replicas j o are not born yet and, accordingly, 2 ≥ N molecule (electronic state). The results of the simulation their existence flag is set to zero), and then one assigns for all these cases are presented in Sec. IV below. The the same coordinates for all these replicas (for the actual other input parameters are: the initial number of repli- values of these coordinates, see Sec.IV). Such a choice cas ( ), the maximum number of replicas ( max), the for the initial distribution of the replicas corresponds to N0 N seed value for the random number generators, the num- a δ–function for Ψ(x, 0). For a suitable choice of x0 one ber of time steps to run the simulation (τ0), the value can be certain that there is always a significant overlap of of the time step (∆τ), the limits of the coordinates for Ψ(x, 0) and the ground state wave function φ0(x). The the spatial sampling of the replicas (xmin, xmax) and, initial value of the reference energy ER is simply given finally, the number of spatial “boxes” (nb) for sorting by the value of the potential energy at the initial position the replicas during their sampling. Suggested values for of the replicas [c.f. (2.33)]. these parameters are (in dimensionless units): = 500, After initializing the replicas the program enters into N0

8 a loop which essentially consists of three routines: walk, sampling of replicas at only one instant in time; by cu- branch and count. One loop corresponds to taking one mulative counting, the effective number of replicas used time step ∆τ. to sample the wave function is enhanced by a factor of walk: This routine performs the diffusion process of the τ0 (number of time steps the counting is done). replicas by adding to the coordinates of the active (alive) Once the spatial distribution of replicas is known, one replicas the value √∆τρ, where ρ is a random number can normalize the distribution to obtain the ground state drawn from a Gaussian distribution with mean zero and wave function using standard deviation one [c.f. (3.4)]. The program uses N φ (x ) i , i =1,...,n . (3.5) for this purpose the Gaussian random number generator 0 i nb b ≈ N 2 gasdev4 . i=1 i branch: The birth–death (branching) processes, which As should be apparentpP by now, until the completion of follow the diffusion steps of the replicas, are performed the algorithm the routines walk and branch are called by the routine branch. For each alive replica the number 2τ0 times while the count routine is called only τ0 times, mn, given by (2.28), is calculated. For the generation namely, during the second half of the calculation. This of u in (2.28), a uniformly distributed random number is controlled by the block test shown in Fig. 1. in the interval [0, 1], the program employs the function Finally, the Output block returns the results of the 4 ran3 . If a value mn = 0 results, the replica is killed by simulation. These results are: (i) the average value of setting the corresponding existence flag to zero. If a value the reference energy ER E0, which is calculated dur- h i≈ mn = 1 results, the replica is left as it is. If a value n =2 ing the second part of the simulation (i.e., from τ0 to results, the replica is duplicated (the first inactive replica 2τ0) when the system is already stabilized; (ii) the corre- in psips is set active with the same coordinates as the sponding standard deviation δER; (iii) the (imaginary) original replica). If a value n = 3 results, two identical time evolution of ER for the first τ0 time steps (used h i copies of the replica are generated in psips. The reader basically to check how fast stationarity is reached by the may note that never more than two copies are born; this system during the simulation); (iv) the normalized spa- limitation is necessary to prevent the uncontrolled growth tial distribution of the replicas, i.e., the ground state wave of the number of replicas which psips, due to its finite function. Note that the average reference energy after n size, might not be able to accommodate. Such growth time steps is defined through might occur when all the replicas are located in (almost) n 1 the same place and when one can expect that large val- ER(τ = n∆τ) = ER(i∆τ) . (3.6) h i n ues mn can arise. Since (by choice) the replicas initially i=1 are located in one and the same point of the configura- X tion space the first diffusion process does not spread the replicas far enough and, for certain initial positions, mn could then become large for all replicas. The algorithm IV. EXAMPLES also terminates if all the mn’s assume values zero. To avoid this possibility one needs to choose the initial lo- In this section we report on the results obtained, by cation of the replicas with care. In general, any point means of the DMC program, for the ground state energy where the ground state wave function is large is a good and wave function of some quantum mechanical systems. choice. The program was executed on an HP-9000 (series 700) workstation. In each case we specify the units used and count: The role of this routine is to return the ground present numerical results of the simulation. For all sim- state wave function of the system (i.e., the spatial dis- ulations the values of the input parameters suggested in tribution of the replicas) at the end of the simulation. Sec. III B, have been employed. To this end, the spatial interval (xmin, xmax) is divided equally into nb “boxes” (sub-intervals) for each degree of freedom and then, by employing standard numerical A. Harmonic Oscillator methods8, one counts the distribution of replicas among these “boxes”. The counting process starts after τ0 (in units of ∆τ) time steps when the system has already For a one–dimensional harmonic oscillator, character- reached its (identified through a con- ized by the proper angular frequency ω, one has (in SI units) verged V τ ) and is performed in a cumulative way for h i another τ0 time steps. This strategy can be justified 1 V (x) = mω2x2 . (4.1) as follows: once stationarity is reached, the wave func- 2 tion Ψ(x, τ) φ0(x) will practically not change in time; hence, the replicas∝ will essentially sample one and the Choosing T =1/ω, one obtains from (3.2) L = ¯h/mω same wave function at any subsequent time and the cu- and =hω ¯ . In corresponding dimensionless units, the E p mulative counting of the replicas in the “boxes” can be exact ground state energy is E0 = 1/2 and the ground 5 used; this procedure yields better statistics for φ0(x) than state wave function is

9 2 − 1 x E = 0.125. The figure demonstrates also that the φ (x) = π 4 exp . (4.2) 0 0 − 2 the resulting− ground state wave function is in excellent   agreement with (4.4). The results of the Monte Carlo simulation for the har- monic oscillator are given in Fig. 2. At the beginning of -0.1 the simulation all replicas are located at the origin. The main graph shows the rapid convergence of the reference 0.6 energy ER(τ) towards the exact ground state energy DMC simulation h i -0.2 E0. The inset contains the plot of the ground state wave analytical result function: the results of the simulation are represented by 0.4 > triangles, while the continuous line corresponds to the R (x) o analytical result (4.2). The agreement between the dif- -0.3 φ fusion Monte Carlo result and the analytical expressions < E 0.2 is very good.

-0.4 0 -5 0 x 5 10 15 0.5 0 20 40 60 80 100 0.8 DMC simulation τ 0.4 analytical result 0.6 Fig. 3. DMC description of the Morse oscillator. The time

> evolution of ER is shown. The inset presents the ground state R 0.3 wave function; the numerical result is represented through (x) 0.4 o

φ dots, the wave function in the analytical form (4.4) is repre- < E 0.2 0.2 sented by a continuous line.

0.1 0 -4 -2 x 0 2 4 C. Hydrogen Atom 0 0 20 40 60 80 100 τ In case of the hydrogen atom it is customary to choose 2 2 Fig. 2. Reference energy ER (in dimensionless units) as a the unit of length equal to the Bohr radius a =¯h /me ( 3 ≈4 function of the imaginary time τ (in units of time steps ∆τ) 0.53A˚). Thus, by setting L = a, one finds T =h ¯ /me 2 obtained by the DMC method for the harmonic oscillator. and = me4/¯h ( 27.21eV ). The well–known ground E ≈ ER converges rapidly towards the exact ground state energy state energy (in dimensionless units) is E0 = 1/2 and 5 − E0 = 0.5. The inset shows the corresponding ground state the corresponding radial wave function is wave function φ0(x). The result of the simulation is repre- −r sented by dots while the continuous line corresponds to the φ0(r) =2e . (4.5) analytical solution (4.2) We have carried out a DMC simulation for the hydro- gen atom, generalizing the previous description to three B. Morse Oscillator spatial dimensions. At τ = 0 all the replicas were located at (0, 0, 1), i.e., at a distance of one Bohr radius from the The Morse potential is defined through origin, along the positive z axis. Figure 4 shows the con- vergence of ER to the exact ground state energy. This V (x) = D e−2ax 2e−ax . (4.3) h i − convergence, however, is not as rapid as in the case of the In this case one has a natural length scale through harmonic oscillator and the Morse oscillator. This is not L = 1/a which can be used as the unit of length. As a surprising since the hydrogen atom has three degrees of result, from (3.2), one has T = m/¯ha2 and =¯h2a2/m. freedom which require more sampling. The running time For simplicity we shall consider only the caseE when (in of the simulation has also increased (see Table I). The in- dimensionless units) D =1/2; the exact ground state en- set shows both the radial wave function φ0(r) (triangles) and the function χ(r) = rφ0(r) (squares). For compari- ergy is E0 = 1/8, and the corresponding wave function is12 − son, the corresponding analytical solutions are also plot- ted with continuous lines. Again the agreement between −x x φ0(x) = √2exp e . (4.4) the analytical results and those obtained by our algo- − − 2 rithm are good. The error of the radial wave function in   The results of the DMC description are presented in the vicinity of the origin is due to insufficient sampling of Fig. 3. Initially, all replicas were positioned in our simu- the number of replicas in this region of the configuration lation at the origin. The figure represents the time evo- space. To improve the wave function for r 0 one may ∼ lution of ER towards the exact ground state energy decrease the size of the counting “boxes” in the vicinity h i

10 of the origin, increase the number of replicas, or increase trons. In the Born approximation one considers the pro- τ. ton positions fixed and solves the corresponding station- ary Schr¨odinger equation for the electrons. The wave function of the two electrons must be antisymmetric with -0.5 respect to exchange of the electrons. In the ground state the electrons are in a singlet spin state 3 -0.6

φ0(r): DMC simulation -10 φ > (r): analytical result -0.7 2 0 R χ(r)=rφ0(r): DMC simulation χ(r)=rφ0(r): analytical result -20 (x) 6 o y 3 φ < E -0.8 0 1 -3 -30 -6 6 >

-0.9 R -40 3 0 z 0 0 2 4 6

x < E -1 -3 0 20 40 60 80 100 -50 -6 -6 -3 τ 0 x 3 Fig. 4. DMC description of the hydrogen atom. The time -60 6 evolution of ER is shown. The inset presents both the radial wave function φ0(r) and the function χ(r)= rφ0(r). 0 20 40 60 80 100 τ + + Fig. 5. DMC description of the H2 ion. The time evolution D. H2 Ion of ER is shown. The inset presents the spatial distribution of + the replicas, i.e., the electron cloud. The H2 ion is held stabilized through a single electron moving in the electric field of two protons separated, at 10 1 equilibrium, by a distance R = 1.06A˚ . The ground χ(1, 2) = χ 1 ,+ 1 (1)χ 1 ,− 1 (2) χ 1 ,− 1 (1)χ 1 ,+ 1 (2) 2 2 2 2 2 − 2 2 2 2 state of this quantum system can not be determined an- r h i alytically. The numerically determined ground state en- (4.7) + 10 ergy of H2 is E0 = 16.252 0.002 eV . The DMC − ± which is antisymmetric. Here χ 1 ± 1 (1, 2) denotes the method can be applied in this case as for the hydrogen 2 , 2 atom. The Hamiltonian is 1 wave function of electron 1, 2 in the spin 2 state with ¯h2 e2 e2 magnetic quantum numbers 1 . Accordingly, in the Hˆ = 2 (4.6) ± 2 − 2m∇ − r + 1 R − r 1 R wave function of the electronic ground state | 2 | | − 2 | R where denotes the separation between the two pro- Ψ0 = Φ(r1, r2) χ(1, 2) (4.8) tons. The results of the DMC description are presented in Fig. 5. The same dimensionless units as in the case the factor Φ(r1, r2), describing the spatial distribution of the hydrogen atom were employed and replicas were of the electrons, must be symmetric. This factor can be located initially at the origin, the nuclei being located determined through at (0, 0, R/2), for R = 2. Figure 5 shows that the ± ground state energy obtained asymptotically is 16.75 1 − Φ(r , r ) = ( φ(r , r ) + φ(r , r ) ) (4.9) eV (see Table I) which differs from the more exact nu- 1 2 2 1 2 2 1 merical value10 by 0.5 eV, i.e., by about 3%. The inset r in Fig. 5 shows a plot of the spatial distribution of the where φ(r1, r2) is a solution of replicas, demonstrating that the electronic ground state wave function is nearly spherically symmetric. ¯h2 e2 e2 2 + 2 −2m ∇1 ∇2 − r 1 R − r + 1 R  | 1 − 2 | | 1 2 | 2  2 2 E. H2 Molecule e e e r r 1 1 + φ( 1, 2) − r R − r + R r1 r2 | 2 − 2 | | 2 2 | | − |  The H2 molecule is formed by two protons, at equi- 10 r r librium separated by R = 0.74A˚ , and by two elec- = E0 φ( 1, 2) (4.10)

11 TABLE I. Results obtained during two different simulations performed on four quantum systems listed in the first column. During Simulation I (II) the initial number of replicas was 500 (4000), the time step ∆τ = 0.1 (0.05), the length of simulation τ = 1000∆τ (2000∆τ), the random number generator seed 1 and the number of boxes used to calculate the spatial distribution of the replicas 200 (400). hERi and δER are defined in the text. ∆t represents the actual running time of the simulation on a HP-9000 (series 700) workstation. For the hydrogen atom the energies are given both in dimensionless units and in eV (in parenthesis), respectively. For comparison, E0 in the last column represents the exact value (analytical or obtained through an alternative numerical method) of the corresponding ground state energy. Simulation I Simulation II Quantum system hERi δER ∆t hERi δER ∆t E0 Harmonic oscillator 0.505 0.094 8 sec 0.500 0.048 4 min 0.5 Morse oscillator -0.1236 0.0749 10 sec -0.1245 0.0330 4 min -0.125 Hydrogen atom -0.495 0.080 18 sec -0.505 0.040 5 min 0.5 (-13.477 eV) (2.186 eV) (-13.752 eV) (1.093 eV) (13.6 eV) + a H2 ion -16.753 eV 2.869 eV 40 sec -16.476 eV 1.389 eV 11 min -16.25(2) eV a H2 molecule -30.973 eV 3.638 eV 55 sec -31.968 eV 1.754 eV 16 min -31.6(87) eV a Numerical values calculated based upon the heat of dissociation given by Hertzberg10.

The Schr¨odinger equation (4.10) cannot be solved an- -10 y 8 alytically. The available numerical result for the ground 4 0 10 -4 state energy of H2 is E0 = 31.688 0.013 eV . The -8 − ± -15 results of the diffusion Monte Carlo simulation for H2 are 8 shown in Fig. 6. The same dimensionless units as in the 4 z case of the hydrogen atom were employed and the repli- > 0 R -4 cas at τ = 0 were located initially at (0, 0, 1)(0, 0, 1) ; -20 { − } -8 the position of the protons were (0, 0, R/2), with R = < E -8 -4 ± 0 1.398. The simulation took about 55 seconds to com- x 4 -25 8 plete and the obtained ground state energy was E0 = 30.973 eV (see Table I). This result differs from the ex- −act energy by 0.715 eV, i.e., by 2.3%. The inset of Fig. 6 -30 shows the spatial distribution of the replicas which is 0 20 40 60 80 100 120 140 nearly spherically symmetric. In Fig. 7 we present the τ results of a calculation in which an unphysically large R Fig. 7. ER vs. τ and the spatial distribution of the replicas value of 8.398 was assumed. In this case the distribu- (inset) at the end of the simulation for the H2 molecule for tion of the electronic cloud around the protons is clearly an unphysically large separation between the two protons of anisotropic, the energy of the electrons is still negative. 8.398 Bohr radius.

-30 V. DISCUSSION

8 y 4 0 -40 -4 -8 In this article, we have presented a detailed account

> 8 of the path integral formulation of the DMC method R -50 4 devised for calculating simultaneously the ground state z 0 energy and wave function of an arbitrary quantum sys- < E -4 tem. A simple numerical algorithm based on the DMC -60 -8 -8 method has been formulated and a computer program, -4 0 4 based on this algorithm, has been applied to determine x 8 -70 numerically the ground state of a few quantum systems of pedagogical interest. 0 20 40 60 80 100 τ The DMC algorithm, as presented in this article, is quite unstable numerically. We want to demonstrate here Fig. 6. DMC description of the electronic ground state of the need for an improvement of the method. This need the H2 molecule. The time evolution of ER is shown. The arises due to the strong fluctuations stemming from the inset presents the spatial distribution of the replicas, i.e., the birth-death processes employed in this method. These electron cloud. fluctuations affect the reference energy ER(τ) which is expected to converge to the ground state energy. This convergence is observed only for the value of ER defined h i

12 through equation (3.6). The actual time dependence of Fig. 8. Fluctuations of ER about its average value hERi ≈ 0.5 well after the distribution of replicas reached its ER is presented in Fig. 8 for the case of the harmonic stationary form. The relatively large fluctuations are due to oscillator. The fluctuations in ER are large, but symmet- rically distributed around E which explains the good the birth–death processes which persist even if the replicas are R distributed according to the exact ground state wave function agreement between the resulth ofi the simulation with the φ0(x) and the reference energy ER has been adapted to the exact result. Attempts to use our DMC program to cal- + exact ground state energy. culate the electronic ground state energy of the H2 ion and H molecule as a function of the separation between 2 In order to apply the DMC method to calculate the the two protons, which would allow one to determine the ground state properties of a system with interacting equilibrium separation from the minimum of this depen- fermions one has to treat, as mentioned above, the “sign dence, have failed due to large fluctuations in E . R problem” due to the antisymmetry property of the many- fermion wave function. Two principle methods, the fixed– The DMC algorithm can be significantly improved re- node method13,1 and the release–node method14,1, have sorting to a method called “importance sampling”1,9. been proposed to deal with this problem. The basic idea of this method is to change the prob- Once some kind of importance sampling is imple- ability distribution of the replicas in a controlled way. mented and the sign–problem, in the case of many– This can be achieved by reformulating (2.10) such that fermion systems, is resolved, the DMC method can be the resulting equation has a solution Ψ(x, τ) multiplied used to compute ground state properties for molecules by an approximation of the ground state wave function, or molecular clusters9 and for quantum spin, boson and the latter being obtained, for example, from a variational fermion systems15. The method is also applicable to the method. Application of the DMC method to this new study of ground–state phase transitions due to quan- equation yields then replicas which spend more time in tum fluctuations, a topic of modern condensed matter “important” regions of the configuration space where the physics15. wave function Ψ(x, τ) is expected to be large. For details Finally we would like to mention that the DMC regarding importance sampling the reader is referred to method has been extended and successfully applied to the literature cited1,2,9. the study of the excited states of molecules and clusters9 and also to the study of finite temperature properties of different condensed matter systems. Also, the DMC Any implementation of the DMC method leads to sys- method has been successfully applied in quantum field tematic errors due to the use of a finite time step ∆τ. theories16. Apparently these errors can be reduced to zero by choos- ing ∆τ 0. Unfortunately, this is not the case. Even → worse: making the time step shorter and shorter does not VI. ACKNOWLEDGMENTS only increase the needed computer time, but also renders the successive generations of replicas more and more cor- This work has been supported by a National Science related such that their distribution actually departs more Foundation REU fellowship to B.F., by funds of the Uni- and more from the ground state wave function. For each versity of Illinois at Urbana-Champaign, and by a grant quantum system investigated it is necessary to find the from the National Science Foundation (BIR-9318159). most convenient value of ∆τ which is short enough to produce small systematic errors and at the same time is long enough to keep the successive distributions of repli- cas sufficiently uncorrelated.

0.8 1 D. Ceperley and B. Alder, “”, Sci- ence 231, 555–560 (1986). 2 M. H. Kalos and P. A. Whitlock, Monte Carlo methods (J. 0.6 Wiley & Sons, New York, 1986). 3 J. B. Anderson, “A random–walk simulation of the R +

E Schr¨odinger equation: H3 ”, J. Chem. Phys. 63, 1499–1503 0.4 (1975). 4 W. H. Press, S. A. Teukolsky, W. T. Vetterling and B. P. Flannery, Numerical recipes in C : the art of scientific com- 0.2 puting (Cambridge University Press, Cambridge, 1992), 2nd edn. 5 100 120 140 160 180 200 L. D. Landau and E. M. Lifshitz, Quantum Mechanics, τ vol. 3 of Course of Theoretical Physics (Pergamon Press, Oxford, 1977).

13 6 R. P. Feynman and A. R. Hibbs, Quantum mechanics and the authors (K.S.). path integrals (McGraw-Hill, New York, 1965). 12 L. Infeld and T. E. Hull, “The factorization method”, Rev. 7 D. Khandekar, S. Lawande and K. B. Hagwat, Path Integral Mod. Phys. 23, 21–68 (1951). Methods and Their Applications (World Scientific, London, 13 P. J. Reynolds, D. M. Ceperley, B. J. Adler and J. W. A. 1993). Lester, “Fixed–node quantum Monte Carlo for molecules”, 8 S. E. Koonin, Computational Physics (Benjamin, Reading, J. Chem. Phys. 77, 5593–5603 (1982). MA, 1986). 14 D. M. Ceperley and B. J. Adler, “Quantum Monte Carlo for 9 M. A. Suhm and R. O. Watts, “Quantum Monte Carlo molecules: Green’s function and nodal release”, J. Chem. studies of vibrational states in molecules and clusters”, Phys. 81, 5833–5844 (1984). Phys. Rep. 204, 293–329 (1991). 15 M. Suzuki, Quantum Monte Carlo methods in condensed 10 G. Herzberg, Molecular Spectra and Molecular Structure matter physics (World Scientific, Singapore, 1993). (Van Nostrand, New York 1950). 16 T. Barnes and G. J. Daniell, “Numerical Solution of Field 11 The program was written is the C programming language. Theories Using Random Walks”, Nucl. Phys. B257, 173– A copy of the source code is freely available from one of 198 (1985).

14