Solving the ground state energy of the quantum harmonic ... · Solving the ground state energy of...

18
Solving the ground state energy of the quantum harmonic oscillator with Diffusion Monte Carlo method Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains Malaysia Wednesday, 20 Dec 2010 Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains Malaysia Solving the ground state energy of the quantum harmonic oscil

Transcript of Solving the ground state energy of the quantum harmonic ... · Solving the ground state energy of...

Solving the ground state energy of the quantumharmonic oscillator with Diffusion Monte Carlo

method

Yoon Tiem LeongTalk given at theory group weekly seminar, School of Physics,

Universiti Sains Malaysia

Wednesday, 20 Dec 2010

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato

Abstract

Non-relatisitic quantum mechanical systems are discribed by theShroedinger Equation. To obtain the ground state solution forquantum system with large degree of freedom, variantional methodcould be numerically inefficient and time consuming. A far moresuperior numerical method to solve the Shroedinger equation withlarge degree of freedom is the diffusion Monte Carlo (DMC)method. In this talk I will briefly explain some technical detail ofthe DMC. I will illustrate the application using the example of a1-D quantum harmonic oscillator. Generalisation to higherdimensional case is straight forward.

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato

Variation method for the Schroedinger Equation

[

− ℏ2

2m∇2 + V (r)]

(r) = E (r)

H (r) = E (r).

Consider the functional E [ ] =∫

dX ∗(X )H (X )∫

dX ∗(X ) (X )= ⟨ ∣H∣ ⟩

⟨ ∣ ⟩Solve the SE by considering the stationary condition of thefunctional: �E = 0.

Defining P = ⟨ ∣H∣ ⟩ and Q = ⟨ ∣ ⟩ so that E = P/Q

�E = ⟨ +� ∣H∣ +� ⟩⟨ +� ∣ +� ⟩ − ⟨ ∣H∣ ⟩

⟨ ∣ ⟩ ≈⟨� ∣H∣ ⟩−(P/Q)⟨� ∣ ⟩

Q+ ⟨ ∣H∣� ⟩−(P/Q)⟨ ∣� ⟩

Q

H∣ ⟩ = E ∣ ⟩.

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato

Variation method for the Schroedinger Equation (cont.)

In variational calculus, stationary states of theenergy-functional are spanned by a set of basis vector∣�p⟩, p = 1, 2, ⋅ ⋅ ⋅ ,N.The stationary states is then given by the expansion in termsof the basis vector, ∣ ⟩ = ∑

p Cp∣�p⟩.

E =∑N

p,q=1 C∗

p CqHpq∑N

p,q=1 C∗

p CqSpq.

Hpq = ⟨�p∣H∣�q⟩.Spq = ⟨�p∣�q⟩.∑N

q=1(Hpq − ESpq)Cq = 0 for p = 1, 2, ⋅ ⋅ ⋅ ,N.Generalised Eigen value problem HC = ESC.

Solve using numerical routines, e.g. LAPACK’s DSYGVsubroutine.

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato

Weakness of variation method

∼ O(N3).

Choice of basis set is crucial.

Only upper limit of the true ground state can be found,E ≥ E0.

For system with complicated potential, N required maybe tolarge to be handled by the numerical routines.

Monte Carlo Method come to the rescue.

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato

(Modified) Diffusion equation

∂�(x ,�)∂� = 1

2∂2�(x ,�)∂x2

− [V (x)− ET ]�(x , �) ≡ ℒ�(x , �).� → it → 1D time dependent Schrodinger Equation.

The diffusion equation describes how the probabilitydistribution � evolve in time.

�(x , t) is the density distribution for a large collection ofindependent walkers.

For stationary distribution, �(x , � → 0) = �(x), we recoverthe stationary Schroedinger equation (with imaginary time,

t → � = it): −12∂2�(x ,�)∂x2

+ V (x)�(x , �) = ET�(x , �).

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato

Green’s funcition

