<<

Quantum Monte Carlo (QMC)

December 14, 2018

Quantum Monte Carlo (QMC) December 14, 2018 1 / 241 Motivation

We simulate many-body quantum systems by solving the Schr¨odinger equation stochastically, because there are too many degrees of freedom in anything but trivial systems Before you begin, you need: • Hamiltonian (fix particle masses and their interactions) • particle statistics: bosons, fermions, or sometimes boltzmannons (forget indistinquishability) – A non-relativistic Hamiltonian has no idea if particles are bosons or fermions • Do we want properties for the , for excited states, or for a finite temperature system ? • Do you really need a first-principles result? DFT is faster than QMC.

Quantum Monte Carlo (QMC) December 14, 2018 2 / 241 QMC methods • Variational Monte Carlo (VMC) – Sample particle positions from a guessed and simulate the consequences in a system with a certain Hamiltonian – You may improve your guess (for lower or variance), but it’s not automatic • Diffusion Monte Carlo (DMC) – Usually for sampling particle positions in the ground state – Numerically improves upon a guessed wave function • Path Integral Monte Carlo (PIMC) – Simulate finite temperature quantum systems – Manifest Feynman’s path integral representation of quantum mechanics – Also a ground-state variant exists

Quantum Monte Carlo (QMC) December 14, 2018 3 / 241 History

1940’s E. Fermi: Schr¨odingerequation can written as a diffusion equation; Physical principles of Diffusion Monte Carlo (DMC) discovered. 1942 A. A. Frost: evaluation of the energy of few simple molecules by picking few representative points in the configuration space; Variational Monte Carlo (VMC) is born. 1947 N. Metropolis and S. Ulam: Diffusion Monte Carlo developed into an algorithm; “. . . as suggested by Fermi . . . ”. 1950’s R. Feynman: Path integral formulation of quantum mechanics; Physical principles of Path Integral Monte Carlo (PIMC) discovered 1962 M. H Kalos: Solved the Schr¨odingerequation in the form of an integral equation: Green’s function Monte Carlo (GFMC) is born. 1964 H. Conroy: Proposed, that points should be picked at random from 2 the configuration space with probability proportional to ΨT , the + − ++ square of the trial wave function. Application to H2 ,H , HeH , He, H2, and Li - the first application to a fermion system!

Quantum Monte Carlo (QMC) December 14, 2018 4 / 241 History

1965 W. L. McMillan: Energy of liquid 4He; Applied the Metropolis 2 algorithm to sample points with probability proportional to ΨT . 1971 R. C. Grim and R. G. Storer: Importance sampling. 1975 J. B. Anderson: First application of DMC to electronic systems 1980 D. M. Ceperley and B. J. Alder: fixed-node DMC for electron gas 1982 P. J. Reynolds, D. M. Ceperley, B. J. Alder and W. A. Lester, Jr. : fixed-node DMC for molecules 1986 D. M. Ceperley and E. L. Pollock: PIMC calculation of the properties of liquid 4He at finite temperatures. 1998 N.V. Prokofev, B. V. Svistunov, and I. S. Tupitsyn: Worm algorithm 2009 G. H. Booth, A. J. W. Thom, and A. Alavi: Fermion MC as a game of life in Slater determinant space

Quantum Monte Carlo (QMC) December 14, 2018 5 / 241 Recent publications: what’s going on QMC calculations published in October 2018:

I Nonordinary edge criticality of two-dimensional quantum critical magnets, L. Weber, F. P. Toldin, S. Wessel

I Simulating quantum annealing via projective quantum Monte Carlo algorithms, E. M. Inack

I Estimates of the Quantum Fisher Information in the S=1 Anti-Ferromagnetic Heisenberg Spin Chain with Uniaxial Anisotropy, J. Lambert, E. Sorensen

I Efficient ab initio auxiliary-field quantum Monte Carlo calculations in Gaussian bases via low-rank tensor decomposition, M. Motta et al.

I Quantum simulation for thermodynamics of infinite-size many-body systems by O(10) sites, S. J. Ran et al.

I Many-body effects in (p, pN) reactions within a unified approach, R. Crespo, A. Arriaga, R. B. Wiringa, E. Cravo ...

I Relative and electronic structures of CoO polymorphs through diffusion quantum Monte Carlo, K. Saritas, et al.

Quantum Monte Carlo (QMC) December 14, 2018 6 / 241 Computational cost

I Diffusion Monte Carlo (DMC) ∼ 10x Variational Monte Carlo (VMC) I Atomic and molecular physics: fixed-node diffusion Monte Carlo, coupled cluster method CCSD(T) 4 I N electrons, fixed-node DMC as N 7 I CCSD(T) scales as N ⇒ small systems CCSD(T) stands for Coupled Cluster Singles Doubles (Triples), indicating the level of included diagrams; triples are partially included. The method is extremely accurate, but the workload is tremendous. 5.5−6.5 I fixed-node DMC scales as Z with the atomic number Z: use pseudopotentials?

Quantum Monte Carlo (QMC) December 14, 2018 7 / 241 When is MC effective? The probability that the point (x, y) is inside the circle is Area of a quarter unit circle π P(hit circle) = = . (1) Area of a box 4 Very ineffective! Z 1 I = dxf (x) . (2) 0 Estimate

N 1 X I ≈ I = f (x ) , (3) N N i i=1 Multidimensional integrals: The partition function of N classical atoms is Z Z ∝ dr1dr2 ... drN exp [−βV (r1, ..., rN )] , (4)

Quantum Monte Carlo (QMC) December 14, 2018 8 / 241 When is MC effective? The variance or the square of the standard deviation of independent samples is

 N N !2 1 1 X 1 X σ2 ≈ f (x )2 − f (x ) , (5) I N N i N i  i=1 i=1 so 1 σI ∼ √ . (6) N If one has to evaluate the integrand N times to calculate a d–dimensional integral, then for each dimension one has ∼ N1/d points, whose distance is h ∼ N−1/d . The error for every integration cell of volume hd is in the trapezoid rule ∼ hd+2, so the total error will be N times that, ∼ N−2/d . For high-dimensional integrals this error diminishes very slowly with increasing number of evaluation points N.

Quantum Monte Carlo (QMC) December 14, 2018 9 / 241 When is MC effective?

Why is MC effective in multidimensional integrations? Heuristically, a 3D cube and a regular grid of N points, take a 2D projection on a square: you see only N2/3 points ⇒ holes in space, significant parts of space never get any attention. Ways to do better:

I deterministically: quasi-Monte Carlo methods, ”quasi” because the points are not random

I completely random points: Monte Carlo

Quantum Monte Carlo (QMC) December 14, 2018 10 / 241 Correlated samples and MC accuracy For correlated samples r2τ error in mean = int σ , (7) N where σ is the variance of N independent samples. The integrated autocorrelation time τint describes how badly the samples are correlated. The bad news is that close to a critical point τint diverges. This is known as critical slowing down, and it tends to make MC calculations slow near phase transitions. The term ”critical slowing down” can mean two things: I Decreasing rate of recovery from small perturbations. It signals approaching criticality, such as an ecological disaster. Used as an early-warning mechanism. I A Monte Carlo method samples the phase space inefficiently due to long-range correlations near criticality. MC simulation spends long time in very similar situations. A more clever algorithm does not suffer from critical slowing down. A typical example is the Ising model simulation, single flip vs. cluster algorithms. Quantum Monte Carlo (QMC) December 14, 2018 11 / 241 Importance sampling Probability distribution function (PDF) w, Z 1 dxw(x) = 1 normalization . (8) 0 write the integral in an equivalent form Z 1 f (x) I = dx w(x) (9) 0 w(x) and change variables, Z x r(x) = dx0w(x0) . (10) 0 Now we have dr = w(x) , (11) dx and r(x = 0) = 0; r(x = 1) = 1, so the integral is Z 1 f (x(r)) I = dr . (12) 0 w(x(r)) According to the above strategyQuantum this Monte is Carlo estimated (QMC) as theDecember average 14, 2018 of the 12 / 241 argument evaluated at random points ri ∈ U[0, 1]: N 1 X f (x(ri )) I ≈ IN = . (13) N w(x(ri )) i=1 Importance sampling The ultimate goal of importance sampling is to make the integrand as constant as possible, because with a constant a,

N Z 1 1 X dx a ≈ a = a , (14) N 0 i=1 one sample (N = 1), say x = 0.02342, gives the exact result. You can’t beat this. Integrating Z 1 dxf (x) (15) 0 pick π(x), which you can sample, to be as close to f (x), so that

Z 1 N 1 X f (xi ) dxf (x) ≈ , xi sampled from π(x), (16) N w(xi ) 0 i=1

f (x) and w(x) is nearly constant. Quantum Monte Carlo (QMC) December 14, 2018 13 / 241 Sampling From a Distribution Define r(x) as a cumulative function, Z x r(x) = dx0w(x0) , (17) −∞ which gives

dr(x) = w(x) . (18) dx Apparently,

Z 1 Z ∞ dr = dx w(x) . (19) 0 −∞

MC: left integral is evaluated by picking N random points ri ∈ U[0, 1]. The right integral is evaluated by picking points xi from distribution w. ⇒ values x in Eq. (17) have distribution w.

Quantum Monte Carlo (QMC) December 14, 2018 14 / 241 Using inverse functions

A) Discrete distributions We want to sample integers k with 1 ≤ k ≤ N with probability Pk .

1 Construct the cumulative table of probabilities, Fk = Fk−1 + Pk .

2 Sample r ∈ U[0, 1], find k so that Fk−1 < r < Fk . Repeat step 2. B) Continuous distributions: the mapping method

1 Calculate the cumulative function of w(x), Z x F (x) = dx 0 w(x 0) (21) −∞

2 Sample r ∈ U[0, 1], solve x from F (x) = r; the solutions x sample w(x).

Quantum Monte Carlo (QMC) December 14, 2018 15 / 241 Rejection method Simple case: distribution is limited from above, w(x) < M, x ∈ [a, b].

1 Draw r1 ∈ U[a, b] and r2 ∈ U[0, M] this picks a random point inside the box around w(x), see figure

2 If w(r1) ≥ r2, accept x = r1 as the desired random number, else discard both r1 and r2. Go to 1.

M

   w(x)

reject

 

accept

0 a x b Z M w(x) = dr2θ(w(x) − r2) 0 Z b Z M = dr1 dr2δ(x − r1)θ(w(r1) − r2) . (22) a 0

Quantum Monte Carlo (QMC) December 14, 2018 16 / 241 Rejection method

Interpreting the identity as an algorithm: ( 0, if r2 > w(x) θ(w(x) − r2) = , (23) 1, if r2 < w(x)

with some fixed x, so integrating r2 from 0 to M gives w(x). Next we use Dirac delta to move x out of the argument of w, replacing it with r1. The pieces can be now interpreted as an algorithm,

Z b Z M w(x) = dr1 dr2 δ(x − r1) θ(w(r1) − r2) . (24) a 0 | {z } | {z } | {z } | {z } suggest r1 as x accept, if r2

The rejection algorithm is just a Monte Carlo integration of the rhs.

Quantum Monte Carlo (QMC) December 14, 2018 17 / 241 Special case: standard normal distribution A crude algorithm Draw N random numbers ri ∈ U[0, 1] and calculate the sum r N 12 X 1 x = (r − ) (25) N i 2 i=1 As N increases this approaches the standard normal distribution, a consequence of the Central Limit Theorem (see MC-lecture.pdf for proof): If you draw N random numbers from any distribution that itself has a statistical mean µ and variance σ, their√ average is normally distributed with average µ and variance σ/ N, as N → ∞.

1 1 Now we draw N random numbers xi = ri − 0.5 ∈ U[− 2 , 2 ], a box-shaped distribution f (x) with µ = hxi = 0 and 1 2 2 2 R ∞ 2 R 2 2 1 1 1 PN 1 σ = h(x − hxi) i = hx i = dxx f (x) = dxx = , so σ = √ , and hence (ri − ) approaches −∞ − 1 12 12 N i=1 2 2 √ normal distribution with variance √ 1 . Multiply with 12N and you get standard normal distribution (σ = 1). 12N This gives a rather good Normal(x) already with small N, as N = 6 or N = 12. The large-x tails are wrong, because you can’t get far with a finite number of steps. Quantum Monte Carlo (QMC) December 14, 2018 18 / 241 Special case: standard normal distribution Box-M¨ulleralgorithm I1

1 Draw r1 and r2 ∈ U[0, 1] √ 2 Evaluate θ = 2πr1 and R = −2 ln r2

3 (x1, x2) = (R cos(θ), R sin(θ)) 4 Go to step 1. Proof:

Z 1 Z 1 p p dr1 dr2δ(x1 − −2 ln r1 cos(2πr2)) δ(x2 − −2 ln r1 sin(2πr2)) 0 0 1 1 Z Z 2 1 x ∂(r , r ) −(x1+x2) /2 2 1 2 = dr1 dr2δ(r1 − e ) δ(r2 − arctan( )) 0 0 2π x1 ∂(x1, x2) 1 −(x2+x2)/2 1 −x2/2 1 −x2/2 = e 1 2 = √ e 1 √ e 2 = Normal(x1) Normal(x2) . 2π 2π 2π The algorithm simply computes the lhs integrals using MC.

1G. Box and M. M¨uller,Ann. Math. Stat. 38 (1958) 610 Quantum Monte Carlo (QMC) December 14, 2018 19 / 241 Special case: standard normal distribution

Box-M¨ulleralgorithm II Uses the rejection method in order to avoid trig. functions.

1 Draw r1 and r2 ∈ U[0, 1]

2 Make R1 = 2r1 − 1 and R2 = 2r2 − 1, they sample ∈ U[−1, 1] 2 2 3 If R = R1 + R2 > 1 reject the pair and go to step 1 4 Result: r −2 ln R (x , x ) = (R , R ) (27) 1 2 R 1 2

5 Go to step 1

Quantum Monte Carlo (QMC) December 14, 2018 20 / 241 Fernand´ez–Riveroalgorithm Fernand´ez–Rivero algorithm2 is a small Maxwell-Boltzmann gas simulation with fictitious energy exchanges (step 5). After thermalization ”particle” velocities v have normal distribution (step 8)

1 Initialise vi = 1, i = 1,..., N (N is about 1024) and set j = 0

2 Draw K (about 16) values θk ∈ U[0, 2π]. Compute ck = cos(θk ) and sk = sin(θk ). 3 Set j = (j + 1) mod N, draw i ∈ IU[0, N − 1] so that i 6= j 4 Draw k ∈ IU[0, K − 1]

5 Set tmp = ck vi + sk vj and vj = −sk vi + ck vj

6 Set vi = tmp 7 If still in thermalization go to step 3

8 Result: vi and vj 9 Go to 3 Here IU[0, N] means random integer between 0 and N. 2J. F. Fernand´ezand J. Rivero, Comp. in Phys. 10 (1996) 83-88. Quantum Monte Carlo (QMC) December 14, 2018 21 / 241 Markov Chain Monte Carlo Markov chain Markov Chain is a chain of states, visited with a rule to pick the next state xi+1 from the present one xi . If we go on forever, states are visited with the weight w(x) (normalized PDF is π(x)). This Markov chain forms a random walk.

Here π(x) is the asymptotic, stationary, or limiting distribution.

Example 1: Start the chain from x1 = 1. The rule of the next value is xi+1 = (xi + 1)%5 (modulo). The chain is 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, .... As a result, the weight of each value is w(x) = 1, and the PDF is π(x) = 1/5.

Example 2: Start from x1 = 0. The rule is xi+1 = xi + ση, where η is a random number drawn from the standard normal distribution. The weight −x2/(2σ2) of each value√ is w(x) = e , and the PDF π(x) = 1/(σ 2π)e−x2/(2σ2).

Quantum Monte Carlo (QMC) December 14, 2018 22 / 241 Markov Chain Monte Carlo

The MC estimate with M samples of an integral is computed as a sum,

Z ∞ M 1 2 1 X 1 2 dx √ e−x /2f (x) ≈ f (x ) , x sampled from √ e−x /2 . M i i −∞ 2π i=1 2π (28)

We know how to draw independent samples from a standard normal distribution (Box-M¨uller,Fernand´ez-Rivero etc.). On the previous slide we stated that the Markov chain with the rule xi+1 = xi + ση has 2 2 π(x) = √1 e−x /(2σ ). σ 2π

Quantum Monte Carlo (QMC) December 14, 2018 23 / 241 Markov chain vs. direct sampling

Think about computing

M Z ∞ 1 X w(x)f (x) ≈ f (x ) . (29) M i −∞ i=1

In principle, you can draw the M points xi from distribution π(x) using a) Direct sampling of π(x): Always do this if you can.

b) Markov chain {x1, ..., xM } that has the limiting distribution π(x).

Here a) is more effective, because the points xi are uncorrelated. However, we have algorithms only for sampling a few simple distributions, and many-body wave functions are not among those. Markov chains are inferior in that the points are correlated, but superior in that you can sample an almost arbitrary distribution: All you need is the rule to generate the next point: finding it is our next topic.

Quantum Monte Carlo (QMC) December 14, 2018 24 / 241 Detailed balance

Master equation: The weight (probability if normalized) of a state S0 varies as a function of the simulation time (treated as continuous) :

dπ(S0) X X = P(S → S0)π(S) − P(S0 → S)π(S0) , (30) dt S S

Here P(S → S0) is the rule to change from S to S0, and we need one that dπ(S0) gives dt = 0, because then we get time-independent π(S) as the limiting, equilibrium distribution. The detailed balance condition3 is a solution: P(S → S0)π(S) = P(S0 → S0)π(S0) , (31) where π(S) is the weight of state S. The detailed balance condition is a sufficient, but not necessary, condition that the system reaches the correct equilibrium.

3Also known as microscopic reversibility. Quantum Monte Carlo (QMC) December 14, 2018 25 / 241 Detailed balance

Make the change from state S to S0 in two stages: 1 Suggest the change S → S0 with a transition rule (matrix) T (S → S0) 2 Accept the change S → S0 with probability A(S → S0). so the rule can be written as

P(S → S0) = T (S → S0) A(S → S0) . (32) | {z } | {z } ”Try” ”Accept”

This way it’s easier to take into account the fact that you may have a nonsymmetric transition rule, T (S → S0) 6= T (S0 → S). Requiring that the detailed balance condition is satisfied still leaves an infinite number of possible rules P(S → S0). Which one is the most effective? Meaning, which rule gives π(S) fastest? Let’s assume for a while that T (S → S0) = T (S0 → S), so that P(S → S0) = A(S → S0), and look at the Metropolis answer in the quest of the most effective rule.

Quantum Monte Carlo (QMC) December 14, 2018 26 / 241 Metropolis algorithm Original problem: sample states, so that they obey the Boltzmann PDF, 1 π(S) = e−E(S)/T , k ≡ 1 . (33) Z B The solution by Nicholas Metropolis, Arianna W. Rosenbluth, Marshall N. Rosenbluth, Augusta H. Teller, and Edward Teller (MR2T 2, 1953): Accept moves from state S to S0 with probability

h i  π(S0) A(S → S0) = min 1, e−∆E/T = min 1, , (34) π(S)

where ∆E = E(S0) − E(S). This Metropolis algorithm has two merits:

I The partition function Z is not involved. P 0 P 0 0 At equilibrium the master equation gives S P(S → S )π(S) − S P(S → S)π(S ) = 0, so any constant factors in π(S) cancels.

I It reaches the equilibrium distribution π(S) fast.

Quantum Monte Carlo (QMC) December 14, 2018 27 / 241 Metropolis-Hastings algorithm

If you try moving right more than left, you should accept left moves more easily. The detailed balance condition with nonsymmetric proposals T (S → S0) 6= T (S0 → S):

P(S → S0) T (S → S0)A(S → S0) π(S0) = = . (35) P(S0 → S) T (S0 → S)A(S0 → S) π(S)

