12.2 The variational Monte Carlo method 375
The expectation value of the local energy is now calculated as an average over the
samples generated in this procedure, excluding a number of steps at the beginning,
necessary to reach equilibrium. The decision to stop the simulation is based on the
precision achieved and on the available processor time.
The algorithm should work in principle with a single walker. However, chances
are that this walker gets stuck in one favourable region surrounded by barriers which
are difficult to overcome. Using a large collection of walkers reduces this effect.
12.2.2 Sample programs and results
We demonstrate the VMC approach with some simple programs. Here and in the
rest of this chapter, when dealing with many-particle systems, we shall assume units
of mass, distance and energy to be such that the kinetic energy operator occurs in
the Schrödinger equation as−∇^2 /2.
We start with the harmonic oscillator in one dimension, described by the
Hamiltonian (in dimensionless units):
Hψ(x)=
[
−
1
2
d^2
dx^2
+
1
2
x^2
]
ψ(x). (12.5)
The exact solution for the ground state is given by exp(−x^2 / 2 )with energyEG=
1 /2; we shall use the trial function exp(−αx^2 ). The exact solution lies therefore in
the variational subspace. The local energy is given by
EL=α+x^2
(
1
2
− 2 α^2
)
. (12.6)
Forα= 1 /2 the local energy is 1/2, independent of the position, and we shall
certainly find an energy expectation value 1/2 in that case (this might happen
even when the program contains errors!). The crucial test is whether this energy
expectation value is a minimum as a function ofα. InTable 12.1we show that this is
indeed the case. We also show the variance of the energy. This quantity will be small
ifELis rather flat, and this will be the case whenψTis close to the exact ground state:
the closerψTis to the ground state wave, the smaller the variance, and this quantity
reaches its minimum value at the variational minimum of the energy itself. Again,
in this particular case where the trial wave function can become equal to the exact
ground state, the variance becomes zero. From the table we see that the variance
does indeed decrease to 0 when the ground state is approached. Interestingly, for
this simple case, it is possible to calculate the expectation value of the energy as a
function ofαby integrating the local energy weighted byψT^2. The Gaussian form
of the trial wave function makes the integral solvable with the result
Ev=
1
2
α+
1
8 α