Normalised Green’s function of the modified diffusionequation is G (x , y ; Δt) = ⟨x ∣etℒ∣y⟩.Note that ℒ comprised of two part: the kinetic part,K = p2/2 = 1

2(−i ∂∂x )2 and the potential part, V − ET .

�(y , t) =∫

dxG (x , y ; t)�(x , 0).∫

dyG (x , y ; t) = 1;G (x , y ; t) → �(x − y) for t → 0.

GF is the probability distribution of a single walker whichstarts of at position x at t = 0.

Use the GF to construct a Markov process with transitionprobability TΔt(x → y) = G (x , y ; Δt).

It turns out thatG (x , y ; Δt) = GKin(x , y ; Δt)e−Δ� [V (y)−ET ] +O(Δt)2

GKin(x , y ; Δt) = 1√2�Δ�

exp(

−(x−y)2

2Δ�

)

.

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato

Markov chain

A Markov chain is defined in terms of the transitionprobability T (X → X ′): PN(X1,X2, ⋅ ⋅ ⋅ ,XN) =P1(X1)T (X1 → X2)T (X2 → X3) ⋅ ⋅ ⋅T (XN−1 → XN).∑

X ′ T (X → X ′) = 1.

X denote the configurations of a given system.

Given the transitional probability T (X → X ′) Markov chaingenerates a sequence of configurations that depend only onthe last configuration.

After a long time, the Markov chain will forget its initialconfiguration, and the configurations it generates will samplea distribution �.

In other words, if we want to sample a desired distribution �,we need to know what is the T (X → X ′) that leads to �.

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato

Generating random walk in a Markov process

In the case of the diffusion equation with distribution �(x , t),TΔt(x → y) = G (x , y ; Δt).

We can generate the distribution �(x , t) given the knowledgeof G (x , y ; Δt) = GKin(x , y ; Δt)e−Δ�(V (y)−ET ),

GKin(x , y ; Δt) = 1√2�Δ�

exp(

−(x−x ′)2

2Δ�

)

.

x(t +Δt) = x(x) + �√Δt,

P(�) = 1√4�

e−�2/4 , a gaussian with width

√2 Δt; = 1/2

is the coefficient to the p2 = −∂2/∂x2 term in the diffusionequation.

The shifting of a walker’s position x takes care of the GKin

term.

The e−Δ�(V (y)−ET ) terms is taken care of by accepting thetrial shifting with a probability with weightexp(−Δt[V (x ′)− ET ]).

ET is the ground state energy we wish to find.

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato

Birth and Dealth

In the MC stepping, M̃ walkers are spawn randomly over aninitial range, e.g. (−10.0, 10.0).

Then the walkers are shifted via x(t +Δt) = x(t) + �√Δt,

and the trial move is accepted with probabilityexp(−Δt[V (x ′)− ET ]).

After some moves, the population of the walker will change.

Use ‘birth and dealth’ method to improve the efficiency of thecomputation

Kill walker with small acceptance rate, duplicate thosefavarable one. This will avoid spending too muchcomputational effort on those poor walker visitingunfavarouble region.

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato

Birth and Death

In the MC stepping, M̃ walkers are spawn randomly over aninitial range, e.g. (−10.0, 10.0).

Then the walkers are shifted via x(t +Δt) = x(t) + �√Δt,

and the trial move is accepted with probabilityexp(−Δt[V (x ′)− ET ]).

After some moves, the population of the walker will change.

Use ‘birth and death’ method to improve the efficiency of thecomputation

Kill walker with small acceptance rate, duplicate thosefavarable one. This will avoid spending too muchcomputational effort on those poor walker visitingunfavarouble region.

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato

The algorithm

Put the walkers at random positions in configuration space;REPEATFOR all walkers DO

Shift walker from its position R to a new position R ′ according

to the Gaussian transition probability P(�) = 1√4�

exp(

−�24

)

.

