Computational Physics Lectures: Variational Monte Carlo Methods
Total Page:16
File Type:pdf, Size:1020Kb
Quantum Monte Carlo Motivation Computational Physics Lectures: Variational Monte Given a hamiltonian H and a trial wave function ΨT , the variational Carlo methods principle states that the expectation value of H , defined through h i dRΨ∗ (R)H(R)Ψ (R) E[H] = H = T T , h i d Ψ ( )Ψ ( ) Morten Hjorth-Jensen1,2 R R T∗ R T R R is an upper bound to the ground state energy E0 of the hamiltonian Department of Physics, University of Oslo1 H, that is E H . Department of Physics and Astronomy and National Superconducting Cyclotron 0 ≤ h i 2 Laboratory, Michigan State University In general, the integrals involved in the calculation of various expectation values are multi-dimensional ones. Traditional Aug 23, 2017 integration methods such as the Gauss-Legendre will not be c 1999-2017, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license adequate for say the computation of the energy of a many-body system. Quantum Monte Carlo Motivation Quantum Monte Carlo Motivation The trial wave function can be expanded in the eigenstates of the hamiltonian since they form a complete set, viz., In most cases, a wave function has only small values in large parts ΨT (R) = ai Ψi (R), of configuration space, and a straightforward procedure which uses Xi homogenously distributed random points in configuration space will most likely lead to poor results. This may suggest that some kind and assuming the set of eigenfunctions to be normalized one obtains of importance sampling combined with e.g., the Metropolis 2 a∗ an dRΨ∗ (R)H(R)Ψn(R) a E algorithm may be a more efficient way of obtaining the ground nm m m = n n n E , 2 0 state energy. The hope is then that those regions of configurations nm am∗ an dRΨm∗ (R)Ψn(R) n an ≥ P R P space where the wave function assumes appreciable values are where weP used that RH(R)Ψn(R) = EnΨn(R). InP general, the sampled more efficiently. integrals involved in the calculation of various expectation values are multi-dimensional ones. The variational principle yields the lowest state of a given symmetry. Quantum Monte Carlo Motivation Quantum Monte Carlo Motivation Construct first a trial wave function ψT (R, α), for a The tedious part in a VMC calculation is the search for the many-body system consisting of N particles located at variational minimum. A good knowledge of the system is required in positions order to carry out reasonable VMC calculations. This is not always R = (R1,..., RN ). The trial wave function depends on α the case, and often VMC calculations serve rather as the starting variational parameters α = (α1, . , αM ). point for so-called diffusion Monte Carlo calculations (DMC). DMC Then we evaluate the expectation value of the hamiltonian H is a way of solving exactly the many-body Schroedinger equation by dRΨ∗ (R, α)H(R)Ψ (R, α) means of a stochastic procedure. A good guess on the binding E[H] = H = T T . h i d Ψ ( , α)Ψ ( , α) energy and its wave function is however necessary. A carefully R R T∗ R T R performed VMC calculation can aid in this context. R Thereafter we vary α according to some minimization algorithm and return to the first step. Quantum Monte Carlo Motivation Quantum Monte Carlo Motivation Basic steps Define a new quantity Choose a trial wave function ψT (R). 1 2 EL(R, α) = HψT (R, α), ψT (R) ψT (R, α) P(R) = | | . ψ (R) 2 dR | T | called the local energy, which, together with our trial PDF yields R This is our new probability distribution function (PDF). The N 1 approximation to the expectation value of the Hamiltonian is now E[H(α)] = P(R)E (R)dR P(R , α)E (R , α) L ≈ N i L i Z i=1 dRΨ∗ (R, α)H(R)Ψ (R, α) X E[H(α)] = T T . d Ψ ( , α)Ψ ( , α) with N being the number of Monte Carlo samples. R R T∗ R T R R Quantum Monte Carlo Quantum Monte Carlo: hydrogen atom The Algorithm for performing a variational Monte Carlo The radial Schroedinger equation for the hydrogen atom can be calculations runs thus as this written as Initialisation: Fix the number of Monte Carlo steps. Choose an ~2 ∂2u(r) ke2 ~2l(l + 1) α 2 u(r) = Eu(r), initial R and variational parameters α and calculate ψT (R) . −2m ∂r 2 − r − 2mr 2 | | Initialise the energy and the variance and start the Monte Carlo calculation. or with dimensionless variables Calculate a trial position Rp = R + r step where r is a ∗ 1 ∂2u(ρ) u(ρ) l(l + 1) random variable r [0, 1]. + u(ρ) λu(ρ) = 0, ∈ 2 2 Metropolis algorithm to accept or reject this move −2 ∂ρ − ρ 2ρ − w = P(Rp)/P(R). with the hamiltonian If the step is accepted, then we set R = Rp. Update averages 1 ∂2 1 l(l + 1) H = + . Finish and compute final averages. −2 ∂ρ2 − ρ 2ρ2 Observe that the jumping in space is governed by the variable step. Use variational parameter α in the trial wave function This is Called brute-force sampling. Need importance sampling to α αρ get more relevant sampling, see lectures below. uT (ρ) = αρe− . Quantum Monte Carlo: hydrogen atom Quantum Monte Carlo: hydrogen atom We note that at α = 1 we obtain the exact result, and the variance Inserting this wave function into the expression for the local energy is zero, as it should. The reason is that we then have the exact EL gives wave function, and the action of the hamiltionan on the wave 1 α 2 function EL(ρ) = α . −ρ − 2 − ρ Hψ = constant ψ, × A simple variational Monte Carlo calculation results in yields just a constant. The integral which defines various α H σ2 σ/√N h i expectation values involving moments of the hamiltonian becomes 7.00000E-01 -4.57759E-01 4.51201E-02 6.71715E-04 then 8.00000E-01 -4.81461E-01 3.05736E-02 5.52934E-04 9.00000E-01 -4.95899E-01 8.20497E-03 2.86443E-04 n n dRΨT∗ (R)H (R)ΨT (R) dRΨT∗ (R)ΨT (R) 1.00000E-00 -5.00000E-01 0.00000E+00 0.00000E+00 H = = constant = constant. h i d Ψ ( )Ψ ( ) × d Ψ ( )Ψ ( ) 1.10000E+00 -4.93738E-01 1.16989E-02 3.42036E-04 R R T∗ R T R R R T∗ R T R 1.20000E+00 -4.75563E-01 8.85899E-02 9.41222E-04 R R 1.30000E+00 -4.54341E-01 1.45171E-01 1.20487E-03 This gives an important information: the exact wave function leads to zero variance! Variation is then performed by minimizing both the energy and the variance. Quantum Monte Carlo: the helium atom Quantum Monte Carlo: the helium atom The hamiltonian becomes then The helium atom consists of two electrons and a nucleus with ~2 2 ~2 2 2ke2 2ke2 ke2 charge Z = 2. The contribution to the potential energy due to the Hˆ = ∇1 ∇2 + , attraction from the nucleus is − 2m − 2m − r1 − r2 r12 2ke2 2ke2 and Schroedingers equation reads , − r − r 1 2 Hˆψ = Eψ. and if we add the repulsion arising from the two interacting electrons, we obtain the potential energy All observables are evaluated with respect to the probability distribution 2 2 2 2 ψ (R) 2ke 2ke ke P( ) = | T | . V (r1, r2) = + , R 2 − r − r r ψT (R) dR 1 2 12 | | generated by the trial wave function.R The trial wave function must with the electrons separated at a distance r12 = r1 r2 . | − | approximate an exact eigenstate in order that accurate results are to be obtained. Quantum Monte Carlo: the helium atom Quantum Monte Carlo: the helium atom This results in 1 d (r ) RT 1 = Z, Choice of trial wave function for Helium: Assume r 0. T (r1) dr1 − 1 → R and 1 1 1 2 Z Zr EL(R) = HψT (R) = ψT (R)+finite terms. (r ) e 1 . ψ (R) ψ (R) −2∇1 − r T 1 − T T 1 R ∝ A similar condition applies to electron 2 as well. For orbital 2 1 1 d 1 d Z momenta l > 0 we have EL(R) = 2 T (r1) + finite terms T (r1) −2 dr1 − r1 dr1 − r1 R R 1 d T (r) Z r R = . For small values of 1, the terms which dominate are (r) dr −l + 1 RT 1 1 d Z lim EL(R) = T (r1), Similarly, studying the case r12 0 we can write a possible trial r1 0 (r ) −r dr − r R → → RT 1 1 1 1 wave function as since the second derivative does not diverge due to the finiteness of α(r1+r2) βr12 ψT (R) = e− e . Ψ at the origin. The last equation can be generalized to ψT (R) = φ(r1)φ(r2) . φ(rN ) f (rij ), Yi<j for a system with N electrons or particles. The first attempt at solving the helium atom The first attempt at solving the Helium atom During the development of our code we need to make several checks. It is also very instructive to compute a closed form With closed form formulae we can speed up the computation of the expression for the local energy. Since our wave function is rather correlation. In our case we write it as simple it is straightforward to find an analytic expressions. Consider first the case of the simple helium function arij ΨC = exp , α(r1+r2) + βr ΨT (r1, r2) = e− 1 ij Xi<j The local energy is for this case which means that the gradient needed for the so-called quantum force and local energy can be calculated analytically.