Compensate with acceptance,

 T (S0 → S)   T (S0 → S)π(S0) A(S → S0) = min 1, e−∆E/T = min 1, T (S → S0) T (S → S0)π(S)

(36)

Quantum Monte Carlo (QMC) December 14, 2018 28 / 241 Variational Monte Carlo (VMC)

Energy of the trial state |ϕT i is

R ∗ hϕT |H|ϕT i dRϕT (R) HϕT (R) ET = = R 2 (37) hϕT |ϕT i dR|ϕT (R) | R 2 h −1 i dR|ϕT (R) | ϕT (R) HϕT (R) = R 2 . (38) dR|ϕT (R) | The quantity

2 |ϕT (R)| w(R) = R 2 (39) dR|ϕT (R)| is a good PDF ⇒ can be sampled in MC. 2 Use Metropolis (Markov Chain) to draw samples from |ϕT (R)| R 2 Why: only ratios of weights matter ⇒ dR|ϕT (R)| is irrelevant !

Quantum Monte Carlo (QMC) December 14, 2018 29 / 241 Metropolis VMC algorithm N particles, wf ϕT (R), R = (r1, ..., rN )

1 Pick initial configuration R1 and set step size step. 2 Pick 1:st particle, set i = 1.

3 Draw random displacement vector d = (dx , dy , dz ), 1 1 dx , dy and dz ∈ U[− 2 , 2 ] 0 4 Suggest new position ri = ri + step d 0 2 2 5 Compute ratio = |ϕT (R )| /|ϕT (R)| 6 Metropolis question: Accept the move with probability min [1, ratio]. If ratio > 1 accept move. Else, draw t ∈ U[0, 1] 0 and if ratio > t accept move. If move was accepted set ri = ri , else keep old ri . 7 Pick next particle, set i = i + 1. If i < N go to 3. 8 If still in thermalization, go to 3. Adjust step to keep acceptance ∈ [40, 60] 9 Accumulate averages, print out progress.

10 Keep collecting data,Quantum go to Monte 2 Carlo (QMC) December 14, 2018 30 / 241 Energy optimization Let’s look at two flavours, energy optimization and variance optimization. Energy optimization relies on the Rayleight-Ritz variational principle: Among states with the correct symmetry (Bose or Fermi), the ground state has the lowest energy.

This ensure, that optimization of ϕT (R; α) wrt. energy, ∂E(α) = 0 for optimal α . (40) ∂α Caveats: • The average E(α) cannot always be determined exactly – in MC it has stochastic error ⇒ the minimum of the curve hE(α)i has stochastic error ⇒ optimal α has stochastic error • The many-body wave function is usually not a simple elementary function ⇒ optimal α gives optimal ϕT (R; α) only among a class of functions. Quantum Monte Carlo (QMC) December 14, 2018 31 / 241 Energy optimization

More serious caveats: • The many-body wave function cannot be exactly represented by a finite number of samples {R}.

• E(α) is actually evaluated using a finite sample {R} = {R1, ...RN }, so E(α) ≈ hE(α)i{R}.

– There is no natural lower limit to the energy hE(α)i{R}. ⇒ energy optimization may be unstable, stability may require a very big sample {R}. This usually manifests itself as hE(α)i{R} getting ridiculously low, because the small sample {R} happened to find a low-energy pithole. This stability problem is one of the reasons why variance optimization may be more suitable than energy optimization.

Quantum Monte Carlo (QMC) December 14, 2018 32 / 241 Variance optimization Variance optimization relies on the zero variance principle: The variance in the variational energy vanishes for a trial wave function, which coincides with any eigenstate of the Hamiltonian.

Proof: Suppose ϕT (R; α) = φi (R), the i:th eigenstate of Hˆ. The variance of energy is σ2 = hE(α)2i − hE(α)i2 = 0, because R 2 2 2 dR|ϕT (R; α)| EL(R; α) hE(α) i = R 2 dR|ϕT (R; α)| R 2 −1 ˆ −1 ˆ dR|φi (R)| [φi (R)Hφi (R)][φi (R)Hφi (R)] = R 2 dR|φi (R)| R 2 2 dR|φi (R)| Ei 2 = R 2 = Ei (41) dR|φi (R)| and R 2 2 R 2 2 2 dR|ϕT (R; α)| EL(R; α) dR|φi (R)| Ei 2 hE(α)i = R 2 = R 2 = Ei . dR|ϕT (R; α)| dR|φi (R)| (42) Quantum Monte Carlo (QMC) December 14, 2018 33 / 241 Energy vs. variance optimization

Comments on variance optimization: • Variance – unlike energy – has a natural lower limit, σ2 ≥ 0. • Variance-optimized energy ≥ energy-optimized energy

Quantum Monte Carlo (QMC) December 14, 2018 34 / 241 Energy vs. variance optimization Energy optimization and variance optimimization are not equivalent. Higher energy result can have lower variance and vice versa:

-2.83 -2.84 -2.85 -2.86 -2.87 -2.88

Energy [Ha] -2.89 -2.90 -2.91 -2.92 0 10000 20000 30000 40000 50000 MC steps

He atom: Steps 0-25000: optimized energy, E = −2.878, σ2 = 0.11. Steps 25001- : optimized variance, E = −2.869, σ2 = 0.08.

Quantum Monte Carlo (QMC) December 14, 2018 35 / 241 Objective functions

Minimize an objective function, one possibility is

PNopt 2 2 i=1 w(Ri ; α)[EL(Ri ) − Eguess] σopt(α) = , (43) PNopt i=1 w(Ri ; α) where the weight function is

2 ϕT (Ri ; α) w(Ri ; α) = , (44) ϕT (Ri ; α0)

and Ri are sampled using ϕT (Ri ; α0) with a fixed α0, known as correlated sampling, to be explained on the next slide.

Quantum Monte Carlo (QMC) December 14, 2018 36 / 241 Correlated sampling Direct minimization may be too inaccurate due to statistical fluctuations of data. The differences of the correlated averages can be much more accurate than the averages themselves. Energy with parameters α:

R 2 dR|ϕT (R; α)| EL(R; α) hE(α)i ≡ R 2 (45) dR|ϕT (R; α)| h 2 i R 2 |ϕT (R;α)| dR|ϕT (R; α0)| 2 EL(R; α) |ϕT (R;α0)| = 2 . R 2 |ϕT (R;α)| dR|ϕT (R; α0)| 2 |ϕT (R;α0)|

2 I Sample points R using weight |ϕT (R; α0)| ; parameters are α0 2 2 |ϕT (R;α)| |ϕT (R;α)| I Evaluate (a) 2 EL(R; α) (b) 2 |ϕT (R;α0)| |ϕT (R;α0)|

Quantum Monte Carlo (QMC) December 14, 2018 37 / 241 Correlated sampling

Observations about correlated sampling:

I Variance of individual values hE(α)i is larger that sampling from 2 |ϕT (R; α)| directly ⇒ Correlated sampling is no good for absolute energy values

I Variance of differences hE(α1)i − hE(α2)i can be smaller than what it 2 would be if hE(α1)i was sampled from |ϕT (R; α1)| and hE(α2)i was 2 sampled from |ϕT (R; α2)| : Fluctuations ”cancel in the same direction”, the differences

hE(α1)i − hE(α2)i , (46)

are more accurate. ⇒ Correlated sampling is good for hunting energy differences. This makes correlated sampling suitable for optimization of the trial wave function.

Quantum Monte Carlo (QMC) December 14, 2018 38 / 241 Correlated sampling Energy optimization with correlated samples

He atom two 1S orbitals; Correlated sampling -1 12 (E-Eguess)2 -1.2 E 10 -1.4 )

-1.6 2 8