Evaluate q = − exp{Δt[V (R ′)− ET ]};Eliminate the walker or create new ones at R ′, depending ons = q + r , r is random, uniform between 0 and 1; (effectively,at [s] walkers are created at R ′ ([s] = 0, 1, 2, ⋅ ⋅ ⋅ ); if [s] = 0then the walker is deleted.)

END FOR; Update ET Until Finished

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato

More details

A code is developed to impliment the MC time-stepping.

Initially spawn M̃ (e.g. 400) walkers are randomly sprinkle ina range of choice (e.g (0,5)) in the configuration space (i.e.the x−axis.)

Then for each walkers shifted the ‘merit function’ q iscalculated at the shifted position q(x ′) for that walker.

Generate r to be added to q to give s = q + r . [s] is thenevaluated. If [s] = 0, the walker is ‘killed’; If [s] = 1, thewalker are accpeted at the new position x ′. If [s] ≥ 2, [s]− 1walkers at the new position x ′ are created.

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato

How ET is found

ET is found by adjusting it such that the Green’s function(overall transition rate) is normalise to maintain the stabilityof the population (not over grow nor vanish):

ET = E0 + � ln( M̃M).

As MC time-stepping proceeds, the number of walker M inthe configuration space changes, hence the energy

ET = E0 + � ln(

M̃M

)

will be adjusted from MC step to

MCstep. M changes in the way to that is ‘steered’ by the‘target number’ M̃.ET will fluctuate in each MC step.Accumulate the values of ET at each MC step to calculate⟨ET ⟩ (and ΔE =

⟨E 2⟩ − (⟨E ⟩)2) after the MC steps hasrun for some long enough ‘InitStep’, i.e. when equilibrium hasachieved.The MC time stepping shall stop after running for somepredefined times, MaxStep. E.g. MaxStep = 4000, InitStep =1000.

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato

Pros and cons

Pro: no systematic error from guessing for trial functions (thebasis set)

Pro: Fast (as compared to other non-QMC methods, esp. forsystem with large DOF)

Pro: In principle statistical error could be made vanishinglysmall with increasing MC steps.

Con: error due to the approximation

e−Δ�(− 1

2∂2

∂x2+V ) ≈ e

Δ�(

12

∂2

∂x2

)

e−Δ�V +O(Δ�2) while splittingthe Green’s functon into kinetic and potential part inG (x , y ; Δt) = GKin(x , y ; Δt)e−Δ�(V (y)−ET ).

Con: Only for ground state energy

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato

Application to 1D QHM

H = p2/(2m) + 12kx

2; p = −i ddx; m = k = 1 for simplicity

sake.

V (x) = x2/2

Eigen function for ground state 0(x) = A exp(

−x2

2

)

.

GS energy E0 =12 .

Eigen function for ground state can be obtained from theDMC code by histrogramming the walkers.

For an initial M̃ = 300 walkers, and total MC step = 4000,the DMC code obtains E0 = 0.498± 0.011 as compared tothe exact value of 0.5

Accuracy can be improved by running more MC step.

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato

Generalisation to higher dimension and non unit masses

For SHO with N DOF x1, x2, ⋅ ⋅ ⋅ , xN ,H =

∑i=Ni=1 p2i /(2mi ) +

12kx

2i ; pi = −i ∂∂xi

;

V (x) =∑

i x2i /2

GS energy E0 = 0.5∑

i1√mi.

The DMC can be modified to take into account of the generalcase where not all mi has unit mass.

A transformation has to be carried out on H to take it into abasis where the kinetic energy terms are diagonal and havingunit mass, i.e. e.g

∑i=Ni=1 p2i /(2mi ) →

∑i=Ni=1

12p

′2i .

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato

Summary

Give me a Hamiltonian in the form of∑i=N

i=11

2mi

∂2

∂x2i

+ V (r), I

will tell you what its ground state energy and eigen functionare.

Yoon Tiem Leong Talk given at theory group weekly seminar, School of Physics, Universiti Sains MalaysiaSolving the ground state energy of the quantum harmonic oscillato