-1.8 (Ha 2 -2 6 E (Ha) -2.2 4

-2.4 (E-Eguess) -2.6 2 -2.8 -3 0 1 1.5 2 2.5 3 alpha The energy-optimized value is 1.6875, which can be found also analytically – see next page. Quantum Monte Carlo (QMC) December 14, 2018 39 / 241 Optimization on paper With a 1S product wf the optimization can be done by hand. e.g. He, 1 1 hϕ (R)|− ∇2|ϕ (R)i = α2 (47) T 2 i T 2 2 hϕT (R)|− |ϕT (R)i = −2α (48) ri 1 5 hϕT (R)|− |ϕT (R)i = α , (49) rij 8 so (this is not the local energy, it’s the energy of the trial state) 5 E(α) = α2 − 4α + α . (50) 8 5 This gives optimized value α = 2 − 16 . Similarly, the first elements give elem α E(α) (au) Exact (au) H 1 -0.5 -0.5 5 He 2 − 16 =1.6875 -2.8476 -2.90372 5 Li 3 − 8 =2.375 -8.4609 -7.47806

Quantum Monte Carlo (QMC) December 14, 2018 40 / 241 Virial theorem and full optimization For Coulomb potential, the virial theorem states that hViˆ = −2hTˆ i . (51) A good check, but can’t really tell if one trial wave function is better than the other. Why not do full optimization ? Find the normalized wave function of lowest energy: Z Z  E[Ψ, Ψ∗, λ] = dRΨ∗(R)HˆΨ(R) − λ dR|Ψ(R)|2 Z Z vary Ψ∗ : δE = dRδΨ∗(R)HˆΨ(R) − λ dRδΨ(R)∗Ψ(R) Z h i = dR HˆΨ(R) − λΨ(R) δΨ(R)∗ . (52)

Take arbitrary δΨ(R)∗ , and we are back to Schr¨odingerequation HˆΨ(R) = λΨ(R) Harharhar! (53)

Quantum Monte Carlo (QMC) December 14, 2018 41 / 241 Cusp conditions

In the local energy, infinities of the potential energy should be cancelled by those of the kinetic energy4. These happen if

I two electrons are too close

I electron get too close to nucleus

Concentrate on two electrons, keeping the rest fixed: relative r = r1 − r2 1 and center-of-mass RCM = 2 (r1 + r2). Since (see lecture notes for details) 1 ∇2 + ∇2 = 2∇2 + ∇2 , (54) 1 2 r 2 RC M the Hamiltonian is   N 1 2 2 1 X 2 Hˆ = − ∇ + ∇ − ∇ + V (r, Rcm, r3, ..., rN ) . (55) 4 RCM r 2 i i=3

4T. Kato, Comm. Pure Appl. Math. 10, 151 (1957). Quantum Monte Carlo (QMC) December 14, 2018 42 / 241 Cusp conditions Try a trial wf of Jastrow type,

−u(r) Ψ(R) = Ψ(r, Rcm, r3, ..., rN ) = e f (r)Q(Rcm, r3, ..., rN ) , (56)

where

1 f (0) 6= 0, if the spins at r1 and at r2 are anti-parallel

2 f (0) = 0, and f (−r) = −f (r), if the spins at r1 and at r2 are parallel The potential part diverges as 1/r, so we want to keep this h(r) finite:

1  1 h(r) = −∇2 + e−u(r)f (r) . (57) e−u(r)f (r) r r

Expand (leave out the arguments r),

2u0 1 1 r 1 h = + u00 − u02 + + 2u0 · ∇ f − ∇2f , (58) r r f r r f r where u0 ≡ du/dr. Look at the two cases separately.

Quantum Monte Carlo (QMC) December 14, 2018 43 / 241 Cusp conditions

Case 1: anti-parallel spins, f (0) 6= 0 Only 1. and 4. terms are singular,

2u0 1 1 r 1 h = + u00 − u02 + + 2u0 · ∇ f − ∇2f , (59) r r f r r f r so we set 2u0 + 1 finite , (60) r so the cusp condition is

du 1 = − . (61) dr 2 r=0

Quantum Monte Carlo (QMC) December 14, 2018 44 / 241 Cusp conditions

Case 2: parallel spins, f (0) = 0, and f (−r) = −f (r) Taylor expansion of f (r) around origin is

f (r) = a · r + O(r 3) , (62)

which has only odd terms because f (−r) = −f (r). Close to origin we get

2u0 1 1 r 4u0 1 h ≈ + u00 − u02 + +2 u0 · a = + , (63) r r a · r r r r so the cusp condition is

du 1 = − . (64) dr 4 r=0

Quantum Monte Carlo (QMC) December 14, 2018 45 / 241 Diffusion Monte Carlo (DMC) Schr¨odingerequation in imaginary time ⇒ diffusion equation ∂|Ψ(τ)i − = H|ˆ Ψ(τ)i . (65) ∂τ formal solution is (if Hˆ does not depend on τ)

ˆ |Ψ(τ)i = e−Hτ |Ψ(0)i projection . (66)

The eigenstates |φi i of Hˆ are solutions of

H|ˆ φi i = Ei |φi i, E0 < E1 < E2 < . . . . (67) We can expand any N-body state in the basis of eigenstates of Hˆ, X |Ψ(0)i = ci |φi i , (68) i so

X −Ei τ |Ψ(τ)i = ci e |φi i . (69) i

Quantum Monte Carlo (QMC) December 14, 2018 46 / 241 Diffusion Monte Carlo (DMC)

Stabilise the evolution by subtracting a trial or reference energy ET ≈ E0:

−(H−ˆ ET )τ X −(Ei −ET )τ |Ψ(τ)i = e |Ψ(0)i = ci e |φi i . (70) i

States with Ei > ET will decay. The projection is Green’s function

ˆ Gˆ(τ) = e−(H−ET )τ , (71)

satisfies the equation

∂Gˆ(τ) − = (Hˆ − E )Gˆ . (72) ∂τ T Represented by a coordinate-space matrix with elements

ˆ hR0|Gˆ(τ)|Ri = hR0|e−(H−ET )τ |Ri ≡ G(R0, R; τ) . (73)

Quantum Monte Carlo (QMC) December 14, 2018 47 / 241 Short time G(τ): Operator splitting ˆ Usually Hˆ = Tˆ + Vˆ, and [Tˆ, Vˆ] 6= 0 ⇒ we don’t know e−(H−ET )τ exactly. But we can approximate,

ˆ ˆ ˆ ˆ ˆ G(τ) = e−(H−ET )τ = e−(T +V−ET )τ = e−T τ e−(V−ET )τ +O(τ 2) . (74) | {z } | {z } GTˆ (τ) GVˆ (τ) The potential part is easy,

0 −(V (R)−ET )τ 0 GVˆ (R , R; τ) = e δ(R − R) . (75) The kinetic part is a bit trickier (to be derived later),

(R−R0)2 0 −3N/2 − 4λτ GTˆ (R , R; τ) = (4πλτ) e . (76) Put together, we get the ”primitive approximation”,

0 2 0 −3N/2 − (R−R ) −(V (R)−E )τ G(R , R; τ) ≈ (4πλτ) e 4λτ e T . (77)

Quantum Monte Carlo (QMC) December 14, 2018 48 / 241 Diffusion GTˆ (τ) Let’s derive the coordinate-space representation of the diffusion Green’s function. We use the eigenstate expansion (K is a 3N-dimensional momentum space vector), ˆ 2 2 T φK(R) = (−λ∇R)φK(R) = λK φK(R) (78) 1 −iK·R φK(R) = hR|Ki = √ e , (79) L3N and the states |Ki are a complete basis. The coordinate-space

representation of GTˆ (τ) is

0 0 −τTˆ X 0 −τTˆ GTˆ (R , R; τ) ≡ hR |e |Ri = hR |e |KihK|Ri (80) K X 0 −τλK 2 ∗ X 0 ∗ −τλK 2 = hR |e |KiφK(R) = φK(R )φK(R)e (81) K K 1 X 0 2 = e−iK·(R −R)e−τλK . (82) L3N K

Quantum Monte Carlo (QMC) December 14, 2018 49 / 241 Diffusion GTˆ (τ)

The momentum values are 2π/L apart, and for large L the sum can be converted to an integral. 5

X L3N Z ≈ dK (83) (2π)3N K Z 1 X 0 2 1 0 2 e−iK·(R −R)e−τλK ≈ dKe−iK·(R −R)e−τλK , (84) L3N (2π)3N K where the integral is a Fourier transform of a Gaussian, leading to the nice result (R−R0)2 0 −3N/2 − 4λτ GTˆ (R , R; τ) = (4πλτ) e . (85) This is usually an excellent approximation, so I left out the ”≈”.

5If not, evaluate the sum. Quantum Monte Carlo (QMC) December 14, 2018 50 / 241 Simulation of GTˆ (τ): Diffusion

We want to compute evolution |Ψ(τ)i = GTˆ (τ)|Ψ(0)i, which is

M Z 1 X ψ(R0; τ) = dRG (R0, R; τ)ψ(R; 0) ≈ ψ(R ; 0) , (86) Tˆ M i i=1

0 0 where Ri is sampled from GTˆ (R , R; τ) (fixed R and τ). 0 GTˆ (R , R; τ) is a product of 3N Gaussians (in 3D), so all of them can be sampled independently ⇒ 3N independent diffusions – but what is σ? Compare the exponents: √ 2σ2 = 4λτ ⇒ σ = 2λτ . (87)

Result: we can sample points Ri by a random walk with the rule √ Ri+1 = Ri + 2λτ η , (88)

where η = (ηx , ηy , ηz ), ηx,y,z sample standard normal distribution.

Quantum Monte Carlo (QMC) December 14, 2018 51 / 241 MC representation of the many-body wave function

In VMC we had an analytical wave function, but in DMC we don’t have an analytical form for Ψ(R, τ). Instead, DMC represents Ψ(R, τ) in terms of a finite number of samples {R}. These configurations are made of ”walkers” (they walk a Markov chain). Consequences: 1 Need quite a large sample {R} to represent Ψ(R, τ)

I Use of the order of 100–10000 (depending on the problem) configurations R, each is one possible configuration in Ψ(R, τ) I Slower than VMC by about the number of configurations I Many walkers ⇒ consumes memory I Each configuration is independent ⇒ very good parallelization! Only now and then collect data and do branching. 2 Too few configurations means Ψ(R, τ) is poorly represented. ⇒ The algorithm must keep the number of configurations large – but not too large, or you’re out of memory.

Quantum Monte Carlo (QMC) December 14, 2018 52 / 241 First DMC algorithm

Pick a large number of configurations {R} to begin with. 0 1 Diffusion due to GTˆ (τ): Move from R → R diffusively, in other words move each walker according to √ 0 ri = ri + η 2λτ ,

where η is a d-dimensional Gaussian random variable with zero mean and unit variance.

2 Branching due to GVˆ (τ): The wave function Ψ(R, 0) is multiplied by the factor e−(V (R)−ET )τ . So we calculate V (R) for each configuration and see whether this factor is more or less than one, and create/destroy configurations accordingly. Walkers are not moving. Alas, this is no good if the potential is singular: diffusion takes walkers sooner or later to a near-singular position.

Quantum Monte Carlo (QMC) December 14, 2018 53 / 241 First DMC algorithm The factor e−(V (R)−ET )τ makes the algorithm problematic: I Repulsive potential, V (R)  0 if particles come too close. The walker is killed in branching. Easily lots of killed walkers ⇒ only a few may survice ⇒ bad statistics and large fluctuations in number of walkers I Attractive potential, V (R)  0, if particles come too close. The walker branches to very many walkers. ⇒ large jump up in number of walkers ⇒ bad statistics and large fluctuations in number of walkers Bad statistics results if present walkers are descendants of too few walkers. One way to see where problems are is to realize, that the sole energy measure is the potential energy, so the algorithm would have to produce coordinates {R}, where

hV (R)iR = E0 . (89) In other words, one evaluates the potential energy in well-chosen coordinates, where it averages to the ground state energy. Conclusion: we’d better improve the algorithm so that walkers stay away from regions of large |V (R)|. This can be done with importance sampling. Quantum Monte Carlo (QMC) December 14, 2018 54 / 241 Importance sampling in DMC Solve the imaginary-time evolution of the product

f (R; τ) ≡ Ψ(R; τ)ϕT (R) , (90) knowing that the evolution of Ψ(R; τ) is given by the imaginary-time Schr¨odingerequation, ∂Ψ(R; τ) − = (Hˆ − E )Ψ(R; τ) . (91) ∂τ T Insert Ψ(R; τ) = f (R; τ)/ϕT (R) to get ∂f (R; τ) − = −λ∇2 f (R; τ) + λ∇ · [F(R)f (R; τ)] + [E (R) − E ] f (R; τ) . ∂τ R R L T (92) drift force (or drift velocity, quantum force)

2 ∇RϕT (R) F(R) ≡ ∇R ln |ϕT (R)| = 2 , (93) ϕT (R) −1 and the familiar local energy EL(R) ≡ ϕT (R) HˆϕT (R). Quantum Monte Carlo (QMC) December 14, 2018 55 / 241 Green’s function for importance sampling DMC The imaginary-time evolution is ∂f (R; τ) − = −λ∇2 f (R; τ) + λ∇ · [F(R)f (R; τ)] + [E (R) − E ] f (R; τ) ∂τ R R L T ≡ HˆF f (R; τ) , (94)

which defines a new operator, HˆF . Again the formal solution is ˆ f (R; τ) = e−τHF f (R; 0) , (95)

and the Green’s function is again

ˆ G(R, R0; τ) = hR0|e−τHF |Ri . (96)

Once we know what this is, we can write the evolution as an integral equation, Z f (R; τ) = dR0G(R, R0; τ)f (R0; 0) . (97)

Quantum Monte Carlo (QMC) December 14, 2018 56 / 241 Green’s function for importance sampling DMC Without importance sampling we did two things: 1 Deside how accurate Green’s function we want. We settled for the most crude Trotter expansion, ˆ ˆ ˆ e−τH ≈ e−τT e−τV , (98) which has timestep error O(τ 2). 0 0 −τTˆ 0 0 −τVˆ 2 Solve GTˆ (R , R; τ) = hR |e |Ri and GVˆ (R , R; τ) = hR |e |Ri And we were done. For better accuracy we could improve the Trotter expansion. Importance sampling adds one complication, namely the drift term ˆ 2 HF f (R; τ) = −λ∇Rf (R; τ) + λ∇R · [F(R)f (R; τ)] + [EL(R) − ET ] f (R; τ) | {z } | {z } | {z } diffusion drift branching

≡ TˆF f (R; τ) + [EL(R) − ET ] f (R; τ) . (99) Evolution with only diffusion and drift is known as the Fokker-Planck equation. Quantum Monte Carlo (QMC) December 14, 2018 57 / 241 Fokker-Planck operator

The drift-diffusion a.k.a Fokker-Planck evolution is ∂f (R; τ) − = −λ∇2 f (R; τ) + λ∇ · [F(R)f (R; τ)] ≡ Tˆ f (R; τ) (100) ∂τ R R F Define the drift operator,

F(Rˆ)|Ri ≡ F(R)|Ri . (101)

to get h i ∇R · [F(R)f (R; τ)] = ∇R · hR|F(Rˆ)|f (τ)i = ∇R · F(Rˆ)f (R; τ) . (102)

so the Fokker-Planck operator is

ˆ 2 ˆ TF = −λ∇R + λ∇R · F(R) . (103)

Quantum Monte Carlo (QMC) December 14, 2018 58 / 241 Fokker-Planck operator The Fokker-Planck operator is usually written in terms of the momentum operator Pˆ = −i∇R,

2 TˆF = λPˆ + iλPˆ · F(Rˆ) . (104)

With timestep error O(τ 2),

ˆ ˆ ˆ e−τHF ≈ e−τTF e−τEL−ET (105)

where, for shortness, I defined ”local energy operator” EˆL similar to the 0 0 potential operator hR |EˆL|Ri = EL(R)δ(R − R). That’s simple, the Fokker-Planck Green’s function is more involved. We need to evaluate

0 0 −τTˆF GTF (R , R; τ) ≡ hR |e |Ri . (106)

But before we do, let’s look at why did we ”give up” and defined a drift operator.

Quantum Monte Carlo (QMC) December 14, 2018 59 / 241 Fokker-Planck evolution

Why didn’t we solve the drift-diffusion matrix elements and be happy? Try to proceed as usual, and turn our attention to the eigenfunction expansion – just to show you how and why this is wrong. Let’s boldly define

TˆF QQ(R) = qQQQ(R) (not valid !) (107) X X QQ(R) = hR|Qi = hR|KihK|Qi = aQ,KφK(R) . (108) K K Repeat the steps with free diffusion,

0 X −τqQ ∗ 0 GTF (R , R; τ) = e QQ(R )QQ(R) (not valid !) . (109) Q

and we are done. But hold on, can we solve the eigenproblem for TˆF ?

Quantum Monte Carlo (QMC) December 14, 2018 60 / 241 Fokker-Planck evolution

Let’s try to solve the Fokker-Planck eigenproblem (non-existent, but we were curious). First,

ˆ 2 TF φK(R) = −λ∇RφK(R) + λ∇R · [F(R)φK(R)] . (110)

1 −iK·R Insert the eigenstates of Tˆ, φK(R) = √ e , L3N

2 TˆF φK(R) = λK φK(R) + λ∇R · [F(R)φK(R)] . (111)

Using ∇RφK(R) = −iKφK(R) we get

λ∇R · [F(R)φK(R)] = λ [∇R · F(R)] φK(R) + iλK · F(R)φK(R) . (112)

Quantum Monte Carlo (QMC) December 14, 2018 61 / 241 Fokker-Planck evolution

So far we have

 2  TˆF φK(R) = λK + λ [∇R · F(R)] + iλK · F(R) φK(R) . (113)

The quantity in brackets depends on R, so it’s not an eigenvalue. The imaginary unit gives us a hint (you can prove it also rigorously) that TˆF is non-hermitian, so we conclude that 6 The Fokker-Planck operator HˆF is non-hermitian , So what’s the problem? The eigenfunction expansion in Eq. (109) is valid only for hermitian operators, non-hermitian operators are much harder to deal with. Another fine mess importance sampling got us into. Let’s return to the drawing board and try another route to solve the Fokker-Planck (drift-diffusion) problem.

6Non-self-adjoint, to be more precise. Quantum Monte Carlo (QMC) December 14, 2018 62 / 241 Fokker-Planck evolution – again

Let’s make a new start and look again at the Fokker-Planck equation,

∂f (R; τ) − = −λ∇2 f (R; τ) + λ∇ · [F(R)f (R; τ)] , (114) ∂τ R R Instead of working with the evolution of the probability density f (R; τ), we can write an equivalent stochastic PDE for time evolution of the observable, R(τ). The equation for R(τ) is a Langevin equation. 7 The basic problem is obvious: diffusion and drift don’t commute. We can try splitting them to two separate evolution processes we can handle. Be careful, you’d wan’t the same accuracy in τ as you had in the original operator splitting. A better accuracy may be too costly and a worse accuracy sets the overall accuracy to lower. If we are happy with O(τ 2) −τ(−λ∇2 +λ∇ ·F(Rˆ)) −τTˆ −τλ∇ ·F(Rˆ) accuracy, then GF (τ) = e R R ≈ e e R is good enough also here. The first part is diffusion, the second is drift.

7Some mathematicians dislike Langevin equations because of the so-called Itˆo-Stratonovichdilemma: there are two valid interpretations of how certain stochastic integrals should be evaluated; the values of the integrals disagree. Quantum Monte Carlo (QMC) December 14, 2018 63 / 241 Drift evolution Concentrate only on solving only the drift evolution, ∂f (R; τ) − = λ∇ · [F(R)f (R; τ)] (only drift) . (115) ∂τ R The drift Green’s function is propagation of particles along a trajectory, ˆ hR0|e−τλ∇R·F(R)|Ri = δ(R0 − R(τ)) , (116) so let’s ask What are the trajectories R(τ) of particles under drift?

The drift differential equation (115) is a continuity equation, usually written for density ρ(r) and current j(r) as ∂ρ/∂t = ∇ · j. We can interpret the function f (R; τ) as density and λF(R)f (R; τ) as current, so we can pick the solution from literature: the trajectories are solutions of dR(τ) = λF(R(τ)) . (117) dτ The solution that is good enough for present purposes is R(τ) = R(0) + F(R(0))λτ + O(τ 2) . (118) Quantum Monte Carlo (QMC) December 14, 2018 64 / 241 The Langevin equation of Fokker-Planck evolution

Now we know what drift does (correct to O(τ 2)),

ˆ hR0|e−τλ∇R·F(R)|Ri = δ(R0 − R − λτF (R)) , (119)

A random walk with both diffusion and drift is simply √ R0 = R + 2λτη + λτF (R) . (120)

This is the approximate solution of the stochastic Langevin equation, which was equivalent to the Fokker-Planck equation for the probability density f (R; τ).8 This approximate solution begins to fails because the larger the timestep, the more frequently diffusion takes particles to very large drift. This error may not be healed in subsequent moves and you begin to get biased results.

8It’s sometimes stated that the Langevin equation is analogous to Heisenberg picture, Fokker-Planck equation is analogous to Schr¨odingerpicture. Frankly, I don’t see the analogy. Quantum Monte Carlo (QMC) December 14, 2018 65 / 241 A working first order DMC algorithm

1 Initialise many (∼ 100 − 500) configurations, where walkers are 2 distributed according to |ϕT (R)| . We don’t want them all destroyed in the branching process, so we need to generate as diverse a set as 2 possible. You can pick from a VMC run that samples |ϕT (R)| positions R now and then to a zeroth generation of configurations. The total number of configurations in a generation is its population. 2 In each configuration of the present generation, move the i th walker with √ new ri = ri + λτF(R) + η 2λτ , (121) where η is a 3-dimensional Gaussian random vector. 3 Calculate a weight for the move 0 2 0 |ϕT (R )| G(R , R; τ) ratio = 2 0 , (122) |ϕT (R)| G(R, R , τ) and accept the move R → R0 with probability min[1, ratio] (”Metropolis question”)

Quantum Monte Carlo (QMC) December 14, 2018 66 / 241 A working first order DMC algorithm

4 Take each configuration in turn and make Ncopies copies of it, h i −τ(EL(R)−ET ) Ncopies = int e + ξ ξ ∈ U[0, 1] , (123)

5 Estimate the ground-state energy E0 by taking the average of the local energies of current generation.

6 Keep the population healthy by adjusting the trial energy ET . One way is to use a feedback mechanism,

NCtarget ET = E0 + κ ln , (124) NC

where E0 is the best guess for the ground-state energy we have so far, NCtarget is the population we’d like to have, and NC is the one we have now. The positive parameter κ should have the smallest value that does the job. 7 go back to step 2

Quantum Monte Carlo (QMC) December 14, 2018 67 / 241 A working first order DMC algorithm Comments: • The accept/reject test is a Metropolis-Hastings test. – The Hamiltonian with drift is non-hermitian; the accept/reject step ensures that the detailed balance condition is satisfied ⇒ makes sure the points R are really sampled from the distribution f (R; τ) = Ψ(R; τ)ϕT (R). – The acceptance must be > 99.9 % – if not, you time step is too large. At your own discretion you may even omit the test and assume that the acceptance is very high anyhow, but then you are on your own. • Controlling the number of configurations (sets of walkers) should be done with kid gloves. The more you force it, the more fluctuations increase elsewhere. No matter how you control the population you will be upsetting randomness, so be gentle. • Use as large a population as you can afford. Something like 5000 configurations is common. Debugging can use a smaller set.

Quantum Monte Carlo (QMC) December 14, 2018 68 / 241 Higher order DMC

The order of DMC comes from how we deal with non-commuting parts in ˆ the Hamiltonian Hˆ. With importance sampling, we must write e−τHF in terms of simpler, albeit approximate, matrix elements:

1 First operator splitting: HˆF = TˆF + EˆL,[TˆF , EˆL] 6= 0 Separate the Fokker-Planck (drift-diffusion) operator TˆF and the local energy operator EˆL.

2 Second operator splitting: TˆF = Tˆ + λ∇R · F(R), [Tˆ, λ∇R · F(R)] 6= 0 The Fokker-Planck equation describing probability density evolution in diffusion under drift is cast to a Langevin equation, an equation of motion of a single walker under a velocity field. To get second or higher order DMC we must improve both splittings in unison, and solve the Langevin equation without loosing accuracy.

Quantum Monte Carlo (QMC) December 14, 2018 69 / 241 What Hamiltonian did we actually use? Let’s ask a question: What ”fake Hamiltonian” Hˆ0 has the exact splitting 9

ˆ0 ˆ ˆ e−τH = e−τT e−τV ? (125)

The Campbell-Baker-Hausdorff (C-B-H) formula 10 states that

Aˆ Bˆ Aˆ+Bˆ+ 1 [Aˆ,Bˆ]+ 1 [A−ˆ Bˆ,[Aˆ,Bˆ]]+... e e = e 2 12 , (126)

so (drop terms beyond τ 3)

τTˆ τVˆ τ(Hˆ+ 1 τ[Tˆ,Vˆ]+ 1 τ 2[Tˆ −Vˆ,[Tˆ,Vˆ]]) τHˆ0 e e = e 2 12 ≡ e , (127)

and read the operator (use [Tˆ, Vˆ] = [Hˆ − Vˆ, Vˆ] = [Hˆ, Vˆ]),

1 1 Hˆ0 = Hˆ + τ[Hˆ, Vˆ] − τ 2[Hˆ − 2Vˆ, [Hˆ, Vˆ]] . (128) 2 12

9S. A. Chin, Phys. Rev. A42 (1990). 10An old theorem (1890,1902), has to do with Lie algebra of a Lie group. Quantum Monte Carlo (QMC) December 14, 2018 70 / 241 Energy accuracy without importance sampling

Now we can find out how bad mistake we did in energy. After DMC without importance sampling has converged, we get the energy

ˆ0 hEi ≡ hELiφ0 = hφ0|H |φ0i (129) 1 1 = E + τhφ |[Hˆ, Vˆ]|φ i − τ 2hφ |[Hˆ − 2Vˆ, [Hˆ, Vˆ]]|φ i (130) 0 2 0 0 12 0 0 1 = E − τ 2hφ |[Hˆ − 2Vˆ, [Hˆ, Vˆ]]|φ i , (131) 0 12 0 0

where the linear term is zero, because |φ0i is an eigenstate of Hˆ,

hφ0|[Hˆ, Vˆ]|φ0i = hφ0|HˆVˆ − VˆH|ˆ φ0i = 0 . (132)

Without importance sampling the energy converges as τ 2 with e−τHˆ ≈ e−τTˆ e−τVˆ

Quantum Monte Carlo (QMC) December 14, 2018 71 / 241 Energy accuracy with importance sampling

Importance sampling makes DMC sample the product φ0(R)ϕT (R), and we evaluate the mixed estimator

ˆ0 hEi ≡ hELiφ0ϕT = hϕT |H |φ0i (133) 1 1 = E + τhϕ |[Hˆ, Vˆ]|φ i − τ 2hϕ |[Hˆ − 2Vˆ, [Hˆ, Vˆ]]|φ i , 0 2 T 0 12 T 0

which converges only linearly, because hϕT |[Hˆ, Vˆ]|φ0i= 6 0. With importance sampling the energy converges as τ with e−τHˆ ≈ e−τTˆ e−τVˆ

Quantum Monte Carlo (QMC) December 14, 2018 72 / 241 Energy accuracy with importance sampling

We saw this linear convergence in the demo program.

He atom (spins up-down) -2.9035

-2.904

-2.9045

-2.905

E (Hartree) E (Hartree) -2.9055 DMC Exact -2.906 -2.90375 -0.362546 timestep

-2.9065 0 0.0005 0.001 0.0015 0.002 0.0025 0.003 0.0035 0.004 0.0045 timestep (1/Hartree)

Quantum Monte Carlo (QMC) December 14, 2018 73 / 241 Propagators with second order accuracy

It’s simple to construct a 2nd order splitting, one popular choice is

−τAˆ+Bˆ − 1 τAˆ −τBˆ − 1 τAˆ e ≈ e 2 e e 2 (134)

Next we must also solve the drift trajectories from Eq. (117)

dR(τ) = λF(R(τ)) (135) dτ to second order. The drift changes as particles move, so Eq. (118) could be improved to (2nd order Runge-Kutta)

1 R(τ) = R(0) + λτF(R(0) + λτF(R(0))) + O(τ 3) . (136) 2

Quantum Monte Carlo (QMC) December 14, 2018 74 / 241 Propagators with second order accuracy

-2.9035

-2.904

-2.9045

-2.905 2nd order results

E Exact 2 -2.9055 -2.90366 -3.46192 x

-2.906

-2.9065

-2.907 0 0.005 0.01 0.015 0.02 0.025 0.03 tau

Figure: Second order argorithm results for He atom, no accept/reject step.

There are several alternatives (see Chin), which differ in how many drift evaluations (expensive) are needed and what is the range of quadratic behaviour. I won’t go into details, but push forward to 4th order algorithms.

Quantum Monte Carlo (QMC) December 14, 2018 75 / 241 Propagators with fourth order accuracy Sheng-Suzuki theorem: there is no 4th order splitting

N ˆ ˆ Y ˆ ˆ e−τ(A+B) = e−τai Ae−τbi B (137) i=1

11 without some ai < 0 and bi < 0. 0 −τt Tˆ This we cannot have in DMC, because a negative ti means hR |e i |Ri is inverse diffusion (backward in time), which cannot be simulated. Something has to be added, and the that’s some commutator(s) of Tˆ and Vˆ. A convenient one to keep is related to the classical force on particle i, 12

N 2 X 2 [Vˆ, [Tˆ, Vˆ]] = 2λ|∇RV (R)| = 2λ |fi (R)| , fi = −∇i V . (138) i=1

11Q. Sheng, IMA J. of Num. Anal. 9, 199 (1989), M. Suzuki, J. Math. Phys. 32, 400 (1991). 12The operator [Vˆ , [Tˆ , Vˆ ]] acts on some φ(R). Quantum Monte Carlo (QMC) December 14, 2018 76 / 241 ˆ 2 The commutator is evaluated like this, T = −λ∇R, V := V (R), [Vˆ, [Tˆ, Vˆ]]φ(R) = [−V 2Tˆ − TˆV 2 + 2V TˆV ]φ (139) = λ[V 2∇2φ + ∇2(V 2φ) − 2V ∇2(V φ)]  = λ V 2∇2φ + ∇ · [2V (∇V )φ + V 2∇φ]  − 2V ∇ · [(∇V )φ + V ∇φ] (140)  = λ V 2∇2φ + 2(∇V )2φ + 2(V ∇2V )φ +2 V (∇V ) · ∇φ

+2 V ∇V · ∇φ + V 2∇2φ  −2V ∇2V φ−2V ∇V · ∇φ−2V ∇V · ∇φ−2V 2∇2φ

coloured terms cancel, only 2nd term survives = 2λ(∇V )2φ . (141)

Quantum Monte Carlo (QMC) December 14, 2018 77 / 241 Propagators with fourth order accuracy

Caleidoscope of 4th order methods (incomplete list): 13 I Trotter (divide τ to infinitely many pieces)

M −τHˆ h − τ Tˆ − τ Vˆ i e = lim e M e M , (142) M→∞

I Ruth-Forest (Ruth (1983, private channels), Forest and Ruth (1990), re-discovered several times around 1990 by Campostrini and Rossi and by Candy and Rozmus) 14 15 16 I Takahashi-Imada (1984) and Li-Broughton (1987) 17 I Chin (1997)

13H. F. Trotter, Proc. Am. Math. Soc. 10, 545 (1959) 14E. Forest and R. D. Ruth , Physica D. 43, 105 (1990) 15M. Takahashi and M. Imada, J. Phys. Soc. Jpn.53, 3765 (1984) 16X. P. Li and J. Q. Broughton, J. Chem. Phys.86, 5094 (1987) 17S. A. Chin, Phys. Lett. A 226, 344 (1997), and S. A. Chin and C. R. Chen, J. Chem. Phys. 117, 1409 (2002) Quantum Monte Carlo (QMC) December 14, 2018 78 / 241 Propagators with fourth order accuracy

Forest-Ruth

−v3τVˆ −t3Tˆ −v2Vˆ −t2τTˆ −v1τVˆ −t1τTˆ −v0τVˆ GˆFR(τ) = e e e e e e e , (143)

with s = 21/3 = 1.25992, 1 1 1 s − 1 v = v = (> 0) , v = v = − (> 0) (144) 0 3 2 2 − s 1 2 2 2 − s 1 s t = t = (> 0) , t = − (< 0!) . (145) 1 3 2 − s 2 2 − s From right to left, the potential will be evaluated at times 0, t1τ,(t1 + t2)τ (< 0!), and τ. Suzuki was right, there are negative coefficients. These make the application quite tricky. The good thing about FR is that it only needs 6 FFT’s to propagate time τ,

Quantum Monte Carlo (QMC) December 14, 2018 79 / 241 Propagators with fourth order accuracy Takahashi-Imada ”not fully fourth order”

−τTˆ −τV−ˆ 1 τ 3[Vˆ,[Tˆ,Vˆ]] −τTˆ GˆTI(τ) = e e 24 e (146)

Chin Several possible forms, one is

−v0τVˆ −t1τTˆ −v1τWˆ −t2τTˆ −v1τWˆ −t1τTˆ −v0τVˆ GˆChin(τ) = e e e e e e e (147) u Wˆ ≡ Vˆ + 0 τ 2[Vˆ, [Tˆ, Vˆ]] , (148) v1

6t1(t1 − 1) + 1 v = , t = 1 − 2t (149) 0 12(t1 − 1)t1 2 1 1 1  1  v1 = − v0 u0 = 2 − 1 , (150) 2 48 6t1(1 − t1) √ and t1 is tunable, 0 ≤ t1 ≤ 1 − 1/ 3. Even 5th order errors may cancel with t1 = 0.35023. All coefficients are positive. Quantum Monte Carlo (QMC) December 14, 2018 80 / 241 What can a good propagator do? We have a good approximation for Gˆ(τ) = e−τHˆ , such as

5 GˆChin(τ) = Gˆ(τ) + O(τ ). (151)

Nothing prevents us from overextending the validity, as long as we know that we are improving. Take a trial wave function ϕT (R) and propagate it, Z 0 0 0 hR|ϕT (τ0)i = ϕT (R; τ0) = dR hR|GChin(τ0)|R iϕT (R ) . (152)

We can use VMC to see how far in τ0 we can go until the energy begins to increase: find τ0 were

hϕT (τ0)|H|ˆ ϕT (τ0)i E(τ0) = (153) hϕT (τ0)|ϕT (τ0)i

is at minimum (approximately).18

18In VMC the normalization is irrelevant. Quantum Monte Carlo (QMC) December 14, 2018 81 / 241 What can a good propagator do? The propagation can now be viewed as a multi-dimensional integral, Z 0 −v0τ0V (R) −t1τ0Tˆ −v1τ0W (R2) ϕT (R; τ0) = dR dR1dR2e hR|e |R2ie (154)

0 −t2τ0Tˆ −v1τ0W (R1) −t1τ0Tˆ 0 −v0τ0V (R ) 0 hR2|e |R1ie hR1|e |R ie ϕT (R ) .

19 Notice that this applied one GChin for a single, long time step τ0.

He4 liquid at equilibrium density

19Rota et al. Physical Review E 81, 016707 (2010); The integrated coordinates can also be thought of as ”shadow coordinates”, as in the variational shadow wave function by L. Reatto, F. Pederiva et al. Quantum Monte Carlo (QMC) December 14, 2018 82 / 241 What can a good propagator do?

Large τ means fast projection and less correlated points in DMC: 20

Liquid He4 : Timesteps 0.01 (dots), 0.05 (small points) and 0.2 (large points). Getting to the ground state takes 10 times more updates with a 2nd order propagator than with a 4th order one.

20H. A. Forbert and S. A. Chin, Phys. Rev. B 63, 144518 (2001) Quantum Monte Carlo (QMC) December 14, 2018 83 / 241 Fixed-node DMC Fixed-node DMC (FN-DMC): use antisymmetric trial wave function,

ϕT (...ri , ..., rj ...) = −ϕT (...rj , ..., ri ...) . (155)

A common way to achieve this is to use

U(R) X ϕT (R) = e dk Dk [φ](R) (156) k

U I Jastrow factor e

I particle-particle correlations I takes care of particle-particle potentials, especially singularities

I Slater determinants Dk

I antisymmetrized single-particle orbitals {φ} I takes care of Pauli principle I Functional of orbitals, evaluated at R: in my clever notation Dk [φ](R)

Quantum Monte Carlo (QMC) December 14, 2018 84 / 241 Jastrow factor

Often the potential doesn’t depend on symmetry, so we choose a convenient way to cancel it’s singularities. In electron systems, we have singular e-n and e-e potentials, so we need at least these correlations (indices i, j for electrons, α for nuclei):

P u (r )+P u (r ) eU(R) = e i,α en iα i

This can be supplemented with an e-e-n factor,

P u (r ,r ,r ) e i

which should be enough, because e-e-e-n is rare due to the Pauli principle.

FN-DMC evolution optimizes the correlations to achieve lowest energy

Quantum Monte Carlo (QMC) December 14, 2018 85 / 241 Slater determinants For spin-1/2 fermions, one often uses two Slater determinants, 21

U(R) ↑ ↓ ϕT (R) = e D (r1...rN↑ )D (rN↑+1...rN ) . (159) Here the Slater determinant for N fermions with spins up is

φ (r ) φ (r ) ... φ (r ) 1 1 2 1 N↑ 1

φ1(r2) φ2(r2) ... φN (r2) 1 ↑ ↑ D (r1...rN ) = q . . . . (160) ↑ N ! . . . ↑ ...... φ (r ) φ (r ) ... φ (r ) 1 N↑ 2 N↑ N N↑ The single-particle orbitals {φ} can be taken from I Hartree-Fock (HF) ← more popular I Density functional theory (DFT) HF has no correlations. This is presumably a good thing, because DMC has the liberty to optimize correlations in the Jastrow factor. DFT tries to add correlations to orbitals, which, presumably, prevents DMC to do it’s best in optimizing correlations. 21While not antisymmetric under exchange of spin-up and spin-down fermions, the expectation values of spin-independent operators are valid. See W. M. C. Foulkes, L. Mitas, R. J. Needs and G. Rajagopal, Rev. Mod. Phys. 73 , 33 (2001). Quantum Monte Carlo (QMC) December 14, 2018 86 / 241 Slater-type orbitals (STO’s)

First, hydrogen-type orbitals are not very useful. The complete set contains discrete status plus the continuum, hence ∞ number of states. Too many of them are needed in representation of core electrons. STO’s have the benefit of having only angular node, Rnl is nodeless:

φnlm(r) = Rnl (r)Ylm(θ, φ) (161) (2ζ)3/2 R (r) = (2ζr)n−1e−ζr , (162) nl Γ(2n + 1)

with a nuclear-charge-related constant ζ. The notation 1s, 2s, 2p, 3d... is re-used. For more flexibility, the exponent can be chosen to depend on nl, ζnl .

Quantum Monte Carlo (QMC) December 14, 2018 87 / 241 Gaussian-type orbitals (GTO’s)

The spherical harmonic GTO’s are chosen for their computational merits, rather than physical properties:

φnlm(r) = Rnl (r)Ylm(θ, φ) (163) s 3/4 2n−l−2 2(2α) 2 √ 2 R (r) = ( 2αr)2n−l−2e−αr . (164) nl π1/3 (4n − 2l − 3)!!

Here n!! is a special double factorial,

1 n = 0  n(n − 2)(n − 4)...2 n > 0, even n!! = (165) n(n − 2)(n − 4)...1 n > 0, odd   1 (n+2)(n+4)...1 , n < 0

Typically, a lot more GTO’s than STO’s are needed, but GTO’s are fast to evaluate. GTO’s have zero cusp and they die out faster in r than STO’s.

Quantum Monte Carlo (QMC) December 14, 2018 88 / 241 Cartesian forms

In cartesian coordinates Slater-type orbitals are

STO i j k −ζr φijk (x, y, z) = x y z e , (166)

and one often uses them as sums of Gaussian primitives,

2 n i j k −αnr Xn(x, y, z) = Nijk x y z e , (167)

where the total angular momentum is l = i + j + k, resulting in one s-function (l = 0), three p-functions (l = 1), six d-functions (l = 2) etc.. Simple ones are STO-nG, n Gaussians fitted to make an STO. Improvements are double-zeta (the ζ’s in the exponent), two basis functions per atomic orbital, triple-zeta etc. Example 3: The ground state of Carbon is 1s22s22p2, and the orbitals 1s, 2s, 2px , 2py , 2pz need minimal basis of 5 basis functions, or 10 double-zeta basis functions.

Quantum Monte Carlo (QMC) December 14, 2018 89 / 241 Slater-Condon rules pq Notation: |Ψmni means from Ψ, change orbital m to p and n to q, (xi := (ri , σi ))

|Ψi := A[ϕ1(x1)ϕ2(x2)...ϕm(xm)ϕn(xn)...ϕN (xN )] (168) p |Ψmi := A[ϕ1(x1)ϕ2(x2)...ϕp(xm)ϕn(xn)...ϕN (xN )] (169) pq |Ψmni := A[ϕ1(x1)ϕ2(x2)...ϕp(xm)ϕq(xn)...ϕN (xN )] . (170) ˆ PN The Slater-Condon rules for a one-body operator F = i=1 fi say, that the expectation value and matrix elements are N X hΨ|F |Ψi = hϕi |f |ϕi i (171) i=1 p hΨ|F |Ψmi = hϕm|f |ϕpi (172) pq hΨ|F |Ψmni = 0 . (173) For example, the one-body Hamiltonian ˆ ˆ ˆ PN 2 H1 = T + V1 = i=1(−∇i + V (ri )) can change at most one orbital at a time. Quantum Monte Carlo (QMC) December 14, 2018 90 / 241 Fixed-node DMC The exact many-body ground state is a superposition of all possible Slater determinants. Say we have N electrons, scattered on the available orbitals. One way to do this is (collective coordinates xi := (ri , σi ), antisymmetrization A) I 1st term: all electrons on the lowest HF orbitals

|Ψi = A[φ1(x1)φ2(x2)...φm(xm)φn(xn)...φN (xN )]

I 2nd term: one electron excited to higher orbital p,

p |Ψmi = A[ϕ1(x1)ϕ2(x2)...ϕp(xm)ϕn(xn)...ϕN (xN )]

I 3rd term: ... HF takes a single Slater determinant (here the 1st term), and optimizes φ’s for minimum energy ⇒ HF orbitals {φ} (solve a non-linear, integro-differential equation) ⇒ the HF energy – a good start.

Quantum Monte Carlo (QMC) December 14, 2018 91 / 241 Hartree-Fock + DMC HF equations are (simplified to some extent)  2  Z γ(r, r0) ~ ∇2 + V (r) + V (r) φ (r) − q2 dr0 φ (r) =  φ (r) , (174) 2m H i |r − r0| i i i where

0 X ∗ 0 γ(r, r ) ≡ φj (r)φj (r ) (175) j P ∗ 0 0 Z φ (r )φj (r ) V (R) = q2 dr0 j j Hartree potential (176) H |r − r0| Solution: Pick your favorite (constraint: money) from a long list of software.22 Mike Towler 23 pinpoints the problem in feeding single-particle orbitals to a QMC code: ”Often people find that their HF/DFT code of choice is not supported, so they give up before they start.”

22wiki DFT software 23towler pisa.pdf Quantum Monte Carlo (QMC) December 14, 2018 92 / 241 Hartree-Fock + DMC

HF energy+ correlation energy = exact energy (definition)

This much of the correlation energy is typically covered:

Hartree-Fock 0 % optimized Slater-Jastrow ∼ 85 % FN-DMC ∼ 95 % Exact 100 %

HF good ⇒ single-determinant Slater-Jastrow wave function OK

atom ground state HF Exp. correlation He 1s(2) -2.861679993 -2.90338683 -0.041706 Li 1s(2)2s(1) -7.432726924 -7.478060323 -0.045333 Be 1s(2)2s(2) -14.57302313 -14.6673564 -0.094333 B 1s(2)2s(2)2p(1) -24.52906069 -24.541246 -0.012185

Quantum Monte Carlo (QMC) December 14, 2018 93 / 241 Dealing with Slater determinants U ↑ ↓ ↓ ↑ Marking ϕT = e D D , assuming i ≤ N↑ (it not, swap D and D ),

↑ ↓ U U ↓ ↑ ∇i ϕT = D D ∇i e + e D ∇i D (177)

∇i ϕT −U U 1 ↑ Fi = 2 = e ∇i e + ↑ ∇i D , (178) ϕT D and

2 ↑ ↓ 2 U ↓ ↑ U U ↓ 2 ↑ ∇i ϕT = D D ∇i e + D ∇i D · ∇i e + e D ∇i D (179)  1    1 −λϕ−1∇2ϕ = e−U ∇2eU + ∇ D↑ · e−U ∇ eU + ∇2D↑ . T i T i D↑ i i D↑ i (180)

Furthermore, in moving particles from old to new positions, we need the ratio Ψ(R ) D↑(new) new U(Rnew )−U(Rold ) = e ↑ . (181) Ψ(Rold ) D (old)

Quantum Monte Carlo (QMC) December 14, 2018 94 / 241 Dealing with Slater determinants The Slater matrix D of spin-up particles has components

Dji = φj (xi ) i ≤ N↑ . (182)

Remember the index order: orbital, particle. I Changing the position of ith particle changes just the ith row of the Slater matrix:

φ1(r1) φ2(r1) ... φN (r1) ↑

...... ↑ 1 D (r1...r ) = φ1(ri ) φ2(ri ) ...φ N (ri ) . (183) N↑ q ↑ N↑! ...... φ (r ) φ (r ) ... φ (r ) 1 N↑ 2 N↑ N N↑

I The cofactor of matrix element (i, j), Cij , doesn’t depend on matrix elements on ith row, jth column.

i+j Cij = (−1) Mij , Mij is the i, j minor , (184)

and minor Mij leaves out matrix row i and column j.

Quantum Monte Carlo (QMC) December 14, 2018 95 / 241 Dealing with Slater determinants If the ith particle moves, then24

D¯ := (DT )−1 (185) D(new) X X q := = D¯old Dnew = D¯old φ (rnew ) , (186) i D(old) ji ji ji j i j(orb.) j(orb.)

where D = D↑ or D↓. After an accepted move, update (Sherman–Morrison formula)

( D¯ /q, k = i ¯ jk Djk = ¯ D¯ φ (rnew ) (187) ¯ Djk P nk n i Djk − q n(orb.) q k 6= i .

The inverses D¯ are computed in the beginning, and only updated as particles are moved.

24S. Fahy, X. W. Wang, and S. G. Louie, Phys. Rev. B Vol. 42, Nr. 6, 3503 (1990), applied first applied in QMC by Ceperley, Chester, and Kalos (1977). Quantum Monte Carlo (QMC) December 14, 2018 96 / 241 Dealing with Slater determinants Details: Matrix inverse is related to the cofactor matrix,

C C T D¯ := (DT )−1 = ⇒ D−1 = , (188) det D det D and we get the Laplace (cofactor) expansion

X det D = Dji Cji , ∀i . (189) j

Move the ith particle: the ith row of D changes, but Cij doesn’t, so

det Dnew P Dnew C old P Dnew (det Dold D¯old ) q = = j ji ji = j ji ji i det Dold det Dold det Dold X ¯old new X ¯old new = Dji Dji = Dji φj (ri ) . (190) j j

Quantum Monte Carlo (QMC) December 14, 2018 97 / 241 Dealing with Slater determinants

Using Laplace expansion again, P P ¯ ∇i det D j Cji ∇i Dji j det DDji ∇i Dji X = = = D¯ ∇ D , (191) det D det D det D ji i ji j so ∇i det D X = D¯ ∇ φ (x ) . (192) det D ji i j i j

Quantum Monte Carlo (QMC) December 14, 2018 98 / 241 Easy start with basis sets The Basis Set Exchange (link to portal or link to github):25

# STO-3G EMSL Basis Set Exchange Library 11/12/18 10:13 PM # Elements References # ------# H - Ne: W.J. Hehre, R.F. Stewart and J.A. Pople, J. Chem. Phys. 2657 (1969). # Na - Ar: W.J. Hehre, R. Ditchfield, R.F. Stewart, J.A. Pople, # J. Chem. Phys. 2769 (1970). # K,Ca - : W.J. Pietro, B.A. Levy, W.J. Hehre and R.F. Stewart, # Ga - Kr: J. Am. Chem. Soc. 19, 2225 (1980). # Sc - Zn: W.J. Pietro and W.J. Hehre, J. Comp. Chem. 4, 241 (1983) + Gaussian. # Y - Cd: W.J. Pietro and W.J. Hehre, J. Comp. Chem. 4, 241 (1983). + Gaussian # $basis * li STO-3G * 3 s 16.1195750 0.15432897 2.9362007 0.53532814 0.7946505 0.44463454 3 s 0.6362897 -0.09996723 0.1478601 0.39951283 0.0480887 0.70011547 3 p 0.6362897 0.15591627 0.1478601 0.60768372 0.0480887 0.39195739 * $end

25Turbomole format. Quantum Monte Carlo (QMC) December 14, 2018 99 / 241 Easy start with basis sets The STO-3G basis set gives three primitive Gaussians (hence 3G) fit to a Slater-type orbital (hence STO); the s-functions are (always atomic units)

−16.1195750r 2 X1(r) = 0.15432897 × e −2.9362007r 2 X2(r) = 0.53532814 × e −0.7946505r 2 X3(r) = 0.44463454 × e . (193) From the primitives we get contracted Gaussians,

N Xn Gn(r) = Xα(r) , (194) α=1 and from contracted Gaussians the orbitals (need normalization),

N Xbasis φi (r) = cinGn(r) . (195) n=1 Obviously STO-3G lacks flexibility. More: basissets.pdf. Quantum Monte Carlo (QMC) December 14, 2018 100 / 241 DMC and chemical accuracy ”Chemical accuracy” 1 kcal/mol

1 Hartree = 627.509 kcal/mol 1 kcal/mol = 0.00159360 Hartree

Where are we now:26

26F. R. Petruzielo, J. Toulouse, and C. J. Umrigar, J. Chem. Phys. 136, 124116 (2012). Quantum Monte Carlo (QMC) December 14, 2018 101 / 241 Path integral Monte Carlo (PIMC) Let’s turn our attention to the statistical physics of equilibrium quantum systems. In canonical ensemble27 everything can be computed from the canonical partition function X X ˆ Z(β) = e−βEi = hi|e−βH|ii (196) i i

where H|ˆ ii = Ei |ii and β = 1/(kB T ), kB is the Boltzmann constant, and T is the temperature. Now Z is the trace (norm) of the density operator

ˆ ˆ ρˆ ≡ e−βH , ρ(R0, R; β) ≡ hR0|e−βH|Ri , (197) where the latter is the density matrix. Trace is basis-independent: Insert position eigenstates, Z X ˆ Z X ˆ Z(β) = dR hi|e−βH|RihR|ii = dR hR|iihi|e−βH|Ri i i Z ˆ Z = dRhR|e−βH|Ri = dRρ(R, R; β) . (198)

27Energy and particle number are conserved. Quantum Monte Carlo (QMC) December 14, 2018 102 / 241 Path integral Monte Carlo (PIMC) In most cases we don’t know hR|e−βHˆ |Ri – except for small β.28 Split the operator (Hˆ obviously commutes with Hˆ, so this splitting is exact), Z Z −βHˆ − β Hˆ − β Hˆ Z(β) = dRhR|e |Ri = dRhR|e 2 e 2 |Ri . (199)

Repeat and insert position states, Z − β Hˆ − β Hˆ − β Hˆ Z(β) = dRdR1...dRM−1hR|e M |R1ihR1|e M |R2i...hRM−1|e M |Ri .

(200) This is a multidimensional integral of a product of high-temperature density matrices

β ˆ 0 β 0 β 0 − M H ρ(R , R; M ) = hR |ρˆ( M )|Ri = hR |e |Ri . (201)

28Small β (high T ) in PIMC is equivalent to the small timestep τ in DMC. Quantum Monte Carlo (QMC) December 14, 2018 103 / 241 Primitive approximation The high-temperature density matrix can be approximated using ideas described in the DMC section. The splitting e−βHˆ ≈ e−βTˆ e−βVˆ gives the primitive approximation for the high-T density matrix,

0 2 ˆ − (R−R ) hR0|e−βH|Ri ≈ (4πλβ)−3N/2e 4λβ e−βV (R) . (202)

In PIMC it’s customary to write the Hamiltonian as

ˆ 2 H = −λ∇R + V (R) (203) 2 λ ≡ ~ . (204) 2m

2 ~ In DMC it’s also common to mark D ≡ 2m , D for ”diffusion constant”. With M time slices it’s nice to define29 β τ ≡ (205) M

29Inequal time slices require minor changes. Quantum Monte Carlo (QMC) December 14, 2018 104 / 241 Quantum-classical analogy Define a link action

Sm = S(Rm−1, Rm; τ) = − ln ρ(Rm−1, Rm; τ) (206) Z PM − S(Rm−1,Rm;τ) ρ(R0, RM ; β) = dR1 ... RM−1e m=1 . (207)

Customarily, one defines

2 3N (Rm−1 − Rm) Sm := ln(4πλτ) + + U(Rm−1, Rm; τ) (208) 2 4λτ | {z } | {z } ”inter-action” K(Rm−1,Rm;τ) ”kinetic action” in 3D, where the inter-action U depends on the approximation. For example, the primitive action is 30 2 (prim.) 3N (Rm−1 − Rm) Sm = ln(4πλτ) + + τV (Rm) . (209) 2 4λτ | {z } | {z } “Potential term” “Spring term”

30 The potential term can be symmetrized, τ/2(V (Rm−1) + V (Rm)). Quantum Monte Carlo (QMC) December 14, 2018 105 / 241 Ring polymers

In polymer analogy the spring term holds the polymer together and the potential term gives the inter-polymer interaction. Example: 5 particles and 4 time slices (not in scale) Periodic boundary

Periodic boundary

Note: The springs in the figure represent the kinetic, spring action 2 (Rm−1−Rm) 4λτ , not the potential !

Quantum Monte Carlo (QMC) December 14, 2018 106 / 241 Ring polymers

Another view of 5 particles in 4 time slices:

Only particles on the same time slice interact: Blues interact and reds interact, but blues don’t interact with reds.

Quantum Monte Carlo (QMC) December 14, 2018 107 / 241 Energy estimators Having no trial wave function removes the human bias, but also takes away one obvious energy measure, the trial energy. There are many energy estimators, with the same average, but with different variance: I The thermodynamic energy estimator 1 ∂Z hEi = − (210) Th Z ∂β

I The direct or Hamiltonian energy estimator

Tr[Hˆe−βHˆ ] hEidir = (211) Tr[e−βHˆ ]

I The virial estimator

hEivir = no simple form, approximation specific (212) Here the notation is just to distinguish the three; the averages are the same, only how the data is collected differently, and also the variances differ. Obviously, you can invent estimators if you feel the need. Quantum Monte Carlo (QMC) December 14, 2018 108 / 241 Energy estimators

Start from the exact action in 3D, Eq. (207),

Z PM − S(Rm−1,Rm;τ) ρ(R0, RM ; β) = dR1 ... RM−1 e m=1 (213) 3N (R − R )2 S(R , R ; τ) := ln(4πλτ) + m−1 m + U (214) m−1 m 2 4λτ m Z PM − S(Rm−1,Rm;τ) Z = dR1 ... RM e m=1 with R0 ≡ RM . (215)

At high T , Um averages to potential energy, τhV i. At low T this ”inter-action” contains some kinetic terms as well, so it’s really just some unknown term, in need of approximation.

Quantum Monte Carlo (QMC) December 14, 2018 109 / 241 Thermal energy estimator

Remember that τ = β/M, Sm = S(Rm−1, Rm; τ) and use thermodynamics:

M 1 ∂ Z PM 1 Z PM ∂S − Sm X − Sm m hEiTh = − dR1 ... RM e m=1 = dR1 ... RM e m=1 (216) Z ∂β Z m=1 ∂β M 1 Z ∂S Z PM  X m − Sm = dRm−1dRm dR1 ... Rm−2Rm+1RM e m=1 (217) Z ∂β m=1 | {z } ρ(Rm−1,Rm;τ)

M M M X Z ∂Sm 1 X ∂Sm X 1 ∂Sm = dRm−1dRm ρ(Rm−1, Rm; τ) = h i = h i , (218) m=1 ∂β Z m=1 ∂β m=1 M ∂τ | {z } thermal average

which gives

M  2  1 X 3N (Rm−1 − Rm) ∂Um hEi = − + . (219) Th M 2τ 4λτ 2 ∂τ m=1

Quantum Monte Carlo (QMC) December 14, 2018 110 / 241 Thermal energy estimator The thermal energy estimator has one serious shortcoming, related to the two kinetic terms. The first term,

M 1 X 3N  3MN = , (220) M 2τ 2β m=1 is M times the classical kinetic energy. This is the kinetic energy you get, if you start the simulation with M identical time slices. It’s way off, and only running PIMC for a while the second term

M  2  1 X (Rm−1 − Rm) − (221) M 4λτ 2 m=1 cancels the excess kinetic energy. The thermal energy estimator is poor even for non-interacting particles. Furthermore, at large M (small τ) the two partly cancelling kinetic terms fluctuate a lot, making the energy expectation value slowly converging. 31 31There are, of course, inherent energy fluctuations proportional to the specific heat. Quantum Monte Carlo (QMC) December 14, 2018 111 / 241 Virial energy estimator

While the thermal kinetic energy fluctuates a lot, the potential energy doesn’t. The quantum virial theorem states, that one can compute the kinetic energy from the potential energy. The energy of a 1D system is

1 ∂V (x) E = x +V (x) . (222) 2 ∂x | {z } virial kinetic energy

Herman et al. 32 introduced the virial energy estimator to use this fact and get smaller variance.

32M. F. Herman, E. J. Bruskin, and B. J. Berne, J. Chem. Phys. 76, 5150 (1982). Quantum Monte Carlo (QMC) December 14, 2018 112 / 241 Virial energy estimator One way to obtain a better energy estimator is to partially integrate some path variable and get a kinetic terms with smaller fluctuations. The result is33

M  1 X 3N (RL+m − Rm) · (Rm+1 − Rm) hEi = − vir M 2Lτ 4Lτ 2λ m=1 1 ∂U  − F ∆ + m (223) 2 m m ∂τ 1 F := − ∇(U − U ) ∼ classical force (224) m τ m−1 m L−1 1 X ∆ := (R − R ) deviation from average , (225) m 2L m m+j j=−L+1

and L ∈ [1, M] is a parameter controlling how many time slices are averaged over. 33Derived in the appendix of Ceperley’s PIMC review (1995). Quantum Monte Carlo (QMC) December 14, 2018 113 / 241 Virial energy estimator Special cases:

I L = 1, so ∆m = 0 and the virial estimator reduces to the thermal one,

M  2  1 X 3N (Rm+1 − Rm) ∂Um hEi = − + = hEi (226) vir M 2τ 4τ 2λ ∂τ th m=1

I L = M (usual choice; notice: j = 0 term is zero)

M−1 1 X ∆ = (R − R ) (227) m 2M m m+j j=−M+1 with no windings and exchanges 0 M  z }| { 1 X 3N (Rm+M − Rm) ·(Rm+1 − Rm) hEi = − vir M 2β 4Mτ 2λ m=1 1 ∂U  + ∇(U − U )∆ + m (228) 2τ m−1 m m ∂τ

Quantum Monte Carlo (QMC) December 14, 2018 114 / 241 Virial energy estimator in the primitive approximation The virial kinetic energy in the primitive approximation is

M 1 X hT i = hR · ∇V (R )i . (229) 2M m m m=1 This is already quite good, but writing positions wrt. a reference point reduces the variance further. One choice is to use a centroid, the center of mass of a polymer ring. Equally well one could use just any point on the particles path,

M 3N 1 X hT i = + h(R − R ) · ∇V (R )i . (230) 2β 2M m M m |{z} m=1 classical | {z } kinetic quantum corrections energy

Alas, the virial energy estimator for each approximate action has to be elaborated separately, because the inter-action term is different. Quantum Monte Carlo (QMC) December 14, 2018 115 / 241 Virial energy estimator Where did the R · V (R) pop up? The virial theorem itself can be derived using scaled coordinates,

rs := sr = r + (s − 1)r , (231)

and requiring, that the scaled energy Es is stationary at s = 1,   ∂hEs i 1 ∂ ∂Zs = − = 0 (232) ∂s s=1 Zs ∂β ∂s s=1 so

∂Zs = 0 . (233) ∂s s=1 The potential energy can be expanded around s = 1,

V (Rs ) = V (r1 + (s − 1)r1, r2 + (s − 1)r2, ..., rN + (s − 1)rN ) = V (R) + (s − 1)R · ∇V (R) + O((s − 1)2) , (234) so

∂V (Rs ) = R · ∇V (R) . (235) ∂s s=1

Quantum Monte Carlo (QMC) December 14, 2018 116 / 241 Virial energy estimator

In a similar fashion we get the scaling of the full action, 34

3N s2(R − R )2 S(R , R ; τ) = ln(4πλτ) + m m−1 + U , (236) m−1;s m;s 2 4λt m;s so 2 ∂Sm (Rm − Rm−1) ∂Um;s = 2 + . (237) ∂s s=1 4λt ∂s s=1

34Use 0 2 PN 0 2 0 2 0 2 PN 2 0 2 0 2 0 2 2 0 2 (Rs −Rs ) = i=1[(xi,s −xi,s ) +(yi,s −yi,s ) +(zi,s −zi,s ) ] = i=1 s [(xi −xi ) +(yi −yi ) +(zi −zi ) ] = s (R−R ) . Quantum Monte Carlo (QMC) December 14, 2018 117 / 241 Virial energy estimator Using

3 3 3N dRs = d r1s ...d rNs = s dR , (238)

the energy stationarity condition is (mark Rk with just k)

∂ ∂ Z PM 3NM − S((m−1)s ,ms ;τ) Zs = [s d1...dMe m=1 ] ∂s s=1 ∂s s=1 Z M  2  − PM S(m−1,m;τ) X (Rm−1 − Rm) ∂Ums = d1...dMe m=1 3N − 2 − = 0 . (239)

m=1 4λτ ∂s s=1

∂ 1 ∂ On the other hand, the energy is ( ∂β = M ∂τ ),

1 ∂ 1 ∂ Z PM hEi = − Z = − d1...dMe− m=1 S(m−1,m;τ) ZM ∂τ ZM ∂τ M 2 1 Z PM X 3N (Rm−1 − Rm) ∂Um  = d1...dMe− m=1 S(m−1,m;τ) − + 2 ZM m=1 2τ 4λτ ∂τ 1 Z PM = d1...dMe− m=1 S(m−1,m;τ) ZM  M  2  M   1 X (Rm−1 − Rm) ∂Um;s X 1 ∂Ums ∂Um 3N − 2 − + + .

2τ m=1 4λτ ∂s s=1 m=1 2τ ∂s s=1 ∂τ

Quantum Monte Carlo (QMC) December 14, 2018 118 / 241 Virial energy estimator

Use the stationarity condition to eliminate the integral of the blue term,

Z  M   1 − PM S(m−1,m;τ) X 1 ∂Um;s ∂Um hEi = d1...dMe m=1 + , (240)

ZM m=1 2τ ∂s s=1 ∂τ so from coordinate scaling we get the virial energy estimator

M   1 X 1 ∂Um;s ∂Um hEivir = + (241) M 2τ ∂s ∂τ m=1 s=1

2 3N (Rm−1−Rm) Notice, how the misbehaving thermal energy terms 2τ and − 4λτ 2 ∂ vanish: The latter came from the the scaled action, ∂s Sm;s , but the former ∂ 3N came from the scaled differentials, ∂s s !

Quantum Monte Carlo (QMC) December 14, 2018 119 / 241 Virial energy estimator for the primitive action

The primitive approximation has Um = τV (Rm), so

1 ∂Um;s ∂Um 1 ∂V (ms ) + = + V (Rm) 2τ ∂s s=1 ∂τ 2 ∂s s=1 1 = R · ∇V (R ) + V (R ) , (242) 2 m m m and we get the result mentioned earlier in Eq. (229),

M   (prim.) 1 X 1 hEi = R · ∇V (R ) + V (R ) . (243) vir M 2 m m m m=1

Quantum Monte Carlo (QMC) December 14, 2018 120 / 241 Virial energy estimator for Chin action Let’s try scaled coordinates for Chin’s 4th order propagator, Eq. (147).

−v0τVˆ −t1τTˆ −v1τWˆ −t2τTˆ −v1τWˆ −t1τTˆ −v0τVˆ GˆChin(τ) = e e e e e e e . (244) Stack to M time slices, kinetic time jumps are (times τ)

[t1, t2, t1], [t1, t2, t1], ..., [t1, t2, t1] , (245) so Z ZChin = d1..dMρ0(1, 2; t1τ)ρ0(2, 3; t2τ)ρ0(3, 4; t1τ)ρ0(4, 5; t1τ)...ρ0(M − 1, M; t2τ)ρ0(M, 1; t1τ)

e−v0τV (1)e−v1τW (2)e−v1τW (3)e−2v0τV (4)...e−2v0τV (M−2)e−v1τW (M−1)e−v1τW (M)e−v0τV (1) , (246)

and, read the Um of Chin action,  2v τV (m − 1) + v τW (m) m = 2, 5, 8, ...  0 1 UChin(Rm−1, Rm; τ) = v1τW (m − 1) + v1τW (m) m = 3, 6, 9, ... (247)  v1τW (m − 1) + 2v0τV (m) m = 1, 4, 7, ... . The modified potential is given in terms of V , but it’s better to scale coordinates in W directly,

∂W (Rs ) = R · ∇W (R) . (248) ∂s s=1

Quantum Monte Carlo (QMC) December 14, 2018 121 / 241 Virial energy estimator for Chin action Mark V˜(R) := R · ∇V (R) (249) W˜ (R) := R · ∇W (R) , (250) and we get  ˜ 1 ˜ v0Vm−1 + 2 v1Wm , m = 2, 5, 8, ... 1 ∂Um;s  1 1 = v1W˜m−1 + v1W˜m , m = 3, 6, 9, ... (251) 2τ ∂s 2 2 s=1  1 ˜ ˜ 2 v1Wm−1 + v0Vm , m = 1, 4, 7, ... . 3 2 and, using v1τW (m) = v1τV (m) + 2λu0τ (∇V (m)) ,

 2 2 2v0V (m − 1) + v1V (m) + 6λu0τ (∇V (m)) , m = 2, 5, 8, ... ∂U  m = v V (m − 1) + 6λu τ 2(∇V (m − 1))2 + v τW (m) , m = 3, 6, 9, ... ∂τ 1 0 1  2 2 v1V (m − 1) + 6λu0τ (∇V (m − 1)) + 2v0V (m) , m = 1, 4, 7, ... . (252)

Quantum Monte Carlo (QMC) December 14, 2018 122 / 241 Bosons and fermions We haven’t touched the subject of particle statistics yet. The Hamiltonian (203) doesn’t know about statistics, we have to force it. The density matrix eigenfunction expansion is always valid, 35

0 0 −βHˆ X −βEi 0 ρ(R , R; τ) = hR |e |Ri = e φi (R )φi (R) , (253) i

so all we need is to require that summed states φi (R) must be (anti)symmetric. We could do this with Slater determinants (fermion) or permanents (boson), but the notation is simpler with permutations, ( 1 X P ˆ + for bosons (B) φi,B/F(R) = (±1) φi (PR) , (254) N! − for fermions (F) P ˆ P P permutes particle labels and P counts pair permutations; P denotes the sum over all permutations. For N = 3:

123 : P = 0 213 : P = 1 231 : P = 2 321 : P = 1 132 : P = 1 312 : P = 2 .

35We’ve used is earlier for boltzmannons, distinguishable particles. Quantum Monte Carlo (QMC) December 14, 2018 123 / 241 Bosons and fermions

Working backwards, we get the Bose/Fermi density matrix 36

X  1 X  ρ (R0, R; τ) = e−βEi φ (R0) (±1)P φ (PˆR) (255) B/F i N! i i P The symmetrized states give the boson density matrix,

1 X ρ (R0, R; τ) = ρ(R0, PˆR; τ) (256) B N! P

and the antisymmetrized states give the fermion density matrix,

1 X ρ (R0, R; τ) = (−1)P ρ(R0, PˆR; τ) (257) F N! P

36It doesn’t matter whether the permutation operator operates on R, on R0, or on both. Quantum Monte Carlo (QMC) December 14, 2018 124 / 241 Fermion density matrix The fermion density matrix as determinant of one-body density matrices ρ1: 0 0 0 ρ1(r1, r1; τ) ρ1(r2, r1; τ) ... ρ1(rN , r1; τ) 0 0 0 ρ1(r1, r2; τ) ρ1(r2, r2; τ) ... ρ1(rN , r2; τ) ρ (R0, R; τ) = . (258) F . . 0 0 0 ρ1(r1, rN ; τ) ρ1(r2, rN ; τ) ... ρ1(rN , rN ; τ) The equivalent to fixed node DMC, the fixed-node trial density matrix needs a reference point R∗. See Militzer: two-particle nodes: ∗ ∗ ∗ ∗ ρ1(r1, r1; τ) ρ1(r2, r1; τ) ρT (r1, r2, r1, r2; τ) = ∗ ∗ , (259) ρ1(r1, r2; τ) ρ1(r2, r2; τ) which for free particles is

(r −r∗)2 (r −r∗)2 − 1 1 − 2 1 ∗ ∗ 6/2 e 4λτ e 4λτ ρT (r1, r2, r1, r2; τ) = (4πλτ) (r −r∗)2 (r −r∗)2 , (260) − 2 1 − 2 2 e 4λτ e 4λτ ∗ ∗ so the nodes are (r1 − r2) · (r1 − r2) = 0. Quantum Monte Carlo (QMC) December 14, 2018 125 / 241 Boson superfluidity Let’s go back on the ring polymer picture. How large are the rings? The (R −R )2 m−1 m 2 spring term is a gaussian e 4λτ with variance σ = 2λτ, and M of them could cover a circle with radius r √ 2β r ∼ 2λMτ = ~ . (261) m √ Multiply with 2π and you get the deBroglie wavelength, r 2π 2β λ = ~ (262) deBroglie m

Lower T ⇒ larger β ⇒ larger λdeBroglie: at some low T two boson polymers may coil together. The inter-polymer spacing in 3D is about ρ−1/3, so quantum statistics is important below the degeneracy temperature 2/3 2 ρ ~ TD = (3D) . (263) mkB Remember the periodic boundaries in space. Quantum Monte Carlo (QMC) December 14, 2018 126 / 241 Winding number and superfluidity

I Experimental superfluidity (1938): Kapitza, Allen and Misener

I Superfluid density is directly related to the response of the free energy to a boundary phase twist. 37 4 38 I PIMC on liquid He: Ceperley and Pollock. 39 I Lots of misconceptions and assumptions are about. The winding number is undefined for Hamiltonians that don’t conserve the particle number. Setup of Andronikashvili experiment: System between two cylinders of radii R and R + d, and rotate the cylinders slowly; rotating bucket. PIMC setup: assume d  R and put the system between two walls that are moving with small velocity v wrt. to the liquid. Two-fluid model: The normal component, density ρN , responds to the motion of the walls due to friction. The rest is superfluid, ρs = ρ − ρN .

37M. E. Fisher, M. N. Barber, and D. Jasnow, Phys. Rev. A 8, 1111 (1973) 38E. L. Pollock and D. M. Ceperley, Phys. Rev. B 36, 8343 (1987) 39V. G. Rousseau, Phys. Rev. B 90, 134503 (2014) Quantum Monte Carlo (QMC) December 14, 2018 127 / 241 Winding number and superfluidity A gas of excitations with energy (p) carries momentum (Galilei transf.) Z hPˆiv = dr pn( − p · v) , (264)

where n() is the distribution function for gas at rest. For small v you can expand and get hPˆiv = something × v, the something is the mass associated with excitations - this is the mass of the normal fluid. 40 Follow Pollock and Ceperley and compute the change in free energy. In the rest frame walls moving with velocity v

2 X (−i ∇j − mv) Hˆ0 = ~ + Vˆ , (265) 2m j

0 −βHˆ0 and the density operator isρ ˆ = e , the same asρ ˆv in the rest frame of the system. The momentum of the system can now be computed.

40L. Landau, E. M. Lifshitz, and L. P. Pitaevskii, Statistical Physics part II. If a thing has momentum, it has mass. Quantum Monte Carlo (QMC) December 14, 2018 128 / 241 Winding number and superfluidity

Using statistical physics,

P hi|Aˆρˆ|ii 1 X hAiˆ = Tr[Aˆρˆ]/Tr[ˆρ] = i = hi|Aˆρˆ|ii , (266) P hi|ρˆ|ii Z i i

after some work we find the momentum of the system with moving walls (total density ρ, volume is N/ρ),   Tr[Pˆρˆv ] N hPˆiv = ≈ normal mass × v = (NN m)v = ρN m v . (267) Tr[ˆρv ] ρ Apparently this proportionality can hold only if v is small, but that’s all we need.

Quantum Monte Carlo (QMC) December 14, 2018 129 / 241 Winding number and superfluidity Compute the momentum and expand it to linear order in v. The free energy is 1 1 F = − ln Z = − ln Tr[ˆρ ] , (268) v β v β v

so you finally get (details in Pollock-Ceperley article),

∆F 1 ρ v = mv 2 S + O(v 4) . (269) N 2 ρ

In PIMC, we don’t need actual moving walls to measure ∆Fv . The density matrix with moving walls, ρv , satisfies the Bloch equation, ∂ρ (R0, R; β) − v = Hˆ0ρ (R0, R; β) . (270) ∂β v

where we use periodic boundary conditions, ri + L = ri .

Quantum Monte Carlo (QMC) December 14, 2018 130 / 241 Winding number and superfluidity Define a modified density matrixρ ˜ via a phase factor,

m X 0 φ(R) ≡ (rj − rj ) (271) ~ j 0 iφ(R) 0 ρv (R , R; β) = e ρ˜(R , R; β) , (272)

and insert it to the Bloch equation. After some manipulation you get

∂ρ˜(R0, R; β) − = Hˆρ˜(R0, R; β) , (273) ∂β but the boundary conditions come with a phase factor,

0 −imv·L/~ 0 ρ˜(R , r1...ri + L, ...rN ; β) = e ρ˜(R , R; β) . (274)

The winding number W counts how many times particle paths wind around periodically. Each winding adds a factor e−imv·L/~.

Quantum Monte Carlo (QMC) December 14, 2018 131 / 241 Winding number and superfluidity

BTW, the principle how the Galilei transformation

−i~∇j − mv (275)

in the Hamiltonian turns into to a boundary condition for the density matrix, phase e−imv·L/~, is widely applicable. Electrons in magnetic field have the Hamiltonian

−i~∇j − eA , (276)

and if they move a full circle round a flux tube with flux Φ, their wave function picks up the Aharonov-Bohm phase e−ieΦ/~. 41

41The funny thing is that the circulating electron may never be anywhere where A 6= 0, and still it’s wave function picks up the phase. Quantum Monte Carlo (QMC) December 14, 2018 132 / 241 Winding number and superfluidity From the winding number we can compute the superfluid fraction, in 3D

ρ m hW 2iL−1 S = . (277) ρ ~2 3ρβ

On the other hand, the ideal Bose gas Bose-Einstein condensation (BEC) temperature is

2 3.31~ 2/3 Tc = ρ , (278) gmkB

where g is the k-state degeneracy factor. For liquid 4He density this would 42 give Tc ∼ 3.14 K, a bit above the experimental superfluid transition temperature at 2.17 K. The fact that the temperatures are so close led Fritz London to propose, that BEC is related to superfluidity, and that He-He interactions suppress Tc down to 2.17 K. Let’s see visually what superfluidity requires, next pages contain imaginary time plots of paths. 42A. L. Fetter and J. D. Walecka, Quantum Theory of Many-particle Systems. Quantum Monte Carlo (QMC) December 14, 2018 133 / 241 Boson superfluidity: not superfluid

β

R

Quantum Monte Carlo (QMC) December 14, 2018 134 / 241 Boson superfluidity: not superfluid

β

R

Quantum Monte Carlo (QMC) December 14, 2018 135 / 241 Boson superfluidity: not superfluid

β

R

Quantum Monte Carlo (QMC) December 14, 2018 136 / 241 Boson superfluidity: not superfluid

β

R

Quantum Monte Carlo (QMC) December 14, 2018 137 / 241 Boson superfluidity: not superfluid

β

R

Quantum Monte Carlo (QMC) December 14, 2018 138 / 241 Boson superfluidity: Start again, not superfluid

β

R

Quantum Monte Carlo (QMC) December 14, 2018 139 / 241 Boson superfluidity: Superfluid!

β

R

Quantum Monte Carlo (QMC) December 14, 2018 140 / 241 Boson superfluidity: Superfluid! β

R

I Net flux in imaginary time over any boundary in space (such as the green boundary, periodic boundaries are not special) I Four particles in exchange loop, one particle not participating I Order N particles, not necessarily all particles, is needed for the exchange loop to reach through the box.

Quantum Monte Carlo (QMC) December 14, 2018 141 / 241 Ideal bosons

The simple case of ideal bosons is interesting. We can interpret the particle exchange at β as a single particle at the lower temperature 2β:

=

This is allowed, since there are no interaction links that would break.

Quantum Monte Carlo (QMC) December 14, 2018 142 / 241 Ideal bosons We can now reduce all exchange loops to streched single particle paths, starting from the single-particle partition function Z1 ,

Z1(β) = ”(1)” = Z1(β) (279)

1 2 Z2(β) = ”(12) + (21)” = [Z1(β) + Z1(2β)] (280) 2 Z3(β) = ”(123) + (132) + (213) + (321) + (312) + (231)”

1 3 = [Z1(β) + 3Z1(β)Z1(2β) + 2Z1(3β)] , (281) 3! and so on. With some combinatorics we find the recursion relation

N 1 X Z (β) = Z (nβ)Z (β) . (282) N N 1 N−n n=1

For example (init recursion with Z1(0) = 1) ,

1   Z3(β) = Z1(β)Z2(β) + Z1(2β)Z1(β) + Z1(3β) 3     1 1 2 = Z1(β) Z1(β) + Z1(2β) + Z1(2β)Z1(β) + Z1(3β) 3 2   1 3 = Z1(β) + 3Z1(β)Z1(2β) + 2Z1(3β) OK . (283) 6

Quantum Monte Carlo (QMC) December 14, 2018 143 / 241 Ideal bosons

The (inefficient) bose.py demonstrates how the specific heat peak forms at 43 Tc as N increases - and how important it is to use the correct Z1(β). 44 Spoiler: Z1(β) must count the ground state accurately, or you won’t get

lim CV (T ) = 0 . (284) T →0 One choice is to fix the density, so that more particles occupy larger volume, N N ρ = = constant ⇒ Ω = ∝ N . (285) Ω ρ

43See K. Glaum and H. Kleinert, and A Pelster, arXiv 0707.2715v2 (2007). 44We need this limit or we can’t define the entropy of a given state, only entropy differences of states. Quantum Monte Carlo (QMC) December 14, 2018 144 / 241 Ideal bosons

Once Z1(β) is set, the recursion to any N is determined. It doesn’t depend on any spatial quantities, in particular possible periodic boundaries. PBC allows the same permutation, say ”(312)”, to cover more than one spatial interpretations. Say particles 1 and 2 won’t cross the boundary. Particle 3 may end up at the original position of particle 1 (r3(β) = r1(0))

1 without crossing the periodic boundary; r3(τ) is continuous in the box.

2 crossing the periodic boundary; r3(τ) is discontinuous in the box. The path winds (=jumps) from side to side at some τ 0,

0 0 0 0 0 0 0 r3(τ ) = (x3(τ ), y3(τ ), z3(τ )) = (x3(τ ) − L, y3(τ ), z3(τ )) .

The path is continuous in the extended view of periodic boxes. Case 1 gives zero winding, but case 2 does wind. From the exactness of the recursion we must conclude, that both paths are present in the computed Z3(β), if Z1(β), the ”seed”, has PBC.

Quantum Monte Carlo (QMC) December 14, 2018 145 / 241 Ideal bosons in a box

Let’s look at the calculation of Z1(β). For a particle in a box, without PBC and V = ∞ outside the box, one has45

3  ∞  2 π2λ X −βq ( 2/3 ) Z1(β) =  e Ω  . (286) q=1

Approximately, the sum can be converted to an integral, and taking the ground state separately one finds the form used in bose.py. Ω ρ Z (β) ≈ 1 + β−3/2 = 1 + β−3/2 , (287) 1 (4πλ)3/2 (4πλ)3/2

The reason I’m going through all this is that

As N increases, CV (T ) has the peaked signature of BEC transition at Tc , even though there are no periodic boundaries and no winding paths.

45Again, see K. Glaum and H. Kleinert, and A Pelster, arXiv 0707.2715v2 (2007). I’ve changed notation a bit. Quantum Monte Carlo (QMC) December 14, 2018 146 / 241 Ideal bosons and superfluidity Earlier we described superfluidity as winding around periodic boundaries, and from the ideal bosons-in-a-box calculation we concluded, that BEC happens regardless of PBC or winding. So what gives? The dilemma is in relating two phenomena,

I superfluidity as zero viscosity and finite critical velocity.

I Bose-Einstein condensation to the k = 0 state. For He4, neutron scattering experiments have confirmed, that the momentum distribution shows BEC (about 10 % condensed) at T = 0. Ideal bosons have zero critical velocity, so there’s BEC but no superfluidity. As Pethick and Smith puts it,46 However, the connection between Bose-Einstein condensation and superfluidity is a subtle one. A Bose-Einstein condensed system does not necessarily exhibit superfluidity, an example being the ideal Bose gas for which the critical velocity vanishes, as demonstrated in Sec. 10.1 below. Also lower-dimensional systems may exhibit superfluid behavior in the absence of a true condensate, as we shall see in Chapter 15.

46C. J. Pethick and H. Smith, Bose-Einstein Condensation in Dilute Gases Cambridge Univ. Press (2008). Quantum Monte Carlo (QMC) December 14, 2018 147 / 241 Pair product approximation to the density matrix We’ve already discussed 4th order propagators, which serve as system independent work horses and get us down to low T . One more method deserves attention, the pair product approximation. For a hard sphere potential the exact two-body density matrix would obviously be useful, knowing the merits of the pair-product Jastrow wave function. In general, we have two guidelines for density matrices:

I The density matrix satisfies the Bloch equation (see also Eq. (270))

∂ρ(R, R0; β) − = Hˆρ(R, R0; β) , (288) ∂β

I The Feynman-Kac formula for density matrices,

0 0 − R β dtV (R(t)) ρ(R, R ; β) = ρ0(R, R ; β)he 0 iBRW , (289)

where ρ0 is the free-particle density matrix, and the average is over all Brownian random walk paths.

Quantum Monte Carlo (QMC) December 14, 2018 148 / 241 Pair product approximation to the density matrix The Feynman-Kac formula is easy to derive, just take the primitive approximation and use M − 1 intermediate points,47

0 − β Tˆ − β Vˆ − β Tˆ − β Vˆ 0 ρ(R, R ; β) ≈ hR|e M e M ...e M e M |R i (290)

Z β PM β 0 β − M i=1 V (Ri ) = dR1...RM−1ρ0(R, R1; M )...ρ0(RM−1, R ; M )e (291)

β PM R β 0 β − M i=1 V (Ri ) 0 dR1...RM−1ρ0(R, R1; M )...ρ0(RM−1, R ; M )e = ρ0(R, R ; β) 0 , ρ0(R, R ; β)

| β {z } − PM V (R ) he M i=1 i i BRWM

0 with RM = R . Let M → ∞,

β PM R β − M i=1 V (Ri ) − 0 dtV (R(t)) he iBRWM → he iBRW , (292)

and you have the exact Feynman-Kac formula.

47The resulting density matrix is not symmetric, but it will be in the limit M → ∞. Quantum Monte Carlo (QMC) December 14, 2018 149 / 241 Pair product approximation to the density matrix

If the potential in the Feynman-Kac formula is a pair potential, then

− R β dtV (R(t)) Y − R β dtV (r (t)) e 0 = e 0 ij . (293) i

In Jastrow spirit, a good approximation is to assume that particles are correlated only in pairs, so that can average each pair independently,

R β R β Y − dtV (rij (t)) Y − dtV (rij (t)) h e 0 iBRW ≈ he 0 iBRW (294) i

This is the pair product approximation, which ignores three-body 0 correlations and beyond. The point is that u(rij , rij ; β) can be computed accurately either using matrix squaring or eigenfunction expansion.

Quantum Monte Carlo (QMC) December 14, 2018 150 / 241 Matrix squaring

1 Write the two-body problem in center-of-mass and relative coordinates 2 Use spherical coordinates, angular momentum becomes a parameter (l)

0 X 0 ρ(r, r ; β) = ρl (r, r ; β)Pl (cos(θ) (296) l

3 Solve the density matrix at high T and iterate, for each l, dow to desired T : Z ∞ 00 00 00 00 0 ρl (r, r ; 2β) = dr ρl (r, r , β)ρl (r r ; β) (297) 0

4 Compute the final result by summing over l. The actual numerical implementation needs a few tricks to keep the result accurate, but the two-body problem is solved exactly.

Quantum Monte Carlo (QMC) December 14, 2018 151 / 241 Pair product approximation to the density matrix

Making further approximations,48 the cumulant approximation is

R β R β Y − dtV (rij (t)) Y − dthV (rij (t))iBRW he 0 iBRW ≈ e 0 (298) i

and, assuming classical paths we get the semi-classical approximation

R β R β (class) Y − dtV (rij (t)) Y − dtV (r (t)) he 0 iBRW ≈ e 0 ij , (299) i

and for a very small β one recovers the primitive approximation

R β 1 Y − dtV (rij (t)) Y −β [V (rij (0))+V (rij (β))] he 0 iBRW ≈ e 2 . (300) i

48See D. M. Ceperley, Rev. Mod. Phys. 67, 279 (1995). Quantum Monte Carlo (QMC) December 14, 2018 152 / 241 Liquid 4He Pollock and Ceperley (1987):

Quantum Monte Carlo (QMC) December 14, 2018 153 / 241 Liquid 4He

D. Ceperley, Rev. Mod. Phys. 67, 279 (1995):

Quantum Monte Carlo (QMC) December 14, 2018 154 / 241 Liquid 4He D. Ceperley, Rev. Mod. Phys. 67, 279 (1995):

Quantum Monte Carlo (QMC) December 14, 2018 155 / 241 Liquid 4He The density has a kink at Tλ, so it’s present ”already” in the liquid structure: 0.022

0.021 4

) The equilibrium density of liquid He 3 − a ˚ A

( as a function of temperature ρ 0.02 aR. J. Donnelly and C. F. Barenghi , J. Phys. Chem. Ref. Data, Vol. 27, No 6 (1998).

0.019 1 1.5 2 2.5 3 3.5 4 T (K) For pair interactions, the potential energy per particle is

Z N Z −1 2 X 2 hV i/N = N dR|ψ(R; T )| V (rij )/ dR|ψ(R; T )| i

so comparing with the PIMC data, most of the T -dependence comes from ρ(T ), the rest is roughly a constant,

∼ −978 KA˚−3. The pair distribution g(r; T ) has a very weak temperature dependence. The liquid structure, ρ(T ) and

g(r; t), is all that’s needed to get the potential energy. Quantum Monte Carlo (QMC) December 14, 2018 156 / 241 Path sampling We want to sample different terms in Z as effectively as possible, including permutations of indistinguishable particles.

I Single bead move: move just one random particle in a random time slice

I Rigid move: move the whole imaginary time world line of a random particle I Recreate path(s) for multiple time slices, say slices 2, 3, 4, keeping slices 1 and 5 fixedaccept or reject at any stage:

I Bisection: sample 3 as midpoint 1-3-5, sample 2 as midpoint 1-2-3 and 4 as midpoint 3-4-5. - Easy permutation sampling, but insufficient for some topologies I Staging: sample 2 from 1-2-5, then 3 from 2-3-5, then 4 from 3-4-5.

I Worm move: open a path and let the ends move and recombine - Global updates of paths - The ultimate permutation sampler

Quantum Monte Carlo (QMC) December 14, 2018 157 / 241 Path sampling: single-bead move β

R

Update: two GTˆ ’s and potential energy in the time slice. Ineffective but cheap

Quantum Monte Carlo (QMC) December 14, 2018 158 / 241 Path sampling: rigid move β

R

Update: potential energy of all time slices. No GTˆ change. Effective but expensive

Quantum Monte Carlo (QMC) December 14, 2018 159 / 241 Path sampling: bisection

Quantum Monte Carlo (QMC) December 14, 2018 160 / 241 Path sampling: bisection

Quantum Monte Carlo (QMC) December 14, 2018 161 / 241 Path sampling: bisection

Quantum Monte Carlo (QMC) December 14, 2018 162 / 241 Path sampling: bisection

Quantum Monte Carlo (QMC) December 14, 2018 163 / 241 Path sampling: bisection

Quantum Monte Carlo (QMC) December 14, 2018 164 / 241 Path sampling: bisection

Quantum Monte Carlo (QMC) December 14, 2018 165 / 241 Path sampling: Adding permutations to bisection

Quantum Monte Carlo (QMC) December 14, 2018 166 / 241 Path sampling: Adding permutations to bisection

Quantum Monte Carlo (QMC) December 14, 2018 167 / 241 Path sampling: Adding permutations to bisection

Quantum Monte Carlo (QMC) December 14, 2018 168 / 241 Path sampling: Adding permutations to bisection

Quantum Monte Carlo (QMC) December 14, 2018 169 / 241 Path sampling: Adding permutations to bisection

Quantum Monte Carlo (QMC) December 14, 2018 170 / 241 Path sampling: Adding permutations to bisection

Quantum Monte Carlo (QMC) December 14, 2018 171 / 241 Path sampling: Adding permutations to bisection

Quantum Monte Carlo (QMC) December 14, 2018 172 / 241 Bisection Comments on the bisection update I Effective, path changes a lot

I If the new midpoint is accepted, it may be far from the original point I If the new midpoint is rejected (large potential) we don’t waste time on the rest I Does the algorithm early-reject a move that could be finally accepted? In principle yes, but without any practical consequences 49

I Move to the temporary mid-point (red) is deterministic

I Move from the temporary mid-point to new point (green) can be done using random Gaussian move. The length can be adjusted for optimal acceptance.

I Long GTˆ ’s of previous stage can be divided away in the next stage. Intermediate steps can be free-spirited, but in the final step you have to use the correct weights.

I Adjustable parameters: length of the re-sampled path and amplitudes of random Gaussian moves on each bisection level. 49Lloren¸cBrualla i Barber`a,Thesis (Barcelona, 2002). Quantum Monte Carlo (QMC) December 14, 2018 173 / 241 Worm

The worm algorithm50 owns to the advances made in the Ising model MC sampling in the 80’s. It solves many problems in PIMC path sampling:

I SOLVED: Global changes are more efficient than local ones I SOLVED: Long permutation loops are easily created with high acceptance

I other path sampling methods explicitly construct permutations I acceptance of suggested permutations is very low ⇒ permutation sampling is very inefficient I on a torus-shaped space you practically never get a path winding around ⇒ wrong result

I SOLVED: Evaluation of off-diagonal quantities: condensate fraction and imaginary-time correlations, without any ambiquity in normalization.

50N. V. Prokof’ev, B. V. Svistunov, and L. S. Tupitsyn, Physics Letters A 238, 253 (1998); original in JETP. Later, M. Boninsegni joined Prokof’ev and Svistunov to apply the method on 4He, Phys. Rev. Lett. 96, 070601 (2006), and Phys. Rev. E 74, 036701 (2006). Quantum Monte Carlo (QMC) December 14, 2018 174 / 241 Worm Start with a configuration that describes one possible term in the partition function Z. This term is in the Z sector. The basic worm updates are: 1 Open: Open a path, this leaves two dangling ends, Ira and Masha. You generated a term that’s not in Z, and entered the G sector. 2 Advance/recede: Ira moves ahead (pulls back) and the worm gets longer (shorter) 3 Insert/remove: Add a completely new piece of path or remove one ⇒ Grand Canonical Ensemble (variable N, fixed chemical potential µ) 4 Swap: Ira jumps to another path, close the old path 5 Close: Close the dangling ends of the worm and return to the Z sector. This must be in balance with the open update – detailed balance! While in the Z sector, measure anything you would from Z. While in the G sector, measure off-diagonal quantities: Ira and masha correspond to the field operators ψ(r; τ) and ψ†(r0; τ 0).

Quantum Monte Carlo (QMC) December 14, 2018 175 / 241 Path sampling: worm open

† ψˆ (r; τM )

ψˆ(r; τI )

Quantum Monte Carlo (QMC) December 14, 2018 176 / 241 Path sampling: worm recede

Quantum Monte Carlo (QMC) December 14, 2018 177 / 241 Path sampling: worm advance

Quantum Monte Carlo (QMC) December 14, 2018 178 / 241 Path sampling: worm close

Quantum Monte Carlo (QMC) December 14, 2018 179 / 241 Path sampling: worm insert

Quantum Monte Carlo (QMC) December 14, 2018 180 / 241 Path sampling: worm advance

Quantum Monte Carlo (QMC) December 14, 2018 181 / 241 Path sampling: worm advance

Quantum Monte Carlo (QMC) December 14, 2018 182 / 241 Path sampling: worm advance

Quantum Monte Carlo (QMC) December 14, 2018 183 / 241 Path sampling: worm advance

Quantum Monte Carlo (QMC) December 14, 2018 184 / 241 Path sampling: worm close

Quantum Monte Carlo (QMC) December 14, 2018 185 / 241 Path sampling: worm swap

Quantum Monte Carlo (QMC) December 14, 2018 186 / 241 Path sampling: worm swap PERMUTATIONS!

Quantum Monte Carlo (QMC) December 14, 2018 187 / 241 Worm partition function The Z and G sectors are also known with less colourful names: diagonal and off-diagonal sector. Ira and Masha are known as head and tail. The worm samples an ”extended” partition function, (I , M are Ira and Masha)

∞ " Z # X βµN X Zworm = ZN e + C drI drM G(rI , rM ;(iI − iM )τ) ,

N=0 iI ,iM

(302)

where the integrand is the Matsubara Green’s function (thermal average),

0 0 † 0 0 G(r, r ; τ − τ ) = hTˆτ ψˆ(r, τ)ψˆ (r ; τ )i . (303)

Here Tˆτ is the imaginary-time ordering operator and ZN is the canonical partition function. The Zworm is sum of the grand canonical partition function and sum over all worms.

Quantum Monte Carlo (QMC) December 14, 2018 188 / 241 Worm partition function

I Worm’s natural ensemble is grand canonical, but also a canonical implementation has been done. The grand canonical partition function is ∞ h −β(H−ˆ µN)i X βµN ZG = Tr e = ZN e , (304) N=0

and we approximate the canonical partition function ZN with the multidimensional integral, (X ≡ {R1, R2...RM })

∞ Z X βµN −U(X) ZG ≈ e dXA(X; τ)e . (305) N=0

Here A(X; τ) = ρ0(R1, R2; τ).. − ρ0(RM−1, RM ; τ) is the free-particle contribution and U(X) is the rest, all interaction terms. I Paths (world lines) are created sampling exactly the free-particle density matrices ρ0(r1, r2; τ). This can be done using staging.

Quantum Monte Carlo (QMC) December 14, 2018 189 / 241 Staging algorithm

We generate a random walk path between two known endpoints r1 and rm, marked just 1 and m. The imaginary-time difference is τm − τ1 ≡ τ1m. Split a long-leap Gaussian to short-step Gaussians (here in 3D):

2 −(r −rm) −τ Tˆ 1 1 ρ (r , r ; τ ) ≡ hr |e 1m |r i = e 4λτ1m (306) 0 1 m 1m 1 m 3/2 (4πλτ1m) Z −τ12Tˆ −τ23Tˆ −τm−1,mTˆ = dr2...drm−1hr1|e |r2ihr2|e |r3i...hrm−1|e |rmi

2 2 −(r −r )2 Z −(r1−r2) −(r2−r3) m−1 m 1 4λτ = dr ...dr e 4λτ12 e 4λτ23 ...e m−1,m . 2 m−1 3/2 (4πλτ12τ23...τm−1,m) | {z } N

Here the unknown, intermedia coordinates r2, ..., rm−1 are entangled, but we can re-arrange terms.

Quantum Monte Carlo (QMC) December 14, 2018 190 / 241 Staging algorithm

2 Z −(r1−rm) 4λτ ρ0(r1, rm; τ1m) = N dr2...rm−1e 1m

2 2 2 2 2 2 " −(r1−r2) −(r2−rm) #" −(r2−r3) −(r3−rm) #" −(r3−r4) −(r4−rm) # e 4λτ12 e 4λτ2m e 4λτ23 e 4λτ3m e 4λτ34 e 4λτ4m 2 2 2 −(r1−rm) −(r2−rm) −(r3−rm) e 4λτ1m e 4λτ2m e 4λτ3m 2 2 2 2 " −(rm−3−rm−2) −(rm−2−rm) #" −(rm−2−rm−1) −(rm−1−rm) # e 4λτm−3,m−2 e 4λτm−2,m e 4λτm−2,m−1 e 4λτm−1,m ... 2 2 , (307) −(rm−3−rm) −(rm−2−rm) e 4λτm−3,m e 4λτm−2,m and all extra colored terms cancel. The brackets simplify, for example

2 2 −(r −r ) −(r −rm) 1 2 2 ∗ 2 e 4λτ12 e 4λτ2m −(r2−r2 ) 4λτ12m 2 = e (308) −(r1−rm) e 4λτ1m τ12τ2m ∗ τ2mr1 + τ12rm τ12m ≡ r2 ≡ . (309) τ1m τ1m

Quantum Monte Carlo (QMC) December 14, 2018 191 / 241 Staging algorithm We now have a formula to generate a random walk between fixed end points r1 and rm – don’t forget the blue term! –

2 ∗ 2 −(r −r∗ )2 −(r1−rm) Z −(r2−r2 ) m−1 m−1 4λτ 4λτ 4λτ ρ0(r1, rm; τ1m) = e 1m N dr2...drm−1e 12m ...e m−2,m−1,m ,

where τij τjk τijk ≡ , τij ≡ τj − τi (310) τik ∗ τjk ri + τij rk rj ≡ . (311) τik ∗ Usage: compute r2 using r1 and rm, and set

∗ p r2 = r2 + 2λτ12mη . (312) ∗ Compute r3, sample r3, etc. This samples the integrand exactly. Notice that this staging algorithm doesn’t assume that the imaginary times are evenly spaced. Quantum Monte Carlo (QMC) December 14, 2018 192 / 241 Worm partition function

The acceptance probabilities of worm updates are given by the Metropolis-Hastings formula:

 T (new → old)W (new) P = min 1, . (313) old→new T (old → new)W (old)

Free-particle paths between fixed r0 and r are created with a random walk, which samples the product

0 ρ0(r , r1; τ)ρ0(r1, r2; τ)...ρ0(rk−1, r; τ) . (314)

From the Zworm in Eq. (302) we should be able to compute the update probabilities. Let’s go through the worm updates one by one. For more details, see the article by Boninsegni et al. from 2006.

Quantum Monte Carlo (QMC) December 14, 2018 193 / 241 Open worm Adjustable parameters are marked with blue. From now on, above means up, and below means down in imaginary time: imaginary time is periodic, with period β. Open

1 Set Ira to a random bead, there are Nbeads to choose from.

2 Pick k ∈ U[1, K] and set Masha k steps above Ira; τIM ≡ τM − τI . 3 Remove beads between Ira and Masha. 4 Accept with probability

 −∆U−µτ  CKN beadse IM Popen = min 1, . (316) ρ0(rI , rM ; τIM ) where

∆U = U(new) − U(old) = U(open) − U(close) .

Quantum Monte Carlo (QMC) December 14, 2018 194 / 241 Worm open, probability details Let’s look how this creates the worm term in Eq. (302), repeated here in a simplified form, ∞ " Z # X βµN X βµN Zworm = ZN e + C drI drM (ZN e − path I-M) .

N=0 iI ,iM

Ira was picked from Nbeads beads, which is the current value of NM; and the reverse can be done in 1 way. Masha was picked from K beads, reverse has 1 possible way. Putting together, we have so far T (new → old) = KN = KNM . (317) T (old → new) bead

The old weight is eβµN , while the new weight has a factor C and there are µN(β−τ )+µ(N−1)τ N − 1 particles for the duration τIM , e IM IM , so W (new) = Ce −µτIM . (318) W (old)

Quantum Monte Carlo (QMC) December 14, 2018 195 / 241 Open worm, details Now things gets interesting. Deleting the path between Ira and Masha also deletes the interactions this particle had between Ira and Masha. Those are present in ZN , so the weights have changed by the amount of the potential action; the explicit form depends on the approximation. Using U defined in Eq. (305), and marking∆ U ≡ U(new) − U(old), we get W (new) = e−∆U . (319) W (old) The free-particle paths are also different,

...ρ0(rI −1, rI ; τ) ρ0(rI , rI +1; τ)...ρ0(rM−1, rM ; τ) ρ0(rM , rM+1 τ)... . | {z } cut off in open update In closing the path we recreate the path segment with staging, which has the Ira—Masha factor that’s not taken care of: W (new) 1 = . (320) W (old) ρ0(rI , rM ; τIM ) Now we have covered all terms in Eq. (316). Quantum Monte Carlo (QMC) December 14, 2018 196 / 241 Open worm, details

I If C = 0 we never open a worm. Fine, because then there is none.

I If C increases, we accept more worms.

I More particles, more worms – unless C cancels N.

I More time slices, more worms – unless C cancels M.

I We accept less worms with Ira and Masha farther apart in a random walk.

Quantum Monte Carlo (QMC) December 14, 2018 197 / 241 Close worm Reverse of open, must satisfy the detailed balance condition. Close

1 Reject the update, if Masha is zero or more than K steps above Ira. 2 Generate a path from Ira to Masha. 3 Accept with probability   ρ0(rI , rM ; τIM ) Pclose = min 1, ∆U−µτ , (322) CKN beade IM

where Nbead is the number of beads after closing, and

∆U = U(new) − U(old) = U(closed) − U(open) ,

hence it’s −∆U in used in the opening acceptance.

Quantum Monte Carlo (QMC) December 14, 2018 198 / 241 Close worm, details

The probability of closing a worm may get very small if the random walk distance of Ira and Masha is large, i.e., ρ0(rI , rM ; τIM ) is very small. Such worms are rarely created, but they are also hard to close. In order to avoid these sticky worms Boninsegni et al. used a hard limit, that keeps ρ0(rI , rM ; τIM ) (actually ln[ρ0(rI , rM ; τIM )]) more reasonable: If

(r − r )2 − I M > X (323) 4λτIM opening and closing are rejected.51 This choice is deterministic, but also symmetric, so T (new → old) = T (old → new) and no harm is done to stochasticity.

51Boninsegni et al. used X = 4 in liquid He calculations. Quantum Monte Carlo (QMC) December 14, 2018 199 / 241 Insert worm

This seeds a new world line strand of length k. Insert

1 Set Masha to a random r from the simulation volume Ω and random time slice 2 Pick k ∈ U[1, K] generate a k-step path above Masha; Put Ira there. 3 Accept with probability n o ∆U−µτIM Pinsert = min 1, CKM Ωe , (325)

Quantum Monte Carlo (QMC) December 14, 2018 200 / 241 Remove worm

The reverse update of insert. Remove

1 If the worm length is > K reject remove, the worm is too long. 2 Accept with probability

 e∆U−µτIM  P = min 1, , (327) remove CKM Ω

Quantum Monte Carlo (QMC) December 14, 2018 201 / 241 Advance

This moves Ira up in imaginary time. Advance

1 Pick k ∈ U[1, K] 2 Generate a k-step path from old Ira up in imaginary time and set the new Ira there. 3 Accept advance with probability n o ∆U+µτIM Padvance = min 1, e . (329)

Quantum Monte Carlo (QMC) December 14, 2018 202 / 241 Recede

This moves Ira down in imaginary time. Recede

1 Pick k ∈ U[1, K]. If the worm has less than k beads reject the update. 2 Move Ira k steps down in imaginary time, delete beads on the way. 3 Accept with probability n o ∆U−µτIM Precede = min 1, e , (331)

Quantum Monte Carlo (QMC) December 14, 2018 203 / 241 Swap Swap

1 Pick k ∈ U[1, K]. Build a list {Si } of beads k steps above Ira on another world line.

2 Build a weight list {ρ0(rI , rS , τIS )}. Normalization of the list is P i i ΣS = i ρ0(rI , rSi , τISi ). 3 Pick a bead S with a probability of the normalized weigth list. 4 Find the bead T that is k steps down in imaginary time from bead S. If Masha is met along the way, reject the update.

5 Build another weight list {ρ0(rS , rT , τIT )}. Normalization of the P i i list is ΣT = i ρ0(rS , rTi , τSTi ). 6 Generate a free-particle random path from Ira to S. 7 Accept swap and move Ira to T with probability   ΣS ∆U Pswap = min 1, e . (333) ΣT Quantum Monte Carlo (QMC) December 14, 2018 204 / 241 Swap details

The first weight list and sampling bead S from it favors swap attempts to beads that are not too far in a random walk from Ira. This is T (old → new). Another weight list is needed because the swap is its own reverse, so we must compute also T (new → old).

Quantum Monte Carlo (QMC) December 14, 2018 205 / 241 Head/tail wiggle

Quantum Monte Carlo (QMC) December 14, 2018 206 / 241 Head/tail wiggle

Quantum Monte Carlo (QMC) December 14, 2018 207 / 241 Head/tail wiggle Wiggling the head (Ira): In free-particle terms the red coordinates change,

...ρ0(rI −k−2, rI −k−1; τ)ρ0(rI −k−1, rI −k ; τ)...ρ0(rI −2, rI −1; τ)ρ0(rI −1, rI ; τ) .

Here rI −k−1 is fixed, and the new path segment can be sampled exactly, point by point: √ 0 0 r = rI −k−1 + 2λτη , samples exactly ρ0(rI −k−1, r ; τ) I −k √ I −k 0 0 0 0 rI −k+1 = rI −k + 2λτη , samples exactly ρ0(rI −k , rI −k+1; τ) ... √ 0 0 0 0 rI = rI −1 + 2λτη , samples exactly ρ0(rI −1, rI ; τ) . (334)

where green coordinates are new. The move is accepted/rejected based on the potential change in the wiggled time slices. It’s a good idea to add a ”hard limit”, and reject all wiggles that take Ira too far from Masha, 0 ρ0(rI , rM , τIM ) < X , so that the wiggled worm can close.

Quantum Monte Carlo (QMC) December 14, 2018 208 / 241 Head/tail wiggle

Another way to sample the new path is to first sample new Ira from the fixed point rl−k , which is a long time jump τI − τk = kτ from Ira, √ 0 0 rI = rk + 2λkτη , samples exactly ρ0(rk , rI ; kτ) , (335)

and fill the path between the new Ira and the fixed point using staging. Be careful to use the minimum image convention properly, so that you don’t sample the new path across the whole system. The wiggle move is it’s own inverse.

Quantum Monte Carlo (QMC) December 14, 2018 209 / 241 Some PIMC researchers

Just to give you a few pointers to some useful names. In no particular order:

I D. M. Ceperley, E. L. Pollock, B. Militzer, H. Kleinert

I V. S. Filinov, M. Bonitz, V. E. Fortov, T. Schoof, S. Groth

I J. Boronat, J. Casulleras, F. Mazzanti, S. Giorgini, L. VranjeˇsMarki´c, G. E. Astrakharchik

I M. Boninsegni, N. Prokof’ev, B. Svistunov, S. A. Chin, W. Janke, T. Sauer

I D. E. Galli, C.H. Mak, S. Zakharov, M. F. Herman, E. J. Bruskin, B. J. Berne

I Finland (TUT): T. T. Rantala and his students (I. Kyl¨anp¨a¨a,M. Leino, J. Tiihonen etc.) These are just appetizers, many were left out. And, of course, R. P. Feynman.

Quantum Monte Carlo (QMC) December 14, 2018 210 / 241 Fermion sign problem: the Nemesis of QMC. The expectation value of some quantity Aˆ is Tr[Aˆρˆ] hAiˆ = , (336) Tr[ˆρ]

which is evaluated in MC using weights wi , P i wi Ai hAiw = P , (337) wi

but the weigts wi may be negative, unsuitable for MC. Separate the sign as wi = sgn(wi )|wi |, P |wi |sgn(wi )Ai P P i P i wi Ai i sgn(wi )|wi |Ai i |wi | hAiw = = = P . (338) P P |wi |sgn(wi ) wi sgn(wi )|wi | i P i |wi | The factor |wi | pi ≡ P , (339) i |wi | is a good probability, so we should just evalute two averages. Easy, ha? Quantum Monte Carlo (QMC) December 14, 2018 211 / 241 Fermion sign problem: the Nemesis of QMC. Using the probability made of absolute values we get P i pi sgn(wi )Ai hsignAi|w| hAiw = P = . (340) i pi sgn(wi ) hsigni|w| In principle, this can be easily done in MC, but there’s a catch. The denominator is related to the partition function Z of weights wi , and another one of weights |wi |, P w Z e−βFw X i i w −β(Fw −F|w|) hsigni|w| = pi sgn(wi ) = P = = −βF = e , |wi | Z |w| i i |w| e (341) where the free energy is F = − 1 ln Z (thermodynamics). As always in β √ MC, the error of the mean diminishes as 1/ M with M samples, but there is a factor that grows,

q 2 2 ∆(hsigni ) 1 hsign i|w| − hsigni|w| eβ(Fw −F|w|) eβN(fw −f|w|) |w| = √ ∼ √ = √ . hsigni|w| M hsigni|w| M M

Quantum Monte Carlo (QMC) December 14, 2018(342) 212 / 241 Fermion sign problem: the Nemesis of QMC. The error behaves like

∆(hsigni ) eβN(fw −f|w|) |w| ∼ √ , (343) hsigni|w| M

where f ’s are free energies per particle – remember F is extensive. The difference fw − f|w| is positive, because the boson energy with weights |w| is below the fermion energy with weights w. The factor grows exponentially both with decreasing temperature, and with increasing number of fermions N. This is the fermion sign problem. What of the nodes:

I FN-DMC: use fixed nodes that are good at T = 0.

I PIMC: T = 0 nodes and finite-T nodes are not the same. Instead, the density matrix nodes depend on the imaginary time:

0 ρ(R , R0; t) = 0 with fixed (reference point) R0 and t . (344)

Quantum Monte Carlo (QMC) December 14, 2018 213 / 241 Fermion sign problem: strategies

I Restricted PIMC (RPIMC): Force nodes via a trial density matrix and keep paths from crossing to another sign - determinant of free-particle density matrices – accurate at high T - variational trial density matrix (Militzer and Ceperley) 52 - Jellium: RPIMC does not work at high density (rs < 1) I Direct PIMC (DPIMC) 53 I Configuration PIMC (CPIMC) - no timestep error: continuous time QMC - excellent at high density 54 I Permutation Blocking PIMC (PB-PIMC)

52RPIMC fails to reproduce the exact ideal fermi gase limit : V. Filinov, J. Phys. A 34, 665 (2001). 53Schoof et al. Phys. Rev. Lett. 115, 130402 (2015). 54Dornheim at al., New J. Phys. 17, 073017 (2015). Quantum Monte Carlo (QMC) December 14, 2018 214 / 241 Fermion sign problem; perspectives

Troyer and Wiese 55 Quantum Monte Carlo simulations, while being efficient for bosons, suffer from the “negative sign problem” when applied to fermions–causing an exponential increase of the computing time with the number of particles. A polynomial time solution to the sign problem is highly desired since it would provide an unbiased and numerically exact method to simulate correlated quantum systems. Here we show that such a solution is almost certainly unattainable by proving that the sign problem is nondeterministic polynomial (NP) hard, implying that a generic solution of the sign problem would also solve all problems in the complexity class NP in polynomial time.

55M. Troyer and U-J Wiese, Phys. Rev. Lett. 94, 170201 (2005). Quantum Monte Carlo (QMC) December 14, 2018 215 / 241 Fermion sign problem; perspectives Troyer and Wiese study the NP hard problem of determining whether there exists a state with energy E ≤ E0, for a fixed bound E0, of the Ising Hamilton function X H = − Jjk σj σk . (345) hj,ki What makes this NP hard is the evaluation of the sum over all configurations c, X Z = e−βE(c) . (346) c x The quantum version has σj and σk replaced by Pauli spin matrices σj x and σk . The bosons problem is easy, it’s a ferromagnet with all couplings Jjk ≥ 0. The fermion problem has a ”random” sign, which can be mapped on random off-diagonal signs in J, so Troyer and Wiese conclude that the sign problem is the origin of the NP hardness. So if NP6= P (solvable in polynomial time): tough luck! Quantum Monte Carlo (QMC) December 14, 2018 216 / 241 Fermion sign problem; perspectives

Are we out of luck? If we could solve the eigenstates and eigenvalues of Hˆ, H|ˆ ii = Ei |ii, we could calculate finite temperature expectation values 1 −βHˆ from the normalized density operatorρ ˆ = Z e ,

P e−βEi hi|A|ˆ ii hAiˆ = Tr(ˆρAˆ) = i . (347) P −βEi i e

Here the weights e−βEi are positive, so there is no sign problem. Alas, solving H|ˆ ii = Ei |ii is an exponentially hard problem. A question one should next ask is, just how explicitly do we need to know the solution to Hˆ|ii = Ei |ii in order to avoid the sign problem? Is it enough to have the approximate solution hidden in an evolution algorithm?

Quantum Monte Carlo (QMC) December 14, 2018 217 / 241 Fermion sign problem; perspectives Chin 56: Here we argue that: (1) The sign problem is not intrinsic to solving a fermion problem; (2) it is only a consequence of a poor approximation to the exact propagator; and (3) it can be automatically minimized by using better, higher-order approximate propagators. By following up on the last point, this work shows that by using optimized fourth-order propagators, accurate results can be obtained for up to 20 spin-polarized electrons in a two-dimensional (2D) circular, parabolic quantum dot. Chin argues that the ”sign problem” is due to the large number of antisymmetric free-fermion propagators that are needed to extract the ground state wave function at large imaginary time. Goal: Get to a large τ with less e−τTˆ ’s, by using e.g. Eq. (147):

−v0τVˆ −t1τTˆ −v1τWˆ −t2τTˆ −v1τWˆ −t1τTˆ −v0τVˆ GˆChin(τ) = e e e e e e e . (348)

56S. A. Chin, Phys. Rev. E 91, 031301(R) (2015). Quantum Monte Carlo (QMC) December 14, 2018 218 / 241 Fermion sign problem; perspectives Let’s see how the antisymmetric free-fermion propagator looks like. Define, as usual

0 0 τTˆ GTˆ (R , R; τ) = hR |e |Ri . (349)

Antisymmetry comes from the spectral expansion in eigenstates of Tˆ with antisymmetric wavefunctions, explicit either as a permutation sum P P bolzmannon ˆ φK(R) = P (−1) φK (PR) or as a determinant. We know the boltzmannon result, just collect them to a determinant:

0 −3N/2 GTˆ (R , R; τ) = (4πDτ) det M , (350) where the matrix M has elements

(r −r0)2 − i j Mij = e 4Dτ . (351)

This det M is where the (almost) random signs come from.

Quantum Monte Carlo (QMC) December 14, 2018 219 / 241 Fermion sign problem; perspectives The idea is to get the result before the sign problem appears

Fermion sign problem kicks in Too many free propagators

No sign problem – yet

Quantum Monte Carlo (QMC) December 14, 2018 220 / 241 Alternatives with no timestep error: SSE

There are ways to do QMC without any timestep error from splitting e−βHˆ . One is the Stochastic Series Expansion (SSE). Invented by Anders Sandvik and J. Kurkij¨arvi 57, as an extension to Handscomb’s method. Make a series expansion

∞ n ˆ X X (−β) Z = Tr[e−βH] = hα|Hˆn|αi (352) n! α n=0 See O. F. Syljy˚asen,A. W. Sandvik, Phys. Rev. E 66, 046701 (2002) for SSE with directed loop update. SSE has been mostly used in lattice spin systems, such as Ising and Hubbard models.

57Physical Review B 43 (7), 5950 (1991), J. Phys A: Math. Gen. 25, 3667 (1992), Physical Review B 59 (22), R14157 (1999) Quantum Monte Carlo (QMC) December 14, 2018 221 / 241 SSE with the Hubbard model The Hubbard Hamiltonian with nearest neighbour jumps t, on-site interaction U, and chemical potential µ is X h i X  U  Hˆ = −t(a†a + a†a ) + −µnˆ + nˆ (ˆn − 1) (353) i j j i i 2 i i hiji i

t

U

Figure: Standing waves in crossing laser fields create an optical potential, where bosons arrange in a lattice and obey the Hubbard Hamiltonian. 59

58Figure: Krissia de Zawadzkia, how-to-draw-an-optical-lattice @stackoverflow 59Figure: Krissia de Zawadzkia, how-to-draw-an-optical-lattice @stackoverflow Quantum Monte Carlo (QMC) December 14, 2018 222 / 241 SSE with the Hubbard model

Hamiltonian as a sum over bond operators (coordination number Z), X Hˆ = − Kˆi (354) i  

X  † † µ U  = − t(a aj + a ai ) + (ˆni +n ˆj ) − [ˆni (ˆni − 1) +n ˆj (ˆnj − 1)] ,  i j Z 2Z  hiji | {z } | {z } off-diagonal diagonal

and sample a random product of Hˆ terms in the partition function,

β X X X βn X Z = hs|Kˆ ...Kˆ |si (355) n! i1 in s s n=0 i1,...,in

Quantum Monte Carlo (QMC) December 14, 2018 223 / 241 SSE Diagonal update

I The number of operators is controlled by the temperature.

I Only diagonal operators can be inserted/removed locally

I It’s easier to deal with a constant M operators: use 1 for filling.

Quantum Monte Carlo (QMC) December 14, 2018 224 / 241 SSE Diagonal update

I Start: Pick any reasonable state |si and insert M identity operators 1:

I Diagonal update: Change identity ops to diagonal ops or vice versa with acceptance probabilities " # hs|Kˆ |siβN A (1 → Kˆ ) = min d bonds , 1 (356) ins d M − n  M − n + 1  Arem(Kˆd → 1) = min , 1 (357) hs|Kˆd |siβNbonds

Quantum Monte Carlo (QMC) December 14, 2018 225 / 241 SSE Diagonal update Derivation: Use the detailed balance condition for I → Kˆd and Kˆd → I : 1 : M − n + 1 ↔ M − n

Kˆd : n − 1 ↔ n

0 0 0 ˆ 0 0 ˆ P(S → S ) W (S ) hs |βKd |s i T (S → S )Ains (1 → Kd ) = = = βhs0|Kˆ |s0i = , (358) 0 d 0 ˆ P(S → S) W (S) hs|1|si T (S → S)Arem(Kd → 1)

where

M − n + 1 T (S → S0) = Prob. of picking a 1 = (359) Nbonds 0 ˆ T (S → S) = Prob. of picking the Kd = 1 , (360)

so

ˆ ˆ Ains (1 → Kd ) hs|Kd |siβNbonds = , (361) ˆ Arem(Kd → 1) M − n + 1 and use the Metropolis solution. Here operations are exact reverses, insert is n − 1 → n and remove is n → n − 1, but in practice n is the current number of Kˆd ’s, so insert is, instead, n → n + 1: → Insert acceptance has M − n, not M − n + 1! Quantum Monte Carlo (QMC) December 14, 2018 226 / 241 SSE Directed loop update

I Task: find an effective update, such as boson add/remove loop update (+1)/(−1)

I Update changes the type of an operator, but not their total number 60 I The directed loop update is a global, worm update.

60O. F. Sylju˚asen,and A. W. Sandvik, Phys. Rev. E 66, 046701 (2002). Quantum Monte Carlo (QMC) December 14, 2018 227 / 241 SSE Directed loop update

I Loop update can add/remove bosons ⇒ Grand Canonical Ensemble

I The end state in Z is sampled automatically!

I Knowing the in-leg, how to pick the out-leg so that the Z is sampled ?

Quantum Monte Carlo (QMC) December 14, 2018 228 / 241 SSE Directed loop update

Again, it’s up to detailed balance to choose the out-leg. The weights are matrix elements,

ˆ 0 0 ˆ0 0 W (S) = hs1|K|s2i , W (S ) = hs1|K |s2i (362)

and create probability tables, coded P(update, in − leg, out − leg), such as

P(S → S0) = P(+1; i, j) , P(S → S0) = P(−1; i, j) or P(+1; j, i) . (363)

One possible normalization is the ”heat bath”,

0 0 W (S ) P(S → S ) = P , (364) S W (S) which assumes positive weigths.

Quantum Monte Carlo (QMC) December 14, 2018 229 / 241 SSE Directed loop update

I Loop update may ”bounce”, up-going adds a boson, down-going removes one.

I Loop continues until it reaches the starting point (worm closes). This usually happens soon enough.

Quantum Monte Carlo (QMC) December 14, 2018 230 / 241 SSE Forcing positive weigths

Add a constant C to the Hamiltonian,   ˆ X  † † µ U  H = − t(a aj + a ai ) + C + (ˆni +n ˆj ) − [ˆni (ˆni − 1) +n ˆj (ˆnj − 1)] ,  i j Z 2Z  hiji | {z } | {z } off-diagonal diagonal

0 I hs|off-diagonal|s i ≥ 0, OK

I hs|diagonal|si ≥ 0, if we choose a maximum allowed occupation nmax and a large enough C to match it.

I If nmax turns out to be too low, start anew with a larger one.

Quantum Monte Carlo (QMC) December 14, 2018 231 / 241 SSE some observables

I Energy, thermodynamical estimator 1 ∂Z hEi = − (365) Z ∂β ∞ 1 1 X X nβn X hni = − hs|Kˆ ... Kˆ |si = − , β Z n! i1 in β s n=0 i1,...,in

where hni is the average number of operators (vertices).

I The ground state energy is a finite, fixed number, so hni increases with β ⇒ low-T simulations have more terms and they are slower. I Energy fluctuates around hEi, so there exists a finite number of terms M that is reached during any finite time simulation.

I Density and compressibility are trivial to measure.

I Superfluid density ρs is again measured via the winding number, the net amount of hopping across a boundary.

Quantum Monte Carlo (QMC) December 14, 2018 232 / 241 SSE Bose results

Figure: The average particle number per site in a 2D 8 × 8 lattice, at a very low temperature, as a function of the hopping parameter t and the chemical potential µ. The numbered plateaus are Mott insulating phases with the indicated particle number per site. Error bars are smaller that the line width. V. Apaja (ca. 2004, unpublished).

Details: See, for example, Boson localization and the superfluid-insulator transition, M. P. A. Fisher et al., Phys. Rev. B 40, 546 Quantum Monte Carlo (QMC) December 14, 2018 233 / 241 (1989). SSE Bose results

Figure: Density ρ, compressibility κ and the superfluid density ρs in a 2D 32 × 32 lattice, as a function of the chemical potential µ. In Mott insulating phases the density is constant, while compressibility and the superfluid density are zero. 62

62O. Sylju˚asen,PRE 67, 046701 (2003). Quantum Monte Carlo (QMC) December 14, 2018 234 / 241 Alternatives with no timestep error: Continuous time QMC Continuous time QMC has multiple variants, one way to start is to solve Uˆ(β) from

ˆ ˆ ˆ ˆ e−βH = e−βT Uˆ(β) ⇔ Uˆ(β) = eβT e−βH (366)

∂Uˆ(β) ˆ ˆ ˆ ˆ ⇒ = TˆeβT e−βH − eβT Hˆe−βH ∂β ˆ ˆ ˆ ˆ = TˆeβT e−βH − eβT (Tˆ + Vˆ)e−βH ˆ ˆ ˆ ˆ ˆ ˆ = −eβT Vˆe−βH = −eβT Vˆe−βT [eβT e−βH] ˆ ˆ = −eβT Vˆe−βT Uˆ(β) ≡ −Vˆ(β)Uˆ(β) , (367)

and integrate,

Z β ∂Uˆ(t) Z β = Uˆ(β) − Uˆ(0) = − dtVˆ(t)Uˆ(t) (368) 0 ∂t |{z} 0 1

Quantum Monte Carlo (QMC) December 14, 2018 235 / 241 Alternatives with no timestep error: Continuous time QMC

Insert and iterate, Tˆτ is the imaginary-time ordering operator,

β ˆ ˆ ˆ  Z  e−βH = e−βT Uˆ(β) = e−βT 1 − dτVˆ(τ)Uˆ(τ) (369) 0  Z β Z β Z τ1  −βTˆ = e 1 − dτ1Vˆ(τ1) + dτ1 dτ2Vˆ(τ1)Vˆ(τ2)... 0 0 0  Z β Z β Z β  −βTˆ 1 = e 1 − dτ1Vˆ(τ1) + dτ1 dτ2Tˆτ [Vˆ(τ1)Vˆ(τ2)]... . 0 2 0 0

This is often written in the form63

−βHˆ −βTˆ h − R β dτVˆ(τ)i τTˆ −τTˆ e = e Tˆτ e 0 , Vˆ(τ) ≡ e Vˆe . (370)

This can be viewed as the interaction picture representation wrt. Vˆ, and the expanded form does perturbation theory wrt. Vˆ .

63Notice the similarity to the Feynman-Kac formula (289). Quantum Monte Carlo (QMC) December 14, 2018 236 / 241 Alternatives with no timestep error: Continuous time QMC Explicitly, Z β −βHˆ −βTˆ −(β−τ1)Tˆ −τ1Tˆ e = e − dτ1e Vˆe (371) 0 1 Z β −(β−τ1)Tˆ (τ1−τ2)Tˆ −τ2Tˆ + dτ1dτ2e Vˆe Vˆe ... . 2 0

0 0 −τTˆ This gives the canonical partition function, ρ0(R , R; τ) := hR |e |Ri, Z Z −βHˆ Z = dRhR|e |Ri = dRρ0(R, R; β) (372) Z β Z − dτ1 dRdR1ρ0(R, R1; β − τ1)V (R1)ρ0(R1, R; τ1) 0 1 Z β Z  + dτ1dτ2 dRdR1dR2Tˆτ ρ0(R, R1; β − τ1)V (R1) 2 0  ρ0(R1, R2; τ1 − τ2)V (R2)ρ0(R2, R; τ2) ... .

Quantum Monte Carlo (QMC) December 14, 2018 237 / 241 Alternatives with no timestep error: Continuous time QMC

I This Z is made of DVD-kinks, free diffusion - potential - free diffusion. Free diffusion combined with a singular potential is always bad.

I Terms are positive definite only for an attractive potential – again the Hydrogen atom problem works perfectly. MC sampling of Z could be done by avoiding positive potential regions using domain Green’s functions 64 Without any tricks the large |V (R)| occasions overwhelm the MC sampling. Eq. (372) uses {R} basis, where Vˆ is diagonal. You could as well choose an occupation number basis, and divide Hˆ to diagonal (Dˆ) or off-diagonal (Yˆ) contributions in this basis. Next, in Eq. (372), replace Tˆ → Dˆ and Vˆ → Yˆ. This leads to CPIMC formulation by Schoof et al. as in Eqs. (92)—(98) in Introduction to Configuration Path Integral Monte Carlo, discussed on the next slide.

64Schmidt et al., Phys. Rev. E 71, 016707 (2005). Quantum Monte Carlo (QMC) December 14, 2018 238 / 241 Configuration Path Integral Monte Carlo

In occupation number basis |n0, n1, ...i := |{n}i we have

X X −βHˆ |{ni }ih{ni }| = 1 , Z = h{n}|e |{n}i , (373)

{ni } {n} and the perturbation series for Hˆ = Dˆ + Yˆ, using latter as perturbation, is

X ˆ Z = h{n}|e−βD |{n}i (374) {n}

Z β ˆ ˆ X −(β−τ1)D −τ1D − dτ1 h{n}|e |{n}ih{n}|Y|{ˆ n}ih{n}|e |{n}i 0 {n}

Z β Z τ1  ˆ X X −(β−τ1)D + dτ1 dτ2 h{n}|e |{n}ih{n}|Y|{ˆ n1}i 0 0 {n} {n1} ˆ ˆ  −(τ1−τ2)D −τ2D h{n1}|e |{n1}ih{n1}|Y|{ˆ n}ih{n}|e |{n}i ... .

I left out the time ordering operator and factorials, and used explicit ordering in time integrals.

Quantum Monte Carlo (QMC) December 14, 2018 239 / 241 Configuration Path Integral Monte Carlo Using n to mark occupation numbers {n} and marking matrix elements shortly as ˆ h{n}|e−βD|{n}i := e−βD(n) (375)

h{n1}|Y|{ˆ n1}i := Y (n1, n2) , (376) one gets (usually Y (n, n) = 0)

Z β X −βD(n) X −βD(n) Z = e − dτ1 e Y (n, n) (377) n 0 n Z β Z τ1 X + dτ1 dτ2 0 0 n,n1   −(β−τ1)D(n) −(τ1−τ2)D(n1) −τ2D(n) e Y (n, n1)e Y (n1, n)e ... .

Fermion statistics is built-in in second quantization, but the sign problem prevails, because weights are not as such positive definite. Quantum Monte Carlo (QMC) December 14, 2018 240 / 241 Things that were not done and things to do

I didn’t talk about

I Path integrals in quantum field theory (Dirac and Majorana fermions etc.), just path integrals in condensed matter physics. If you want to delve into field theoretical aspects, a good place to start is Edward Witten’s Fermion Path Integrals And Topological Phases. A youtube video is also available here.

I Feynman path integrals (see lecture notes, although they are lagging behind these slides)

I Fermion PIMC in detail; I recommend Burkhard Militzer’s excellent presentations on the topic

I Ground state path integrals Things you should do

I find a way around the sign problem

Quantum Monte Carlo (QMC) December 14, 2018 241 / 241