full configuration interaction monte carlo studies of quantum … · 2014-12-26 · full...

142
Full Configuration Interaction Monte Carlo Studies of Quantum Dots by Karl Roald Leikanger THESIS for the degree of MASTER OF SCIENCE (Master in Computational Physics) Faculty of Mathematics and Natural Sciences Department of Physics University of Oslo June 2013

Upload: others

Post on 08-Jul-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Full Configuration Interaction Monte Carlo Studiesof Quantum Dots

by

Karl Roald Leikanger

THESISfor the degree of

MASTER OF SCIENCE

(Master in Computational Physics)

Faculty of Mathematics and Natural SciencesDepartment of Physics

University of Oslo

June 2013

Page 2: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

2

Page 3: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

This thesis is dedicated to all near and dear for putting up with me during thelast year. And especially to Lisen, Oskar and Kaspar.

I would also like to thank Morten Hjorth-Jensen for the supervision and themotivation, Simen Kvaal for helping me out with his article and to Sarah, Sigve,Jørgen, Veronika, Gustav and everybody in the corridor for a good time.

3

Page 4: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Contents

1 Introduction 81.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.2 Achievements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81.3 The structure of the thesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

I General theory 10

2 A brief introduction to Quantum Mechanics 122.1 The postulates of quantum mechanics . . . . . . . . . . . . . . . . . . . . . . 122.2 Antisymmetric state vectors and fermions . . . . . . . . . . . . . . . . . . . . 152.3 Spin and the spin statistics theorem . . . . . . . . . . . . . . . . . . . . . . . . 152.4 The many particle basis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.5 The many particle operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.6 The variational principle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3 A brief introduction to the second quantization formalism 193.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193.2 Operators in the second quantization notation . . . . . . . . . . . . . . . . . . 203.3 The time independent Wick’s theorem . . . . . . . . . . . . . . . . . . . . . . 213.4 Particle- hole formalism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

4 Mathematical Modelling of two dimensional Quantum dots 234.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234.2 The Hamiltonian . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234.3 The single particle wave functions . . . . . . . . . . . . . . . . . . . . . . . . 244.4 The many body wave functions . . . . . . . . . . . . . . . . . . . . . . . . . . 254.5 The Normal ordered Hamiltonian . . . . . . . . . . . . . . . . . . . . . . . . . 264.6 The Hamiltonian matrix elements . . . . . . . . . . . . . . . . . . . . . . . . . 27

II Numerical many body methods 29

5 The Full Configuration Interaction method 315.1 Introduction to the method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315.2 Error analysis of the FCI energies . . . . . . . . . . . . . . . . . . . . . . . . . 325.3 Extrapolation Formulas . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

4

Page 5: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

6 Projector Monte Carlo Methods 356.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356.2 Diffusion Monte Carlo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36

6.2.1 The projection operator and the short time approximation . . . . . . 366.2.2 The Diffusion Monte Carlo Algorithm . . . . . . . . . . . . . . . . . 386.2.3 Systematic errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

7 The Hartree-Fock method 407.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407.2 The Roothaan-Hartree-Fock equations . . . . . . . . . . . . . . . . . . . . . . 41

III Full Configuration Interaction Quantum Monte Carlo 42

8 The FCIQMC algorithm 448.1 The mathematical approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448.2 Population control and the statistical estimators . . . . . . . . . . . . . . . . . 468.3 The FCIQMC algorithm and simulation procedures . . . . . . . . . . . . . . 478.4 Convergence criteria and the time step error . . . . . . . . . . . . . . . . . . . 488.5 The FCIQMC sign problem . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48

9 Initiator-FCIQMC 529.1 The initiator spaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

10 Sampling rules 5510.1 The suggestion probability distribution . . . . . . . . . . . . . . . . . . . . . . 5510.2 Sampling of the suggestion probabilities . . . . . . . . . . . . . . . . . . . . . 5610.3 Finding the sets Sn . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57

11 Storing and accessing the Coulomb matrix elements 5911.1 Indexing scheme . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5911.2 Mapping of the indices to a pointer . . . . . . . . . . . . . . . . . . . . . . . . 6111.3 Graphical representation of model spaces . . . . . . . . . . . . . . . . . . . . 6111.4 The arrow weight matrices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6211.5 Memory requirements and numerical speed . . . . . . . . . . . . . . . . . . . 6411.6 Generalisation to other systems . . . . . . . . . . . . . . . . . . . . . . . . . . 65

IV Data analysis 66

12 Statistical analysis 6812.1 The statistical error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6812.2 Flyvbjerg-Petersen analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6912.3 Flyvbjerg-Pedersen analysis for FCIQMC . . . . . . . . . . . . . . . . . . . . 70

5

Page 6: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

13 Curve fitting 7413.1 The least square method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7413.2 Error analyses of the least square fit . . . . . . . . . . . . . . . . . . . . . . . 7513.3 Error analysis of E(R) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76

V Implementation of the FCIQMC algorithm 77

14 Numerical representation of the determinants, the basis and the state vector 7914.1 The determinants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7914.2 The single particle basis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8014.3 The state vector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80

15 A single FCIQMC iteration 81

16 Parallelization 8716.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8716.2 Numerical libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8716.3 The distribution of walkers on the MPI tasks . . . . . . . . . . . . . . . . . . 8816.4 Load balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8916.5 The program flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89

17 Organization of the code and the classes 9217.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9217.2 The initSimulation class . . . . . . . . . . . . . . . . . . . . . . . . . . 9417.3 The runSimulation class . . . . . . . . . . . . . . . . . . . . . . . . . . . 9417.4 The walkerContainerClass class . . . . . . . . . . . . . . . . . . . . . 9417.5 The sortWalkers class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9617.6 The walkerDistribution class . . . . . . . . . . . . . . . . . . . . . . . 9717.7 The loadBalanceThreads class . . . . . . . . . . . . . . . . . . . . . . . 9717.8 The walkerPropagator class . . . . . . . . . . . . . . . . . . . . . . . . 9817.9 The hamiltonianElements class . . . . . . . . . . . . . . . . . . . . . . 9917.10The libGRIE class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10017.11The inputVars class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100

18 Benchmarking the Code 10118.1 Hotspots by CPU usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10118.2 Scaling with openMP and MPI . . . . . . . . . . . . . . . . . . . . . . . . . . 10218.3 Scaling with the number of walkers . . . . . . . . . . . . . . . . . . . . . . . . 10318.4 The determinant load parameter and the redistribution

threshold . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104

19 Modifying the code to simulate other systems 106

6

Page 7: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

VI Results 108

20 Validating the code 11020.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11020.2 FCIQMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110

20.2.1 A simple system, two electrons in two shells . . . . . . . . . . . . . . 11020.2.2 Comparing FCIQMC energies and FCI energies . . . . . . . . . . . . 11120.2.3 Testing FCIQMC energies against analytical results . . . . . . . . . . 112

20.3 i-FCIQMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

21 The statistical estimators 114

22 The scaling of the algorithm 11722.1 The critical number of walkers . . . . . . . . . . . . . . . . . . . . . . . . . . 11722.2 Scaling of the FCIQMC algorithm . . . . . . . . . . . . . . . . . . . . . . . . 11722.3 Concluding remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120

23 Convergence of the i-FCIQMC energies 122

24 Simulations with a Hartree Fock basis 125

25 Extrapolated energies 12825.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12825.2 Testing the extrapolation formula . . . . . . . . . . . . . . . . . . . . . . . . . 128

25.2.1 Open shell results for ω = 1/1.892 . . . . . . . . . . . . . . . . . . . . 12925.2.2 Open shell results for ω = 1 . . . . . . . . . . . . . . . . . . . . . . . 129

25.3 Summary and Comments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130

26 Conclusions and perspectives 13426.1 Summation and achievements . . . . . . . . . . . . . . . . . . . . . . . . . . . 13426.2 Ideas and prospects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13526.3 Concluding remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135

VII Appendix 137

A Running the code 138

7

Page 8: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 1

Introduction

1.1 Motivation

Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculateground state properties of quantum many body systems. The algorithm was first made fa-mous by Booth et. al. (2009) [3], and has since then seen great success within the quantumchemistry community. Our motivation was to implement FCIQMC and apply the algorithmon a new physical system, namely two dimensional quantum dots in parabolic potentials.This is a well explored physical system, which have been simulated using a range of nu-merical methods like Variational Monte Carlo [11], Diffusion Monte Carlo [22], CoupledCluster [24] and Full Configuration Interaction [20, 15, 16], and therefore provides a goodbenchmark for the FCIQMC algorithm. Furthermore, the degree of correlation can be tunedby increasing or decreasing the strength of the confining potential, and thus allows us tostudy how the algorithm performs with systems of varying correlation strength.

1.2 Achievements

Our main achievement is to successfully have implemented FCIQMC, which is a rathernovel algorithm with few implementations. The implementation was a challenging task,and quite a lot of thinking and experimenting was necessary to find viable solutions. Themain obstacles was to find an efficient numerical representation of the state vectors witha low memory footprint, and to develop a fast parallel algorithm with a small overheadusing a hybrid approach with multithreading and MPI. Some work has also been investedin finding a practical and reliable way of analyzing the stochastic error of the so calledprojected estimator of the energy and developing a fast algorithm for storing and retrievingthe Hamiltonian matrix elements.

We have studied how the algorithm performs when applied on quantum dots with adifferent degree of correlation and a different number of particles. We believe that theseresults can be generalized to other systems as well, and this may be seen as our main results.We have also made a few predictions of the energy of quantum dots with NP ≤ 6 particlesusing extrapolation of the energies, and have demonstrated that open shell Diffusion MonteCarlo calculations of the same systems produce ground state energies that are slightly toohigh.

8

Page 9: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

1.3 The structure of the thesis

This thesis is organized in six parts

I: In the first part we discuss the theoretical background for our project. An introductionto quantum mechanics is followed by a short review of the physics of quantum dots.

II: In the second part we discuss different numerical many body methods such as FullConfiguration Interaction, Diffusion Monte Carlo and Hartree-Fock. It is important tohave a certain knowledge of these methods, both as a theoretical basis to understandthe FCIQMC algorithm and as a theoretical background when we interpret our results.

III: The third part is devoted to the theory and the numerical methods that is directly rele-vant for the FCIQMC method. Three chapters are devoted to the FCIQMC algorithm,the initiator adaption i-FCIQMC and sampling methods. In the last chapter we haveintroduce an indexation and storage scheme for the Hamiltonian Matrix elements.

IV: In the fourth part we are dealing with methods to analyse output data from the simu-lations. We have discussed how the statistical error can be calculated and how we canfit parametrized curves to extrapolate the results.

V: In the fifth part we discuss different aspects of our implementation of the algorithm.The numerical representation of the state vector and the parallelization of the algorithmare discussed in the first chapters. Next we look at the class structure and implemen-tation details. One chapter is devoted to benchmarking and testing of the code, and inthe last chapter we discuss how it can be modified to simulate other physical systems.

VI: In the last part we study how the algorithm performs when applied to two dimensionalquantum dots. This is an excellent test case since the degree of correlation in thesystems can be varied by changing the potential strength.We have demonstrated thatthe code is reproducing Full Configuration Interaction, Coupled Cluster and DiffusionMonte Carlo results, and we have calculated the ground state energies for a few openshell systems with NP ≤ 6 particles by extrapolating the energies. We have also ex-plored the scaling and efficiency of the algorithm for systems with a different numberof particles and different interaction strengths.

9

Page 10: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Part I

General theory

10

Page 11: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

In this part we give a short introduction to non- relativistic quantum mechanicsand quantum many body theory. We will also introduce the so called secondquantized notation and discuss how quantum dots are modelled mathematically.

The following chapters are not in any way meant to be a thorough introductionto the subjects that we discuss. Our goal here is twofold. First we want tointroduce the necessary concepts, theorems and equations that we need later inthe thesis, and second, we want to establish a certain mathematical notation.

11

Page 12: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 2

A brief introduction to QuantumMechanics

This chapter is not meant to be a self-contained introduction to quantum mechanics, butrather a brief introduction to the concepts that have a direct relevance to this thesis. Thosewho are looking for a complete introduction to quantum mechanics are referred to an intro-ductory text on the subject. See for example Ref. [31] for a thorough introduction to thefield. We will first state the fundamentals of quantum theory followed by the introductionof a few important properties of quantum mechanical systems.

2.1 The postulates of quantum mechanics

Quantum mechanics is an axiomatic theory, meaning that it is based on a set of postulatesfrom which the theory is logically derived. In this chapter we are presenting the fundamentalaxioms or postulates of quantum mechanics and explain their meaning. This will serve asan extremely brief introduction to the main concepts of the theory.

The first postulate concerns the mathematical representation of a quantum mechanicalsystem.

Postulate 1: To every quantum system there is an associated separable infinite dimensionalcomplex Hilbert space H . A quantum state is represented as a normalized state vector∣Ψ⟩ ∈ H .

The Hilbert space, also called the state space, is a linear vector space with an inner product,and can be viewed as a generalization of Euclidian spaces. Hilbert spaces are characterizedby a set of properties that we will now present. Assume that the vectors {∣a⟩, ∣b⟩} are in H .Then the inner product of two elements ∣a⟩, ∣b⟩ is denoted ⟨a∣b⟩, and obeys the followingrelations

(i): The Hermitian symmetric property: ⟨a∣b⟩ = ⟨b∣a⟩∗,

(ii): Linearity in the first element : ⟨ca∣b⟩ = c⟨a∣b⟩,

(iii): Conjugate linearity in the second element : ⟨a∣cb⟩ = c∗⟨a∣b⟩,

(iv): Additivity in the first element: ⟨a1 + a2∣b⟩ = ⟨a1∣b⟩ + ⟨a2∣b⟩,

12

Page 13: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

(v): Additivity in the second element: ⟨a∣b1 + b2⟩ = ⟨a∣b1⟩ + ⟨a∣b2⟩.

(vi): Positivity: ⟨a∣a⟩ ≥ 0.

This is a general definition of Hilbert spaces, but as we will see later, the exact properties ofthe state spaces are defined by the physical system itself.

Note that any linear combination of vectors in H (except the null vector) represents aphysical state. If we for example have a basis {∣i⟩}ni=0 for the state space, any state can berepresented as

∣Ψ⟩ =n

∑i=1ci∣i⟩, (2.1)

where {ci} are complex weights, or amplitudes, with the property∑ni=1 ∣ci∣2 = 1 to normalize

the state.The next postulate concerns the joint Hilbert spaces of composite systems. An example

of such systems is the many electron quantum dots that we are dealing with in this thesis.

Postulate 2: If H1 and H2 are the Hilbert spaces of two quantum systems, then the Hilbertspace of the composite system is the tensor product H1 ⊗H2.

For example, for a system consisting of a number of distinguishable particles in the states∣a⟩, ∣b⟩ and ∣c⟩, the composite state is the tensor product ∣Ψ⟩ = ∣a⟩⊗ ∣b⟩⊗ ∣c⟩. We will comeback to this subject later when we discuss many particle systems, and as we will see, thistheorem provides us with an easy way of constructing the Hilbert spaces of many particlequantum dots.

The state vector encapsulates all there is to know about the physical system, but quantummechanical systems are not well defined in a classical sense where all measurable quantitiescan be known simultaneously. They are abstract quantities that contain information aboutthe probability of the different outcomes of a measurement. The link between the abstractstate vectors and measurable quantities are defined by Hermitian1 operators as stated in thethird postulate.

Postulate 3: To every observable of a quantum mechanical system, there is associateda linear Hermitian operator. The spectrum of eigenvalues of the operator represents themeasurable values of the observable.

An observable is defined as a measurable quantity such as the angular momentum or theenergy of the state. Hermitian operators have the properties that all eigenvalues are realand that the eigenvectors span the space in which the operators act. An example is theHamiltonian operator, H which represents the energy of the state. Assume that the operatorH has the eigenvalues {εi}

ni=1 and the eigenvectors {∣ϕi⟩}

ni=1 which are a basis for H .

The eigenvalues represents the possible outcome of a measurement of the energy and thecorresponding eigenvectors are the states in which the observable is “sharp” or well defined.The probability of measuring the energy εi is given by the function

P (εi) = ⟨Ψ∣ϕi⟩⟨ϕi∣Ψ⟩, (2.2)

1 An operator O is Hermitian if O† = O, where O† is the adjoint operator of O.

13

Page 14: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

which means that the energy is well defined only in the case that the state vector is parallel toan eigenvector of H , or in the subspace spanned by the eigenvectors {∣ϕi1⟩, ∣ϕi2⟩, . . . ,} withdegenerated energies εi1 = εi2 = . . . . As a consequence of this, it is impossible to simulta-neously measure the observables of two operators H and O with non-parallel eigenvectors,or more precisely, which are not commuting [O, H] ≠ 0. This property is commonly knownas the uncertainty principle.

A measurement in quantum mechanics is a subtle concept which often gives rise tophilosophical difficulties. The fourth postulate bypasses these problems by providing anoperational definition of an ideal measurement.

Postulate 4: A ideal measurement of an observable o with the corresponding operator Oleaves the quantum system in the state ∣o⟩ where O∣o⟩ = o∣o⟩.

As an example, if the quantum state ∣Ψ⟩ is measured to have the energy εi, we say thatthe state has collapsed into the corresponding eigen state ∣ϕi⟩. This is modeled as an in-stantaneous process where the state changes from ∣Ψ⟩ to ∣ϕi⟩. Note that both the conceptof an ideal measurement and the idea of an instantaneous change of the physical state iscontroversial, and that this is an active field of research (see for example Ref. [32]).

The fifth and last postulate states that the dynamics of a quantum system is describedby a famous partial differential equation.

Postulate 5: The time evolution of the state vector is described by the time dependentSchrödinger equation.

The Schrödinger equation can be written

ih∂

∂t∣Ψ(t)⟩ = H ∣Ψ(t)⟩, (2.3)

where h is the reduced Planck’s constant and H is the Hamiltonian operator. The quantummechanical wave function ∣Ψ(t)⟩ is a probability amplitude that describes the state of aquantum mechanical system at time t. If ∣Ψ(t)⟩ is an eigenstate of the Hamiltonian H , then∣Ψ(t)⟩ is said to be stationary and is represented by the wave function

∣Ψ(t)⟩→ ∣ϕi⟩e−iεit/h, (2.4)

where {∣ϕi⟩} are the eigenstates of the Hamiltonian and {εi} are the eigenvalues

H ∣ϕi⟩ = εi∣ϕi⟩. (2.5)

Obviously, this can only be true if the Hamiltonian has no explicit time dependence. Sincethe Hamiltonian operator is a hermitian operator, the set of eigenstates ∣ϕi⟩ is a basis. Thismeans that as long as the Hamiltonian operator is time independent, all quantum states canbe written as a linear combination of the stationary states

∣Ψ(t)⟩ =∑i

∣φi⟩e−iεit/h, (2.6)

which always solves the Schrödinger equation.In this thesis we are only dealing with time independent quantum mechanical systems.

Therefore we are only solving the eigen value problem Eq. (2.5) which we will refer to asthe stationary Schrödinger equation from now on. Since the stationary states are eigenstatesof the Hamiltonian, the eigenvalues εi must be interpreted as the possible energies of thesystem. The lowest eigenvalue εi will be referred to as the ground state energy of the systemand the corresponding eigenstate will be referred to as the ground state.

14

Page 15: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

2.2 Antisymmetric state vectors and fermions

A state vector which describes a system of identical particles can be shown to be eithersymmetric or antisymmetric with regard to the interchange of two particles. And as we willshow in this section, this seemingly innocent property has important consequences for thebehaviour of quantum particles.

We will start with a short derivation. Consider an N particle quantum system of identi-cal particles

∣Ψ⟩ = ∣1,2,3, . . . ,N⟩. (2.7)

This state must have the same physical properties when two particles are permuted, whichmeans that for any observable O,

⟨Ψ∣P †ijOPij ∣Ψ⟩ = ⟨Ψ∣O∣Ψ⟩, (2.8)

where Pij is the interchange operator which has the property that it interchanges particle iand j. This equation has the solution

Pij ∣Ψ⟩ = ±∣Ψ⟩. (2.9)

All elementary particles are separated in two categories of particles called fermions, as forexample electrons, and bosons, with the property that

Pij ∣Ψ⟩ = −∣Ψ⟩ for fermions and Pij ∣Ψ⟩ = +∣Ψ⟩ for bosons. (2.10)

A state vector describing a system of fermions is therefore said to be antisymmetric withregard to the exchange of two particles. A property of such states is that two identicalfermions never can be in the same quantum state. This is easy to see if we consider thetwo particle state ∣1,1⟩ consisting of two identical fermions. If we apply the interchangeoperator on this state we see that

∣1,1⟩ = P12∣1,1⟩ = −∣1,1⟩⇒ ∣1,1⟩ = 0, (2.11)

which shows that this state can not exist.

2.3 Spin and the spin statistics theorem

Spin is an intrinsic property of elementary particles which have no classic counterpart butis a pure quantum phenomenon. The spin quantum number s can only have values s ∈ hn/2where n is a positive integer and h is the reduced Planck constant. Any given class ofelementary particles has a fixed spin value that can not be changed, and according to thespin statistics theorem, all particles with half integer spins are fermions [31].

The spin of a single electron is described by a spinor ∣χ⟩ ∈ C2 which is usually repre-sented as a linear combination of the eigen functions of the spin projection operator Sz

Sz ∣ ↑⟩ = s∣ ↑⟩, Sz ∣ ↓⟩ = −s∣ ↓⟩, (2.12)

and a many particle wave function has a spinor

∣χ⟩ ∈ {∣ ↑⟩, ∣ ↓⟩}⊗ {∣ ↑⟩, ∣ ↓⟩}⊗ {∣ ↑⟩, ∣ ↓⟩}⊗ . . .{∣ ↑⟩, ∣ ↓⟩}. (2.13)

15

Page 16: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

There is a magnetic moment associated to the spin of an electron. The magnetic momentcontribute to the total energy of an electronic system, but this effect is usually very small andis often neglected. In this thesis, we use a Hamiltonian without a spin coupling, meaningthat we ignore the magnetic moment of the electrons. However, the spin of the particles stillhave a very important impact on the behaviour of a quantum system. Because of the Pauliexclusion principle, the many particle basis is limited to states where any one particle stateis occupied by at most one electron.

2.4 The many particle basis

The bosonic and fermionic many particle wave functions live in different Hilbert spaces andfollow different mathematical rules. We will only focus on fermionic systems since theseare the systems that we have dealt with in this thesis.

We assume that an orthonormal single particle basis is available

{∣ϕ1⟩, ∣ϕ2⟩, ∣ϕ3⟩, . . .} ∈ H1, (2.14)

where {ϕi} are eigenfunctions of the single particle hamiltonian HHO, and the spinors areassumed to be contained in the single particle wave functions. According to the secondpostulate, the many particle Hilbert space is

H = H1 ⊗H1 ⊗H1 ⊗ . . .H1. (2.15)

In the case that the single particle states are representing fermions, the many particle statesmust be antisymmetric with regard to a permutation of two particles. The anti symmetricHilbert space of an N particle system is a subspace of H and can be written

HAS = {∣Ψ⟩ ∈ H ; Pij ∣Ψ⟩ = −∣Ψ⟩∀i ≠ j ∈ 1,2,3, . . . ,N} . (2.16)

To construct the antisymmetric states we will define the antisymmetrization operator A.And to do so, we must first define the permutation operator Pi1,i2,...,iN which changes thesequence of particles (1,2,3, . . . ,N) to (i1, i2, . . . , iN). Any permutation of the particlescan now be written as a product of p interchange operators

Pi1,i2,...,iN = Pm1,n1Pm2,n2 . . . Pnp,mp , (2.17)

where the sign of the permutation is

Si1,i2,...,iN = (−1)p. (2.18)

The permutation operator is defined as

A = ∑

All possible permutations P...

1√N !Pi1,i2,...,iNSi1,i2,...,iN , (2.19)

where 1/√

(N !) is a normalization factor (note that the total number of possible permuta-tions is N !). Since PijA = −A, we see that the states

∣ϕi1ϕi2ϕi3 . . . ϕiN ⟩ ≡ A∣ϕi1⟩⊗ ∣ϕi2⟩⊗ ∣ϕi3⟩⊗ . . . ∣ϕiN ⟩, (2.20)

16

Page 17: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

are antisymmetric. The adjoint of Pij is the permutation operator defined by the inversepermutation P −1

ij = Pji meaning that P T = P −1. Consequently, each permutation operatoris a unitary operator and therefore A must be as well. Since A is a unitary operator thenormalization and orthogonality of the product states are conserved.

The antisymmetrized product states, with i1 < i2 < i3 < . . . iN , constitute a basis forHAS ,

HAS = span{∣ϕi1ϕi2ϕi3 . . . ϕiN ⟩; i1 < i2 < i3 < . . . iN}, (2.21)

where we have set i1 < i2 < i3 < . . . iN to assure that all particles are in a unique state andthat every state is represented only once.

The states ∣ϕi1ϕi2ϕi3 . . . ϕiN ⟩ are often written as determinants

∣ϕi1ϕi2ϕi3 . . . ϕiN ⟩ =1

√N !

det(ϕi1 , ϕi2 , ϕi3 , . . . , ϕiN ) ≡1

√N !

RRRRRRRRRRRRRRRRRRRRRR

ϕ(1)i1

ϕ(1)i2

. . . ϕ(1)iN

ϕ(2)i1

ϕ(2)i2

. . . ϕ(2)iN

⋮ ⋮

ϕ(N)i1

ϕ(N)i2

. . . ϕ(N)iN

,

RRRRRRRRRRRRRRRRRRRRRR(2.22)

where the superscript (i) denotes the i’th state in a direct product. Determinants are veryuseful since they have the desired antisymmetric properties, and the many particle statevectors are often sloppily referred to as determinants.

2.5 The many particle operators

As we have already discussed, observables are represented by Hermitian operators whichmap HAS to itself. Many particle operators are often categorized after the number of par-ticles that are involved in an interaction. The one body operators involve single particleinteractions, the two body operators involve two particle interactions and so on. Our Hamil-tonian, as we will see later, only contains one and two body operators, and we will thereforetake a closer look at these cases.

The one body operators takes the form

C = c⊗ 1⊗ 1⊗ . . .1 + 1⊗ c⊗ 1⊗ . . .1 + ⋅ ⋅ ⋅ + 1⊗ 1⊗ 1⊗ . . . c, (2.23)

where c is an operator in the single particle Hilbert space H1. On the single particle basis{∣ϕi⟩} the operator is written

c =∑ij

∣ϕi⟩⟨ϕj ∣ ⟨ϕi∣c∣ϕj⟩, (2.24)

and the amplitude for an interaction between the two many body states ∣ϕn1 . . . ϕnN ⟩ takesthe simple form

⟨ϕn1 . . . ϕnN ∣C ∣ϕm1 . . . ϕmN ⟩ =N

∑i,j=1

⟨ϕni ∣c∣ϕmj ⟩. (2.25)

17

Page 18: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

A general two particle operator D can be written as a sum of operators

D =1

2∑i≠jDij (2.26)

where Dij is defined on the two particle space H1 ⊗ H1 of particle i and j and can bewritten on the form.

Dij = ∑klmn

dklmn1⊗ . . .1⊗ ∣ϕk⟩⟨ϕm∣´¹¹¹¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¶i’th place

⊗1⊗ . . .1⊗ ∣ϕl⟩⟨ϕn∣´¹¹¹¹¹¹¹¹¹¹¹¸¹¹¹¹¹¹¹¹¹¹¹¶j’th place

⊗1⊗ . . .1, (2.27)

and the interaction amplitude is

⟨ϕn1 . . . ϕnN ∣D∣ϕm1 . . . ϕmN ⟩ =N

∑i,j,k,l=1

dninjmkml . (2.28)

The operators representing an observable must obviously map HAS to itself. This im-plies, as is straight forward to show, that the operators must commute with the antisym-metrization operator A. This is always the case for the one body operator C, but for the twobody operator D it sets some restrictions on the form of dklmn. In our case, the two bodyoperator is the Coulomb interaction for which dklmn = dmnkl, which means that D and Acommute. In fact, our Hamiltonian is completely symmetric with regard to the exchangeof two particles since all electrons have the same mass and charge. This means that theinterchange operators have no effect on the operator, and consequently it commutes withthe antisymmetrization operator.

2.6 The variational principle

The variational principle is a general property of quantum systems, and is also the foun-dation of several numerical many body methods. It states that any state ∣Ψ⟩ ∈ H has anexpectation value for the energy ⟨Ψ∣H ∣Ψ⟩ which is larger or equal to the ground state en-ergy. Furthermore, if the expectation value is equal to the ground state energy, ∣Ψ⟩ is aground state of the Hilbert space. We will show why this is true for nondegenerate groundstates. Assume that ∣Ψ⟩ is expanded in the basis of eigenfunctions {∣ϕi⟩} of the Hamiltonianoperator

∣Ψ⟩ =∑i

ci∣ϕi⟩. (2.29)

The expectation value of the Hamiltonian is

⟨Ψ∣H ∣Ψ⟩ =∑i

∣ci∣2εi, (2.30)

where {εi} are the eigenvalues of H and {ci} are complex weights. Since the ground stateenergy ε0 is smaller or equal to all other εi, the normalization requirement ∑i ∣ci∣2 = 1implies that

∑i

∣ci∣2εi ≤ ε0, (2.31)

and only equal in the case that ∣c0∣ = 1 and ci = 0 for i > 0, in which case ∣Ψ⟩ is the groundstate ∣ϕ0⟩. The proof is easily generalized to systems with degenerate ground states, but inthis case the ground state is no longer unique.

18

Page 19: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 3

A brief introduction to the secondquantization formalism

We will now introduce a formalism which is very useful when dealing with systems of manyinteracting particles. The formalism will be presented very briefly and with no proofs. Thereare numerous texts which give a good introduction to the second quantization formalismtogether with relevant theorems and proofs. See for example Shavitt et. al. (2009) [33] orGross et. al. (1991) [9].

3.1 Introduction

The second quantization formalism makes use of creation and annihilation operators to addor remove particles to a quantum state. The annihilation operator ai removes a state ϕi froma state, and the creation operator a†

i adds a state ϕi,

a2∣ϕ1ϕ2ϕ3 . . . ϕN ⟩ = ∣ϕ1ϕ3 . . . ϕN ⟩, (3.1)

a†2∣ϕ1ϕ3 . . . ϕN ⟩ = ∣ϕ1ϕ2ϕ3 . . . ϕN ⟩. (3.2)

By defining a set of anticommutation relations for these operators, we can ensure that thestate vectors have the correct antisymmetric properties. The following equations can beshown to apply to fermionic systems

{a†i , a

†j} = {ai, aj} = 0, (3.3)

{a†i , aj} = δij . (3.4)

It follows that

a†i ∣ϕn1ϕn2ϕn3 . . . ϕnN ⟩ = 0 if i ∈ {n1, n2, . . . , nN} , (3.5)

ai∣ϕn1ϕn2ϕn3 . . . ϕnN ⟩ = 0 if i ∉ {n1, n2, . . . , nN} . (3.6)

As follows from Eqs. (3.3), (3.4), these relations assure that the state vectors have the correctsymmetry properties since any permutation of two different operators (particles) will lead toa sign change. The antisymmetric properties are now contained in the algebraic expressionsfor the state vectors. Also note that Eq. (3.3) is an expression of the Pauli principle.

19

Page 20: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Although this is not strictly correct, these state vectors are often simply referred to asdeterminants. The reason is that state vectors that are represented as determinants havemany of the same mathematical properties as the second quantization state vectors. Wewill, in the rest of this thesis, comply to the sloppy language and refer to a general statevector as a determinant. Any such determinant can be written

a†n1a†n2a†n3. . . a†

nN∣ ⟩ = ∣ϕn1ϕn2ϕn3 . . . ϕnN ⟩, (3.7)

where the indices ni must be ordered in some way to make sure that each determinant isonly represented once. We use the ordering n1 < n2 < n3 < ⋅ ⋅ ⋅ < nN . The state ∣ ⟩ representsthe vacuum state which symbolizes that there are zero particles present in the system. Notethat the vacuum state is normalized ⟨ ∣ ⟩ = 1 and that an annihilation operator working on thevacuum state, ai∣ ⟩, is defined to be zero.

An important property that follows from the anticommutation relations is that the or-thogonality of the determinants are preserved. This can be shown by evaluating the innerproduct of a†

m1 . . . a†mN ∣ ⟩ and a†

n1 . . . a†nN ∣ ⟩ which yields

⟨ ∣amN . . . am1a†n1 . . . a

†nM ∣ ⟩ = δm1,n1 . . . δmN,nN , (3.8)

as follows from Eq. (3.4).

3.2 Operators in the second quantization notation

Operators can also be represented in terms of creation and annihilation operators. One bodyoperators can be written on the form

C =∑ij

⟨ϕi∣C ∣ϕj⟩a†iaj , (3.9)

while two body operators can be written on the form

D =1

2∑ijkl

⟨ϕiϕj ∣D∣ϕkϕl⟩a†ia

†jalak. (3.10)

The last two equations can be verified by considering the earlier section about many particleoperators. It is often convenient to rewrite the two body operators as

D =1

4∑ijkl

⟨ϕiϕj ∣D∣ϕkϕl⟩ASa†ia

†jalak, (3.11)

⟨ϕiϕj ∣D∣ϕkϕl⟩AS ≡ ⟨ϕiϕj ∣D(∣ϕkϕl⟩ − ∣ϕkϕl⟩). (3.12)

A derivation of the above identities can be found in most texts covering many body quantummechanics, and a good reference is Shavitt (2009) [33].

The evaluation of expectation values of products of operators are often made muchsimpler by finding the so called normal ordered form. We will make use of normal orderedoperators later, and we will therefore spend the rest of this section to define normal ordering.A product of operators are said to be normal ordered when all creation operators are to the

20

Page 21: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

left of all annihilation operators. As an example, consider the operators A, B, C which areproducts of annihilation and creation operators

A = a†a1aa2, (3.13)

B = a†b1ab2, (3.14)

C = a†c1ac2. (3.15)

The normal ordering of these operators are

{ABC} = (−1)pa†a1a

†b1a

†c1aa2ab2ac2. (3.16)

This is a reordering where the annihilation operators are set to the right of the creationoperators, and p is the number of permutations necessary to reorder the operators. Aninterchange of two creation or two annihilation operators would not destroy the normalorder, thus the normal ordering is not unique.

3.3 The time independent Wick’s theorem

Wick’s theorem provides an efficient way of calculating expectation values. We will statethis theorem without a proof, but the full proof can be found in many texts as for exampleGross et. al. (1991) [9]. Before we state the theorem we must introduce contractions. Acontraction of two creation or annihilation operators A, B is defined as

AB = AB − {AB} . (3.17)

Both A and B are either a creation or an annihilation operator, which means that there arefour possible combinations

a†ia

†j = a

†ia

†j − a

†ia

†j = 0, (3.18)

a†iaj = aia

†j − a

†iaj = 0, (3.19)

aiaj = aiaj − aiaj = 0, (3.20)

a†iaj = aia

†j − (−)a†

iaj = {ai, a†j} = δij . (3.21)

Further more, contraction of operators within a normal product can be written

{A . . . B . . . C . . . D . . . E . . . F} = (−1)pBDCE . . .{A . . . F} , (3.22)

where p is the number of permutations which are needed to move the contracted operatorsin front of the normal ordered product. Wick’s theorem says that a product of creationand annihilation operators is equivalent to the normal ordered product plus the sum of thenormal ordered products with all possible contractions.

AB . . . = {AB . . .} + ∑all single c.

{AB . . . . . .} + ∑all double c.

{AB . . . . . . . . .} + . . . (3.23)

We can use Wick’s theorem to rewrite operators as a sum of normal ordered products. Thisis a convenient form since vacuum expectation values ⟨ ∣{A . . .}∣ ⟩ always are zero.

21

Page 22: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

3.4 Particle- hole formalism

Until now, we have used the vacuum state as the reference state. It is however often naturalto use other states as the reference state in which case it is convenient to use the so calledparticle-hole formalism. Mathematically, the particle hole formalism is very similar to the“vacuum reference” formalism, but some mathematical concepts, like normal ordering ofthe operators and contractions, have to be redefined.

Assume that we want to use the state ∣c⟩ = a†c1 . . . a

†cN ∣ ⟩, where N is the number of

particles, as our new vacuum state, and define all other states relative to this state. Thestates {∣ϕci⟩}

Ni=1 are now referred to as hole states while all other states are referred to as

particle states. In the rest of this section we will let indices i, j, k, l symbolize hole statesand indices a, b, c, d symbolize particle states. Now, any state can be written as an excitationof the reference state

∣cab...ij... ⟩ ≡ a†aa

†b . . . ajai∣c⟩. (3.24)

The creation operator a†i is sometimes called a pseudo annihilation operator since it annihi-

lates a hole. Likewise, an annihilation operator of a hole state, ai, can be called a pseudocreation operator since it creates a hole. The full set of psuedo operators are defined

b†a = a

†a

ba = aa} (acts on particle states),

b†i = aibi = a

†i

} (acts on hole states). (3.25)

The exited states are now written

∣cab...ij... ⟩ ≡ b†ab

†b . . . b

†jb

†i ∣c⟩. (3.26)

With this new set of operators, the anticommutation relations, contractions and Wick’s the-orem will have exactly the same definition as in the “vacuum reference” formalism.

22

Page 23: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 4

Mathematical Modelling of twodimensional Quantum dots

4.1 Introduction

In the most general sense of the term, a quantum dot is a small quantum system whichis confined in space. But the term is most often used to describe electronic systems thatare trapped in semiconductor structures. During the last few decades, advanced processingtechniques have made it possible to manufacture artificial quantum dots which are trappedin one or two spatial dimensions, and confinement to less than three dimensions was ex-perimentally verified already in the early 1970s in GaAs-A1GaAs semiconductors [25].Confinement by potentials set up by electrostatic gates also allows experimentalists to con-trol their shape and size and the number of electrons which ranges from one to hundreds[26].

Our idealized quantum dots are modelled as two dimensional systems, which can bejustified both theoretically and experimentally. As we will come back to later, our quantumdot wave function is separable in the spatial dimensions. Consequently, if the componentperpendicular to the semiconductor layers are always in the ground state, this componentcan then be left out of the description.

We will not discuss the “real” quantum dots any further, but will from now on concen-trate on our idealized mathematical model. For more information on quantum dots we referto the review article of Ref.[26], which discusses both numerical and experimental results.

4.2 The Hamiltonian

The two dimensional quantum dots can be described by a Hamiltonian operator on the form

H = H0 + V , (4.1)

where H0 is an one-body operator which accounts for the single particle kinetic energiesand the interaction with an external electromagnetic field, and V is a two-body operatorwhich accounts for the Coulomb interaction between the electrons. The single particle

23

Page 24: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Hamiltonian can be written on the general form

H0 →H0(r1, . . . , rN ,p1, . . . ,pN) =∑i

(1

m∗ [pi −e

cA(ri)]

2

+ Vext(ri)) , (4.2)

where A(r) is the vector potential of an external magnetic field, and (ri,pi) is the positionand momentum coordinates. The magnetic moment of the electrons is ignored, thus thespin-spin and the spin-orbit couplings are assumed to be negligible. We also assume thatthere is no external magnetic field and set the vector potential A(r) to zero.

The external electrostatic field Vext(r) is taken to be a parabolic potential. This is amuch used approximation in theoretical physics, since the shape of any conservative poten-tial is approximately parabolic close to the minima. With these assumptions, the one-bodypart of the Hamiltonian becomes

HH0 = T + Vext, (4.3)

T →∑i

1

mpi = −

h2∇2

2m, (4.4)

Vext →mω2

2R2, R = (r1, . . . , rN), (4.5)

where ω is the oscillator frequency, h is the reduced Planck constant and m is the electronmass. To simplify the expressions we choose to measure energies in units of hω and lengthsin the units of (h/(mω))1/2. The single particle Hamiltonian can then be written on thedimensionless form

HHO(r) =1

2r2 −

∇2r

2, (4.6)

and the Coulomb operator can be written

V →∑i<jV (ri, rj) =∑

i<j

λ

rij, rij = ∣ri − rj ∣, λ =

1

hω(

e2

4πε0ε) . (4.7)

4.3 The single particle wave functions

We will first take a look at the eigenstates of the single particle Hamiltonian H0 which wewill refer to as spin orbitals or simply as the single particle wave functions. We will lateruse these to construct the many particle basis using the same strategy as we discussed in theprevious chapters. Since the Hamiltonian has no spin coupling, the electron spins does notaffect the description of the single electrons. Therefore, we will leave them out for now andexplicitly include them in the mathematical description in the next section where we discussthe many particle basis.

We denote the single particle wave functions {ϕ1, ϕ2, . . .}. These are found by firstnoting that the single particle Hamiltonian can be written as a sum

HHO =1

2∑i

(x2i −δ2

δx2i) +

1

2(y2i −

δ2

δy2i) , ri = (xi, yi). (4.8)

24

Page 25: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Figure 4.1: Illustration of the single particle basis, and an example of how the spin orbitals can beindexed. Each arrow ↑ corresponds to a spin +1/2 state, and each ↓ corresponds to a spin −1/2 state.Each vertical line corresponds to an orbital with a given magnetic quantum number m and principalquantum number n. The numbers next to the arrows corresponds to the index of the spin orbital. Forexample, ϕ0 has spin −1/2, m = n = 0 and ϕ10 has spin +1/2 and n = 0, m = 2.

Thus the solution is separable, and can be written as a product of functions that dependsonly on one of the variables {xi} or {yi}. These are well known equations which describethe behaviour of the so called quantum harmonic oscillator [31], and the solutions can berepresented in many ways. Because of the rotational symmetry of the quantum dots, it isoften convenient to represent the single particle wave functions as the eigenfunctions ofthe angular momentum operator LZ which can be shown to commute with HH0. In twodimensions and in polar coordinates ϕi can be written

ϕi(r)→ ϕn,m(r, θ) = [2n!

(n + ∣m∣)!]

1/21

2πeimθr∣m∣L∣m∣

n (r2)e−r2/2, r = ∣r∣ , (4.9)

which are the so called Fock- Darwin orbitals, and where Lm are the Laguerre polynomials.Each i is mapped to a unique pair of quantum numbers (n,m), where m is the magneticquantum number and n is the principal quantum number

n ∈ 0,1,2, . . . , m ∈ {−n,−n + 2, . . . , n}. (4.10)

The single particle energy can be shown to be

∫ dr rdθ ϕ†n,m(r, θ)HHO(r, θ)ϕn,m(r, θ) = 2n + ∣m∣ + 1, (4.11)

in units of hω.

4.4 The many body wave functions

The many body wave functions are constructed from the harmonic oscillator eigenfunctions.But to describe the many particle system, we must also include spin. Each single particle

25

Page 26: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

wave function has a triplet of quantum numbers (m,n, s) which uniquely specifies thequantum state.

ϕi = ϕmi,ni ⊗ χsi , (4.12)

where χsi is the spinor. The N particle wave function is the determinant

∣Di⟩ = ∣ϕi1 , . . . , ϕiN ⟩ ≡1

N !det (ϕi1 , . . . , ϕiN ) , (4.13)

which we will write in second quantized form as

∣Di⟩ = a†i1. . . a†

iN∣ ⟩. (4.14)

4.5 The Normal ordered Hamiltonian

To simplify the calculation of different expectation values, we want to express the Hamil-tonian on normal ordered form in the particle-hole formalism. Our Hamiltonian can bewritten on the general form

H = HHO + V =∑pq

⟨ϕp∣HHO ∣ϕq⟩a†paq +

1

4∑pqrs

⟨ϕpϕq ∣V ∣ϕrϕs⟩ASa†pa

†qasar. (4.15)

We will now rewrite the Hamiltonian in normal ordered form in the particle-hole formalism.We define the contractions

a†paq = ⟨Dα∣a

†paq − {a†

p, aq}∣Dα⟩, (4.16)

where ∣Dα⟩ can be any state

∣Dα⟩ = a†α1a†α2. . . a†

αN∣ ⟩. (4.17)

We use the convention that the indices

p, q, r, s ∈ [0,2M], (4.18)

can represent any single particle wave function while

i, j, k, l ∈ {α1, α2, . . . , αN},

a, b, c, d ∉ {α1, α2, . . . , αN}. (4.19)

Here, 2M is the total number of spin orbitals, and {α1, α2, . . . , αN} are the indices of theoccupied orbitals. Note that we do not necessarily take i, j, k, l to be states below the Fermilevel.

According to Wick’s theorem and using the fact that ∣ϕp⟩ are the eigenfunctions of HHO

we arrive at the expression

HHO =∑pq

⟨ϕp∣HHO ∣ϕq⟩ ({a†paq} + {a†

paq}) =∑p

⟨ϕp∣HHO ∣ϕp⟩{a†pap} +∑

i

⟨ϕi∣HHO ∣ϕi⟩.

(4.20)

26

Page 27: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

The Coulomb energy operator V is also rewritten on normal form using Wick’s theorem.Only the nonzero contractions are included in the derivation

V =1

4∑pqrs

⟨ϕpϕq ∣V ∣ϕrϕs⟩AS × ({a†pa

†qasar} + {a†

pa†qasar} + {a†

pa†qasar}

+ {a†pa

†qasar} + {a†

pa†qasar} + {a†

pa†qasar} + {a†

pa†qasar}) (4.21)

=1

4∑pqrs

⟨ϕpϕq ∣V ∣ϕrϕs⟩AS{a†pa

†qasar} +∑

pqi

⟨ϕpϕi∣V ∣ϕqϕi⟩AS{a†paq}

+1

2∑ij

⟨ϕiϕj ∣V ∣ϕiϕj⟩AS . (4.22)

The total Hamiltonian can now be written

H =∑p

⟨ϕp∣HHO ∣ϕp⟩{a†pap} +

1

4∑pqrs

⟨ϕpϕq ∣V ∣ϕrϕs⟩AS{a†pa

†qasar}

+∑pqi

⟨ϕpϕi∣V ∣ϕqϕi⟩AS{a†paq} +Eα (4.23)

Eα =∑i

⟨ϕi∣HHO ∣ϕi⟩ +1

2∑ij

⟨ϕiϕj ∣V ∣ϕiϕj⟩AS . (4.24)

4.6 The Hamiltonian matrix elements

We will now use the normal ordered Hamiltonian to find the general expressions for theHamiltonian matrix elements ⟨Dα∣H ∣Dβ⟩. From Eq. (4.24) we see that only states that dif-fers by less than three orbitals are connected which means that all non zero matrix elementscan be written either as a diagonal element

⟨Dα∣H ∣Dα⟩, (4.25)

as the amplitude of a single excitation

⟨Dα∣H{a†aai}∣Dα⟩, (4.26)

or as the amplitude of a double excitation

⟨Dα∣H{a†aa

†baiaj}∣Dα⟩. (4.27)

Here we have used the same conventions for the indexing as in Eq. (4.19), with ∣Dα⟩ asthe reference state. The closed form expressions of the matrix elements are calculated byinserting the normal ordered Hamiltonian (4.24). For the diagonal elements we obtain theexpression

⟨Dα∣H ∣Dα⟩ =∑i

⟨ϕi∣HHO ∣ϕi⟩ +1

2∑ij

⟨ϕiϕj ∣V ∣ϕiϕj⟩AS . (4.28)

The single excitations have the amplitude

⟨Dα∣H{a†aai}∣Dα⟩ =∑

pqj

⟨ϕpϕj ∣V ∣ϕqϕj⟩AS{a†paq}{a

†aai} =∑

j

⟨ϕaϕj ∣V ∣ϕiϕj⟩AS , (4.29)

27

Page 28: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

and the double excitations have the amplitude

⟨Dα∣H{a†aa

†baiaj}∣Dα⟩ =

1

4∑pqrs

⟨ϕpϕq ∣V ∣ϕrϕs⟩AS

×({a†pa

†qasar}{a

†aa

†baiaj} + {a†

pa†qasar}{a

†aa

†baiaj}

+{a†pa

†qasar}{a

†aa

†baiaj} + {a†

pa†qasar}{a

†aa

†baiaj})

= ⟨ϕaϕb∣V ∣ϕiϕj⟩AS . (4.30)

The single particle energies ⟨ϕi∣HHO ∣ϕi⟩ are calculated using Eq. (4.11) while the anti-symmetric Coulomb matrix elements ⟨ϕiϕj ∣V ∣ϕiϕj⟩AS are defined as the integrals

⟨ϕpϕq ∣V ∣ϕrϕs⟩AS = Ipqrs⟨χsp ∣χsr⟩⟨χsq ∣χss⟩ − Ipqsr⟨χsp ∣χss⟩⟨χsq ∣χsr⟩, (4.31)

Iklpq ≡1

4∫ dr1dr2ϕ†

k(r1)ϕ†l (r2)V (r1, r2)ϕp(r1)ϕq(r2). (4.32)

where the spinors are orthonormal and obey the relation ⟨χs1 ∣χs2⟩ = δs1s2 . Kvaal (2008)has shown how the integrals Iklpq can be efficiently calculated in Ref. [15]. In our imple-mentation, we have used use the open source C++ library OpenFCI, which is described inthe same article, to calculate these integrals.

28

Page 29: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Part II

Numerical many body methods

29

Page 30: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Quantum many body systems are notoriously difficult to solve, and only thesimplest systems, such as the two particle quanum dot, can be solved on aclosed form. More complex systems are always solved using numerical meth-ods, and in most cases some approximation or simplification must be done toreduce the computational cost to a realistic level. Typical examples of suchapproximations are basis truncations, meaning that the only a subspace of thefull state space is used. Another example is the fixed node approximation ofDiffusion Monte Carlo that we will discuss later in this chapter.

In this part we will take a closer look at three classes of many body methods,namely Full Configuration Interaction Theory (FCI), Projector Monte Carlo(PMC) methods and Hartree-Fock (HF) methods. These use different approachesto calculate ground state values of different many body systems, and have dif-ferent advantages and weaknesses. The reason why we want to present FCI andPMC is that the Full Configuration Interaction Quantum Monte Carlo Method(FCIQMC), which we will present in the next part, can be seen as a hybrid be-tween these approaches. It shares some of the strengths and weaknesses of bothmethods, and it is therefore instructive to take a closer look at these first. TheHF method is introduced because it provides a method to unitarily transformthe spin orbitals to a more favourable basis, which we hope will speed up theconvergence of our simulations.

30

Page 31: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 5

The Full Configuration Interactionmethod

5.1 Introduction to the method

In this section we will introduce a numerical method which is called Full ConfigurationInteraction Theory (FCI). This is the conceptually simplest of the many body methods andyields exact solutions to the stationary Schrödinger equation within a given subspace of thefull state space. To be more specific, FCI solves the eigen problem

PRHPR∣Ψi⟩ = εi∣Ψi⟩, (5.1)

where PR is a projection operator 1 which projects the full Hilbert space onto a subspacewhich we call the FCI space. These subspaces can be defined in several ways, and twocommonly used FCI spaces are the energy cut space PR and the direct product space MR,which in our case are defined as

PR = span{∣Di⟩ ; ⟨Di∣HHO ∣Di⟩ ≤ R + 1} , (5.2)

MR = span{∣Di⟩ = ∣ϕn1ϕn2 . . . ϕnN ⟩ ; ⟨ϕni ∣HHO ∣ϕni⟩ ≤ R + 1} , (5.3)

where ∣ϕi⟩ are the harmonic oscillator eigenfunctions as defined earlier. Note that it is notclear which of these truncations give the most accurate result in terms of the dimensionalityof the subspace. Although it can be argued that more physical relevant states are included inthe energy cut spaces, it is not obvious which of the truncations that is the most favourable[14].

According to the variational principle, solving the eigen problem Eq. (5.1) is analogousto solving the minimization problem [8]

E(R) = min(⟨Ψ∣PRHPR∣Ψ⟩). (5.4)

This has two important implications. The first is that E(R1) ≤ E(R2) when R1 > R2, suchthat the FCI ground state energy is either improved or unchanged when we increase thesize of the FCI space. Thus the FCI ground state energy can be systematically improved by

1The projection P onto the subspace span{∣ϕi⟩} is defined as P = ∑i ∣ϕi⟩⟨ϕi∣. Note that P † = P = P P .The projection onto the excluded or truncated space Q = 1 − P has the same properties.

31

Page 32: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Figure 5.1: Modelspaces P6, M6 and P12 for quantumdots with NP = 1 particle. Here PN andMN is the energy cut space and the direct product space respectively, truncated on N + 1 shells.Note that P6 ⊂M6 ⊂M12 and that in general PN ⊂MN ⊂MNNP

for all NP

increasing the number of shells in the truncated basis which makes it possible to check if theenergies have converged. And secondly, the method is variational, such that any FCI energysets an upper bound to the energies of a system. Variational methods makes it possible to doa systematic search for lower ground state energies, knowing that the lower result always isthe better one.

Implementations of the FCI algorithm involves large scale diagonalization of the Hamil-tonian matrix

Hij = ⟨Di∣PRHPR∣Dj⟩. (5.5)

The most common method is to use the Lanczos algorithm [8], which requires at least twovectors of length equal to the dimension of the FCI space to be stored. The problem is thatthe dimensionality of the FCI spaces scales as

(M

N), (5.6)

where N is the number of particles and M is the number of spin orbitals in the basis [12].This limits the FCI algorithm to small systems with only a few particles or crude approxi-mations with a low R. As an example we look at the 6 particle quantum dot in 20 shells.The basis is filtered such that only the states with m = s = 0 are included. The filtered basishas a direct product space with dimensionality dim(M19) ∼ 4×1010 (see Tab. 5.1) which isalready at the absolute upper limit of what an FCI implementation can tackle on a modernsuper computer [20].

5.2 Error analysis of the FCI energies

Kvaal (2009)[16] has analyzed the truncation error of the FCI method with the harmonicoscillator basis in energy cut spaces and with Coulomb particle- particle interactions. A

32

Page 33: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

R dim(MR)

1 12 643 14904 164515 1151486 5941187 24599108 86210289 2650284110 7329389011 18574136012 43740845513 96763355614 202818874815 405586425616 778204291217 1439379694118 2576532984819 4478368427420 75798808967

Table 5.1: This table shows the dimension of “filtered” FCI spaces with differentR for a six particlequantum dot. By filtered we mean that only the physically relevant states with m = s = 0 areincluded. At R = 20, the dimensionality is already at the upper limit of what is possible to simulatewith FCI on high level supercomputing facilities. It is worth mentioning that the FCI energy atR = 19 shells with the harmonic oscillator basis is 20.17H∗, approximately 10mH∗ higher that thetrue ground state energy at approximately 20.16H∗. These results are listed in chapter .

parametrization of the approximate error of the energy as function of R is also derived.Without going into details, we will present Kvaals error estimate. Kvaal has shown that thefollowing relation holds for two dimensional systems

∆E(R) ≤ [1 + ν(R)]∞∑

r=R+1(NP + r) r

−c, (5.7)

where ∆E(R) is the error in the energy E(∞)−E(R) resulting from the basis truncation,c is a real constant, ν(R) is an unknown function with the property

ν(R) Ð→R→∞

0, (5.8)

and NP is the number of particles. Kvaal has analyzed the error in the energy cut basis,but his results will also apply to FCI energies calculated in the direct product basis. Thereason for this is that the direct product basis energies are bounded from below and aboveby energy cut energies since

PR ⊂ MR ⊂ PNPR. (5.9)

In other words, the direct product basis error will be somewhere in the range

[∆E(R),∆E(NPR)].

33

Page 34: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

The Hilbert spaces MR and PR is much closer in dimensionality than MR and PNPR. Wewill therefore assume that we can use the same error formula for the spaces MR and PR.As we will see later, this formula seems to hold very well for the systems we are studying.

We will also assume that ν(R) is negligible and rewrite Eq. (5.7) on the form

∆E ≈ b∞∑

r=R+1(NP + r) r

−c, b ∈ R. (5.10)

This assumption is justified by Kvaal’s [16] results. He has performed FCI calculations ontwo dimensional quantum dots in the energy cut basis with 3,4 and 5 particles, and for thesesystems ν(R) is shown to be small. Also, since PR ⊂ MR, we expect ν(R) to decay evenfaster in the direct product basis.

5.3 Extrapolation Formulas

We have used Eq. (5.10) to parametrize the energy as a function of the number of shells.

E(R) ≈ a − bR

∑r=1

(NP + r)r−∣c∣, (5.11)

where a, b, c are real constants. This formula has an error ∼ E(R)ν(R), and consequentlyit will become more accurate as R increases and ν(R) becomes small. This means that weshould avoid extrapolations with energies ⟨PRHPR⟩ for small R.

We also want to find the extrapolated energy at R →∞ given that we know the optimalvalues of a, b, c. We notice that E(∞) can be written in terms of the Riemann zeta functionζ(c) such that

limR→∞

E(R) ≈ a − b[NP ζ(c) + ζ(c − 1)], (5.12)

where ζ(c) = ∑∞r=1 r−c, which is known to converge for all c > 1.

34

Page 35: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 6

Projector Monte Carlo Methods

6.1 Introduction

The projector Monte Carlo (PMC) Methods includes a range of methods which are tailoredto calculate properties of low energy states of quantum mechanical systems, and includesalgorithms like Diffusion Monte Carlo (DMC), Green’s Function Monte Carlo and the re-cently developed Full Configuration Interaction Quantum Monte Carlo (FCIQMC). Thesemethods are all based on the same theoretical foundation, namely that the so called projec-tion operator Pt, will project out the lowest energy state in the Hilbert space. The projectionoperator is defined as

Pt = e−t(H−S), S ∈ R, (6.1)

where S is a real shift of the energy which we will soon come back to, and the projectedstate is

∣Ψ(t)⟩ = Pt∣Ψ0⟩. (6.2)

Assumed that the initial state ∣Ψ0⟩ has a nonzero overlap with the ground state, the largetime ∣Ψ(t)⟩ will be proportional to the ground state. To see why this is so we consider thegeneral wave function

∣Ψ⟩ =∑i

ci∣ψi⟩, (6.3)

where {∣ψi⟩} is the eigenfunctions of the Hamiltonian H with the corresponding eigenval-ues {Ei}. The projected state can now be written

∣Ψ(t)⟩ = Pt∣Ψ⟩ =∑i

ci∣ψi⟩e−t(Ei−s). (6.4)

The vector ci∣ψi⟩e−t(Ei−S) will decay to zero if Ei > S, will be constant if Ei = S and willincrease exponentially if Ei < S. In the case that S = E0 and the overlap between the initialstate and the ground state c0 is nonzero, it is evident that

limt→∞

Pt∣Ψ⟩ = limt→∞∑i

e−(Ei−S)tci∣ψi⟩→ c0∣ψ0⟩. (6.5)

35

Page 36: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Also note that in the case of a S ≠ ε0, the ground state will still dominate since the groundstate always has the greatest exponent. The basic idea of PMC algorithms is to solve theabove equation by expressing the ground state as Markov chain, and to find the steady statesolution iteratively. This can be done by noting that

Pnτ = e−(H−S)nτ

= (Pτ)n, (6.6)

where τ is a small time step and n is a positive integer. By repeatedly multiplying with theoperator Pτ we arrive at the large t solution

limn→∞

(Pτ)n∣Ψ⟩→ ∣ψ0⟩. (6.7)

From this equation we see that we can express the time evolution of the projected state as aMarkov chain

∣Ψ(n+1)⟩← Pτ ∣Ψ

(n)⟩, where lim

n→∞∣Ψ(n)

⟩→ k∣ψ0⟩, k ∈ C. (6.8)

where the steady state solution is the ground state. This equation is the starting point forall PMC algorithms. In general, the different PMC algorithms utilize different methodsto approximate the projection operator. For example in FCIQMC, the projection operatoris approximated as a first order Taylor expansion, while in DMC it is approximated as aGreen’s function.

We will look closer at two Projector Monte Carlo algorithms, namely DMC and FCIQMC.We will first look at DMC and discuss some of the advantages and shortcomings of this al-gorithm. This will also serve as an introduction to the next part where we give a thoroughpresentation of the FCIQMC algorithm.

6.2 Diffusion Monte Carlo

In this section we will explain the basics of the DMC algorithm and also discuss the maindifficulties and sources of error.

6.2.1 The projection operator and the short time approximation

DMC finds the projected state by solving the integral

Ψ(R, t) = ∫ G(R,R′, t)Ψ(R′)dR′, (6.9)

where G is the Green’s function

G(R,R′, t) = ⟨R∣e−t(H−S)∣R′⟩ =∑

i

e−t(Ei−S)ψi(R′)ψ∗i (R), Ψ(R) = ⟨R∣Ψ⟩. (6.10)

Because the eigenfunctions ∣ψi⟩ are orthogonal

∫ ψi(R)ψ∗j (R)dR = ⟨ψi∣ψj⟩ = δij , (6.11)

it is straight forward to show that

∫ G(R,R′, t)Ψ(R)dR′=∑

i

ciψi(R)e−t(εi−S), (6.12)

36

Page 37: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

which is the definition of the projected state in Eq. (6.4).This integral can be sampled directly using Monte Carlo techniques, but this has proven

to be an inefficient approach, mainly because the Green’s function contains singularitiesthat makes the simulations very unstable [10]. It is known to be a more efficient approachto use a modified Green’s function and to solve the integral

f(R, t) = ∫ G(R,R′, t)f(R′,0)dR′, (6.13)

where

f(R, t) = ΨT (R)Ψ(R, t), (6.14)

G(R,R′, t) = ΨT (R)G(R,R′, t)1

ΨT (R′). (6.15)

The trial wave function ΨT must be chosen as a wave function which closely resembles theground state for this approach to be efficient. As we see, Ψ(R, t) has exactly the same timedependency as before.

By assuming that the Green’s function is constant during a time interval τ , it can beshown that it can be written on the form [39]

G(R1,R2, τ) =Me−12τ

∣R2−R1− 12

F(R1)∣2

e−τ[EL(R2)+EL(R1)

2−S]

+O(τ2). (6.16)

whereM is a normalization factor. This is known as the short time approximation and is,as we will discuss later, one of two main sources of numerical error. The first factor in eq.(6.16) is a Gaussian distribution

N (R2,R1, τ) = e− 1

2τ∣R2−R1− 1

2F(R1)∣

2

, (6.17)

where F is the so called quantum force

F(R) = 2∇ΨT (R)

ΨT (R). (6.18)

The second factor is the so called the weight function

W(R2,R1, τ) = e−τ[EL(R2)+EL(R1)

2−ET ], (6.19)

where EL is the local energy

EL(R) =HΨ(R)

Ψ(R). (6.20)

The trial wave function is constructed such that EL has no singularities, typically by in-troducing the so called Jastrow factor, since this reduces the numerical instabilities of theDMC algorithm.

37

Page 38: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

6.2.2 The Diffusion Monte Carlo Algorithm

In DMC, the function f(R, t) is represented as a distribution of walkers with the coordinates{Ri}

N

i=1, such that

f(R, t) ≈ ∫ dR1

N

N

∑i=1δ(R −Ri

), (6.21)

which is only exact in the limit N → ∞. The walkers follow a set of dynamical ruleswhich are derived from Eqs. (6.16), (6.13), and will converge to a distribution which isproportional to ΨT (R)ψ0(R). We will now summarize the DMC algorithm in a few stepsto illustrate how it works.

(i): First, the initial distribution is chosen to be f(R,0) = ∣Ψ(R)∣2, which should beclose to the ground state. Such distributions are typically obtained using variationaltechniques like Variational Monte Carlo [10]. A number of N samples (or walkers){Ri

0}N

i=1 are drawn from this distribution.

(ii): During a single time step, f evolves according to the equation

f(R, τ(n + 1)) = ∫ dR′G(R,R′, τ)f(R′, τn)

= ∫ dR′N (R,R′, τ)W(R,R′, τ)f(R′, τn). (6.22)

In the limit of a large number of walkers, f(R, τ(n+ 1)) is proportional to the distri-bution

{W(Rin+1,R

in, τ)}

N

i=1 , (6.23)

where Rin+1 is sampled from the probability distributionN (R,Ri

n). Instead of storingthe weightsW each walker is either cloned or removed from the simulation accordingto the branching rule:

• Calculate the number Mi = floor(W(Rin+1,R

in, τ) + (U − 1/2)) where U is a

random uniform between 0 and 1.

• If Mi = 0 the i’th walker is removed from the simulation. If M > 1, M − 1 newwalkers are added to the simulation in the same coordinate as the i’th walker.

In the limit of a large number of walkers, this yields the correct results since

⟨floor(a + (U − 1/2)⟩ = a, (6.24)

for any number a.

(iii): The shift S should be equal to E0 to project out the ground state. But since E0 isunknown S is adjusted to stabilize the population of walkers. From Eq. (6.4) wesee that a large S results in a population growth and vice versa, and that the S thatkeeps the number of walkers constant is the ground state energy. For this purpose itis common to use an equation on the form [10]

S ← S −k

τlog(

NW

NP), (6.25)

38

Page 39: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

where NW is the current number of walkers, NP is the desired number of walkersand k is some real number which should be chosen such that the fluctuations of S areminimized.

(iv): Steps (ii), (iii) are repeated a number of times to thermalize the distribution. Afterthis step, the distribution should be ΨT (R)ψ0(R).

(v): When the thermalization is finished, one starts collecting observables. As an example,the energy can be found by taking the average of the shift S during a simulation.

(vi): Steps (ii), (iii) and (v) are repeated until a sufficient number of samples are collected.

There are many details and possible optimizations that are left out here, but a thoroughdiscussion of this algorithm can be found in Res. [39].

6.2.3 Systematic errors

DMC is subject to a time step error which stems from the short time approximation of theGreen’s function, but this problem can often be overcome by extrapolating the results to thelimit τ → 0. More severe is the so called sign problem, which is the main difficulty of DMCand PMC methods in general, and which is connected to the antisymmetry of fermionicwave functions. As we remember, fermionic wave functions with identical particles mustbe antisymmetric with regard to the exchange of two particles, which means that such wavefunctions has regions of both negative and positive sign. These regions are separated bythe nodal surfaces where ψ0 = 0 and changes its sign (has a nonzero gradient). In fact,the product f = ΨTψ0 should be negative in the regions where ΨT and ψ0 have differentsigns. From our interpretation of f as a distribution of walkers, it is restricted to be positiveeverywhere, meaning that our algorithm only can be exact in the case where ΨT and ψ0

have exactly the same nodal surfaces or ψ0 is positive everywhere (bosonic systems).The first to propose a method to deal with the sign problem was Anderson (1975) [1]

who setW = 0 (removing the walker) for any step crossing a node of the trial wave function,thus imposing the nodal surfaces of the trial function. By using the fixed node approxima-tion, the assumption is made that ΨT has the same nodes as ψ0. This is the only fundamentalassumption made in the theory behind DMC, and if the exact nodes ψ0 where known, DMCwould in principle be exact for systems of identical fermions.

The fixed node approximation is shown to produce energies that are higher than theground state [27], thus the method is variational. However, since there are no system-atic methods of improving the nodes, the method is not systematically improvable and thismeans that it is difficult to control the fixed node error.

39

Page 40: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 7

The Hartree-Fock method

7.1 Overview

The Hartree- Fock (HF) method [12], is an approximate method to solve the Schrödingerequation, and can be seen as a mean field approximation where the interactions betweenthe particles are replaced by an averaged interaction. The result is that the many particleproblem is effectively reduced to a single particle problem where each particle only seesthe mean field. The HF method is numerically cheap, but since the method includes onlyselected correlations, it does in general provide less accurate results than FCI or the DMC.

Formally, the HF ansatz assumes that the wave function can be written as a single de-terminant

∣ΨHF ⟩ = ∣ϕ1, . . . , ϕNP ⟩, (7.1)

where NP is the number of particles in the system. The HF determinant ∣ΨHF ⟩ is thedeterminant that solves the equation

EHF = min [⟨ΨHF ∣H ∣ΨHF ⟩] . (7.2)

According to the variational principle, this is the single determinant with the energy that isclosest to the ground state energy. In practice, the HF determinant can be found by varyingthe single particle basis {ϕj}

Mi=1

∣ϕi⟩ =∑j

Cij ∣ϕj⟩, (7.3)

where the basis {ϕj}Mi=1 that solves Eq. (7.2) is the so called HF basis, and Cij is unitary in

the sense that

∑j

C∗ijCjk = 1. (7.4)

Note that unitarity assures that expectation values and the normalization of the wave func-tion are conserved.

The reason why we are interested in the HF method is that it can be used to optimize thesingle particle basis. The HF basis yields a better starting point for other numerical methodscompared with the harmonic oscillator basis. The HF basis is routinely used together withDiffusion Monte Carlo [22], Coupled Cluster Theory [24], Full Configuration InteractionQuantum Monte Carlo [3] as well as other numerical many body methods.

40

Page 41: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

7.2 The Roothaan-Hartree-Fock equations

In this section we will take a closer look at how the minimization of the single determinantenergy can be performed numerically. We will see that the most costly operation is thediagonalization of an M ×M matrix, where M is the number of single particle orbitals inthe basis. Note that M never becomes very large, and that even for simulations with 30shells, M does not exceed 103.

For a Hamiltonian on the form H = HHO + V , where HHO is an one-body operator andV is a two-body operator, it can be shown that the minimimization problem of Eq. (7.2) canbe written as an eigenvalue problem [30]

∑γ

HHFαγ Cκγ = ekCκα, (7.5)

HHFαγ = ⟨ϕα∣HHO ∣ϕγ⟩ +

NP

∑α=1∑βδ

C∗αβCαδ⟨ϕαϕβ ∣V ∣ϕγϕδ⟩AS , (7.6)

which can be expressed as a matrix equation

HHFC = Ce, (7.7)

where e is a diagonal matrix and C and HHF are matrices with elementsCij andHHFij . This

equation is a non linear eigenvalue problem that must be solved iteratively. The columnsof C and the diagonal elements of e are simply the eigenvectors and the eigenvalues of thematrix HHF , and can thus be found by diagonalizing HHF . However, HHF is dependenton the elements of C, and must be recalculated every time C is updated. This iterativeprocedure will converge to the self consistent solution when certain stability criteria arefulfilled. The convergence properties are discussed in Ref. [12].

41

Page 42: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Part III

Full Configuration InteractionQuantum Monte Carlo

42

Page 43: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Full Configuration Interaction Quantum Monte Carlo (FCIQMC) is an “ab ini-tio” method which is rooted in basic quantum mechanical principles withoutmaking any assumptions or approximations. The FCIQMC algorithm promisesto calculate the exact Full Configuration Interaction (FCI) value within a givenHilbert space, but usually at a much lower computational cost than FCI meth-ods. Similar to the approach used in DMC, the ground state is found by cal-culating the projected state Pt∣Ψ⟩, but the integration is not performed in thecoordinate space but in the discrete space of Slater determinants. Because ofthe inherent anti- symmetric properties of this basis, the infamous sign problemis not as severe for FCIQMC as for other projector methods. See for exampleRef. [13] for a thorough analysis of this subject.

The algorithm was first made famous by Booth et. al. (2009) [3]. They wereable to find the FCI values for different molucules in very large Hilbert spaces,like for example the NaH molecule with an FCI basis of more than 1012 deter-minants. Although these results are impressive and far out of the scope of FCI,the basic FCIQMC algorithm is limited due to the unfavourable scaling withincreased basis sizes. In 2010, an improvement to the algorithm was proposedby Cleland et. al. [4]. The improved algorithm, dubbed i-FCIQMC, made itpossible to do simulations with Hilbert spaces vastly larger than the originalalgorithm could handle. A series of articles have since then been publishedwhere the new method is applied to different systems, and produce what arebelieved to be nearly unbiased results. It is worth mentioning the article byShepherd et. al. (2012) [34], where ground state values of the homogenouselectron gas with a Hilbert space with 10108 determinants are calculated.

In the following chapters, we aim to give a thorough introduction to the FCIQMCalgorithm and the optimized algorithm i-FCIQMC.

43

Page 44: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 8

The FCIQMC algorithm

In this chapter will use the following notation. The general wave function is written as

∣Ψ⟩ =∑i

vi∣ψi⟩, (8.1)

where {vi} are complex coefficients and {ψi} is the eigenfunctions of the Hamiltonianwith the corresponding eigenvalues {Ei}. The ground state is expanded in the determinants{∣Di⟩}, which is constructed from the spin orbitals {ϕi}.

ψ0 =∑i

Ci∣Di⟩, (8.2)

the CI coefficients of the ground state wave function satisfy the stationary Schrödingerequation in terms of the eigenvalue problem

∑j

⟨Di∣H ∣Dj⟩Cj = E0Ci, (8.3)

where E0 is the lowest eigenvalue of H on the FCI basis.

8.1 The mathematical approach

From the last chapter we remember that the projected state can be found by iterating overthe equation

∣Ψ(n)⟩← Pτ ∣Ψ

(n)⟩, (8.4)

where limn→∞ ∣Ψ(n)⟩ is proportional to the ground state ∣ψ0⟩ if the overlap ⟨Ψ(0)∣ψ0⟩ isdifferent from zero and the energy shift S of the projection operator Pτ = e−τ(H−S) is equalto the ground state value E0. Our first aim is to formulate this equation in the FCI basis andin terms of the coefficients Ci. The projection operator is approximated as the first orderTaylor expansion

Pτ = 1 − (H − S)τ +O([H − S]2τ2). (8.5)

We now apply this operator on the initial state expressed on the FCI basis

∣Ψ(n)⟩→∑

i

C(n)i ∣Di⟩, (8.6)

44

Page 45: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

and end up with the expression

∑i

C(n+1)i ∣Di⟩ ≈ (1 − (H − S)τ)∑

i

C(n)i ∣Di⟩ (8.7)

C(n+1)i ≈ C

(n)i −∑

j

(Hij − ∂ijS)τC(n)j

= C(n)i − (Hii − S)τC

(n)i −∑

j≠iHijτC

(n)j . (8.8)

Here we have used Hij = ⟨Di∣H ∣Dj⟩. We will from now on omit the index n in ourequations.

A DMC inspired approach is used to find the steady state solution of Eq. (8.8). Thecoefficients {Ci} are represented by a population of NW walkers α which are distributedon the determinants Diα and with a sign sα = ±. The amplitude Ci is then defined to be

Ci ∝ ni =∑α

sαδiiα , (8.9)

which is a signed sum where two walkers of opposite signs on the same determinant willmake zero contribution, and the number of walkers is

NW =∑i

∣ni∣. (8.10)

Similar to DMC, we define a set of dynamical rules of such a nature that the walkers con-verge to a distribution ⟨ni⟩∝ Ci. These dynamical rules are derived from the two last termsof the right hand side of Eq. (8.8) which describes the rate of which Ci changes. The firstof these therms is

pd(i∣i) = τ(Hii − S), (8.11)

where S is the real shift from the projection operator and τ is the timestep. This term rep-resents the rate of which Ci is projected on it self. Numerically it represents the probabilityfor a walker to either be copied (cloned) or to be removed from the simulation (killed). Ifpd(i∣i) < 0 the walker is cloned with probability ∣pd(i∣i)∣ and if pd(i∣i) > 0 the walker iskilled with the probability pd(i∣i). The second term is

pd(i∣j) = τHij , i ≠ j, (8.12)

which is the rate of which otherCj≠i is projected ontoCi. We say that pd(i∣j) represents theprobability that a walker on ∣Dj⟩ (the parent) spawns a walker on ∣Di⟩ (the child). Note thatthe newly spawned walkers can have both a positive and a negative sign. From Eq. (8.8)we see that the child must have the opposite sign of its parent if pd(i∣j) is negative, and thesign same if pd(i∣j) is positive. If two walkers with the opposite sign happen to populatethe same determinant ∣Di⟩, these walkers add zero to the amplitude Ci, and both walkerscan therefore be removed from the simulation.

The sums over all elements τHij involve O(dim(H ) × Nw) operations since thespawning probabilities from all walkers to all determinants must be evaluated. This is a

45

Page 46: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

numerically expensive task since both dim(H ) and Nw can be very big, and for large sim-ulations we often have that dim(H ) ≥ 1010 and NW ≥ 107. According to Booth et. al. [3]it is numerically more efficient to sample the sum

∑j∑i≠jτHijCj →∑

j

τHsjCj/pgen(s∣j), where ∑s

pgen(s∣j) = 1, (8.13)

reducing the number of operations to O(Nw) for each iteration. Even though the numberof iterations before convergence will increase, the cost of each iteration will become somuch cheaper that the overall numerical efficiency is improved. In Eq. (8.13) pgen(s∣j) isthe suggestion probability of s from j, and this equation is only correct when pgen(s∣j) isdifferent from zero for all connected determinants ∣Dj⟩ and ∣Ds⟩

pgen(s∣j) ≠ 0 ∀ ⟨Dj ∣H ∣Ds⟩ ≠ 0. (8.14)

In principle, there is no other constraint on pgen(s∣j), and as long as the number of iterationsis large enough the simulations will eventually converge to the correct results, but in practicecertain choices of suggestion probability distributions will lead to a more efficient sampling.We will return to this topic in a later chapter.

8.2 Population control and the statistical estimators

As in DMC, we do not know the shift S = E0 that gives the desired convergence to theground state distribution. The population of walkers will increase if the shift S is largerthan the ground state energy E0 and decrease if S is smaller than E0. We can thereforecontrol the population by varying S. We use the formula of Umrigar et. al. [39] which hasbeen used for population control in the context of DMC

S → S(i)= S(i−1)

−ξ

τlog

⎡⎢⎢⎢⎢⎣

N(i)W

N(i−1)W

⎤⎥⎥⎥⎥⎦

, (8.15)

where ξ is a real number of which the optimal value must be found by experiment, andN (i)W

and S(i) are the population and shift at the time iτ . According to Eq. (6.5), the shift S thatstabilizes the number of walkers is the ground state energy, and this means that the aboveequation provides us with a measure of the ground state energy E0.

We use two different statistical estimators to calculate the energy. The first is the onethat we just mentioned, which can be taken as the long time average of the shift

E0 ≈ ⟨S⟩ = (1/N)N

∑i=1S(i), (8.16)

and which we will refer to as the generational estimator of the energy. The second is theprojected estimator that is calculated by sampling the projected energy

E0 =⟨D0∣H ∣ψ0⟩

⟨D0∣ψ0⟩=

⟨D0∣H∑iCi∣Di⟩

⟨D0∣∑iCi∣Di⟩. (8.17)

46

Page 47: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

We rewrite the operator on the form

E0 ≈⟨EP ⟩ =H00 +∑i≠0H0i⟨ni⟩/⟨n0⟩, (8.18)

which means that we need to sample n0 and ∑i niH0i each iteration. These estimators arestatistical measures, and there will always be a certain statistical error associated with them.In a later chapters we will discuss how the statistical errors can be calculated. It is also worthcommenting that these two estimators, as we will see, to a large degree are uncorrelated andtherefore supplement each other in a valuable way.

8.3 The FCIQMC algorithm and simulation procedures

The first step of a simulation is always to initialize a population of walkers. Before we startcollecting statistical samples, the population must be brought to the steady state distribu-tion of Eq. (8.4), which can be done by following a simple procedure which we will nowdescribe. First, we start with one walker on the Fermi determinant ∣D0⟩, and a shift that islarger than E0 to increase the spawning probability and obtain a rapid population growth.When NW has reached a predetermined value, we start varying the shift S according to Eq.(8.16) to keep the population constant. After the population has reached the desired numberof walkers, the simulation still have to run for a while to assure that the population is prop-erly thermalized. The thermalization phase is assumed to be finished when the fluctuationsof the instantaneous values of the projected energy and the shift are stabilized around someenergy.

For each iteration of the simulation, the following five steps are performed:

1. (Die/clone/spawn): Each walker lives permanently on the slater determinant where itwas spawned. Cycle over all walkers i and do:

a. Attempt to kill or clone the walker. First pd(i∣i) = τ(Hii − S) is calculated. Ifpd(i∣i) < 0 the walker is killed with probability ∣pd(i∣i)∣ and if pd(i∣i) ≥ 0 thewalker is cloned with probability pd(i∣i).

b. Attempt to spawn a new walker on a connected determinant ∣Dj⟩ with the prob-ability τ ∣Hji/pgen(j∣i) where pgen(j∣i) is the generation probability of i from j.The child has the same sign as its parent if Ps is positive and the opposite signotherwise.

2. (Annihilate): Annihilate pairs of walkers of opposite sign that lives on the same de-terminant.

3. (Update S): Two possible strategies: 1) In constant shift (S) mode, do nothing, 2) inconstant population (Nw) mode, adjust S to keep Nw constant.

4. (Sample statistical estimators): Store samples to calculate the energy. We need tostore the shifts S(i) to calculate the generational estimator, and n(i)

0 and∑i niH(i)0i to

calculate the projected energy.

5. (Additional rule): The efficiency of the algorithm can be improved considerably if ad-ditional rules for the walker dynamics are implemented. The most used optimizationof the algorithm, i-FCIQMC, will be discuss in Chapter 9.

47

Page 48: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

This algorithm is also illustrated in the flowchart in Fig. 8.1.

8.4 Convergence criteria and the time step error

The projection operator Pτ will always project out the ground state regardless of the size ofthe time step τ , but this is not the case when the projection operator is approximated as thefirst order Taylor expansion

Pτ = e−(H−S)τ

≈ 1 − (H − S)τ. (8.19)

To analyze the convergence criteria we can equally well view the Taylor expansion as ournew projection operator instead of analyzing the truncation error. The stationary states ∣ψi⟩are eigenstates of the projection operator as well as its first order Taylor expansion, and theeigenvalue equations are

[1 − (H − S)τ]∣ψi⟩ = [1 − (Ei − S)τ]∣ψi⟩. (8.20)

Recall that FCIQMC will project out the state

[1 − (H − S)τ]n∣D0⟩ =∑i

[1 − (H − S)τ]nvi∣ψi⟩

=∑i

[1 − (Ei − S)τ]nvi∣ψi⟩, S ≈ E0,∑

i

∣vi∣2= 1, (8.21)

which will converge to the ground state only in the case that the absolute values ∣1 − (Ei −S)τ ∣ are smaller than one for all i > 0. This sets the upper bound for the time step

τ < τm = 2/(Em − S), Em = max ⟨ψi∣H ∣ψi⟩, (8.22)

where Em is bounded in our truncated FCI spaces. Since we do not know the value of theexcited energies we can not compute τm. But in general we can conclude that τm decreaseswhen Em increases, as for example when we increase the number of particles, the numberof shells or the interaction strength. In our simulations, we have used a timestep τ = 10−3

or smaller, which means that Em in practice can be larger than 2 × 103H∗, which is greaterthan the most excited energies Em in any of the FCI spaces that we have used.

Note that there is no time step error, and as long as the time step is smaller than τm, thesimulations will converge to the exact ground state. This is a consequence of the fact thatthe projected estimator and its first order Taylor expansion have the same eigenstates.

8.5 The FCIQMC sign problem

Walker annihilation is a necessary ingredient of the FCIQMC algorithm, and as we willshow, if we had turned off the annihilation the simulations would not converge to the groundstate. Thus, when the number of walkers is “small” and the density of walkers becomes toolow for efficient annihilation, the simulations will no longer yield the correct results. Notethat this problem does not occur in DMC where most system can be sampled using a smallnumber of walkers. The reason is that the walkers do not carry a sign as in FCIQMC,but instead the sign structure of the wave function is forced by applying the fixed node

48

Page 49: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Figure 8.1: Flowchart that illustrates the basic FCIQMC algorithm.

49

Page 50: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

approximation. To explain the mechanisms behind the FCIQMC sign problem, we take acloser look at what would happen if we turned off annihilation. This will also provide anexplanation of why the simulations do not converge to the ground state when the number ofdeterminants is too low. To analyze this situation we will follow the derivation of Spenceret. al. [36].

Assume that n+i and n−i represents the positive and the negative population of walkerson the determinant ∣Di⟩. We define the “transition matrix”

Tij = −(Hij − δijS) = T+ij − T

−ij , (8.23)

where T+ij = max (Tij ,0) and T−ij = ∣min (Tij ,0)∣. From Eq. (8.8) we see that after oneiteration, the distributions will change from n+ to n+i +∆n+i and from n− to n−i +∆n−i where

∆n+i = τ∑j

[T+ijn+j + T

−ijn

−j ] , (8.24)

∆n−i = τ∑j

[T+ijn−j + T

−ijn

+j ] . (8.25)

We rearrange these equations on the form

∆n+i +∆n−i = τ∑j

[T+ij + T−ij] [n

+j + n

−j ] , (8.26)

∆n+i −∆n−i = τ∑j

[T+ij − T−ij] [n

+j − n

−j ] , (8.27)

which tells us how the distributions n+i +n−i and n+i −n

−i will evolve. Here n+i ±n

−i represents

the distribution without annihilation (+) and with annihilation (−). The steady state solutionsare the eigenstates of the operators

P +ij = 1 + τ∑

j

[T+ij + T−ij] , (8.28)

P −ij = 1 + τ∑

j

[T+ij − T−ij] , (8.29)

with the corresponding eigenvalues e+ and e−, and it can be shown that e+ ≥ e− (See Ref.[36] for the proof). Thus, if we turn off annihilation, n+ + n− will become exponentiallylarger than n+−n−. It is in principle still possible to find n+−n− by subtracting the negativepopulation n− from the positive population n+, but in practice n+ − n− will be lost due tostatistical noise. Note that P −

ij is simply the first order Taylor expansion of the projectionoperator which means that n+ − n− is the ground state distribution.

We have now demonstrated that the sign problem in FCIQMC stems from the emer-gence of the dominant eigenstate of the operator P +, while the desired state is the dominanteigenstate of the operator P −. In a simulation, the growth rate of these eigenstates will beproportional to the corresponding eigenvalues e+ and e−.

According to Spencer et. al. , if e+ is much larger than e−, a large concentration of walk-ers is typically necessary to achieve a high enough rate of annihilation events. Such systemsare said to have a severe sign problem, and are not easily simulated with the FCIQMC al-gorithm. They also comment that it is difficult to predict the severity of the sign problemfor a specific system. A difficult system is not necessarily a highly correlated system, butthe sign problem rather depends on the structure and occurrence of negative elements in theHamiltonian matrix.

50

Page 51: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Figure 8.2: A typical evolution of the population size in a simulation where S is kept constant at avalue that is slightly greater than the ground state. In the first phase of the simulation the populationis too small for efficient annihilation, and the population grows exponentially with a growth rate e+.When the population reaches a certain limit, annihilation events become more probable, and the staten+ − n− emerges. The population growth is still exponential, but with a lower growth rate e−, andthis can be observed as a plateau in the population size. If the plateau occurs at a large populationrelative to the dimension of the Hilbert space, the sign problem is severe.

51

Page 52: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 9

Initiator-FCIQMC

As we discussed in the last chapter, the number of walkers must be above a certain thresholdNC for the population to converge to the ground state distribution. This threshold is, as wewill see later, system dependent and often close to the number of determinants in the FCIspace. In practice this is the main limitation of FCIQMC since the numerical cost increaseas a function of the number of walkers.

Cleland et. al. (2010) [4] demonstrated that by introducing a set of new dynamicalrules for the walkers, the performance of the algorithm can be improved drastically whilestill obtaining results with a precision of 10−3 Hartree or better. The number of walkersthat is necessary in such simulations are typically several orders of magnitude smaller thanNC . The improved algorithm is called initiator-FCIQMC or i-FCIQMC, and is identicalto FCIQMC except that we use different rules to calculate the spawning probability. Inessence, only walkers that fulfill certain criteria are allowed to spawn on determinants whichare previously unpopulated, and such walkers are called initiators.

First, a so called initiator space is defined. This is a set of determinants which areassumed to have a relatively large average population (large ampiludes ∣Ci∣). All walkersthat live on a determinant in the initiator space become initiators, and initiators follows thesame rules as walkers in the basic FCIQMC algorithm. The first rule of i-FCIQMC concernsthe non-initiators and states:

● (Spawning rule I): Non-initiators are only allowed to spawn on determinants that arepreviously populated.

With this rule the Hilbert space is in effect reduced to the states in the initiator space andthe single and double excitations of these. Next, two additional rules are added to improvethe energy and to give the walkers access to the entire FCI space:

● (Dynamic enlargement of the initiator space): All determinants ∣Di⟩ with a population∣ni∣ > NI are automatically included in the initiator space for as long the population isabove this limit. Here ni is the signed population of ∣Di⟩ and Ni is a positive integer thatwe will refer to as the initiator threshold. The initiator threshold is set before a simulation.Note that with NI = 1 i-FCIQMC is identical to FCIQMC.

● (Spawning rule II): If the absolute value of sum of all walkers that are spawned on anunpopulated determinant by non- initiators is larger than two, then the spawning event isaccepted.

52

Page 53: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Although the initiator adaption of the algorithm has been shown to increase the efficiency,it is only correct according to Eq. (8.8) in the limit of a large number of of walkers. In thiscase the initiator space will grow to include the entire FCI space, and i-FCIQMC will tendto FCIQMC. This means that the i-FCIQMC energies are systematically improvable andthat the so called initiator error will decay to zero when the number of walkers is increased.

9.1 The initiator spaces

The initiator spaces are defined using a so called Complete Active Space (CAS) criterion,which is often used within quantum chemistry together with methods like many-body per-tubation theory or the configuration interaction method to pick out physically relevant statesof a Hilbert space [12]. The CAS is defined by specifying two set of orbitals, the frozen andthe active orbitals. The CAS is the set of determinants where:

(i): The frozen orbitals are doubly occupied (by both a spin up and a spin down electron).

(ii): The rest of the electrons are occupying one of the active orbitals.

In our simulations, the frozen orbitals are chosen to be the lowest lying orbitals in the NF

first shells and the active space consists of all orbitals in the NA first shells. Here NF andNA are preset parameters which defines the CAS. See Fig 9.1 for an illustration.

Because of the dynamic enlargement of the initiator space, the final result will be thesame regardles of which CAS we choose. But, as Cleland et. al. [4] has demonstrated, anappropriate CAS might sometimes improve the convergence.

53

Page 54: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Figure 9.1: These figures are schematic representations of the three determinants ∣DA⟩, ∣DB⟩ and∣DC⟩ of a four particle system. Here R is the shell number and m is the magnetic quantum number.The vertical lines represents an orbital that can be occupied by a spin up (↑) and a spin down (↓)electron. The CAS is defined by the frozen orbitals which are the two spinorbitals with the lowestenergy, and the active orbitals which are all states in the second, third and fourth shell. The determi-nant ∣DA⟩ is in the CAS since both of the frozen spin orbitals are occupied. The determinant ∣DB⟩

is not in the CAS space since there are one electron which is occupying an orbital which is neitheran active orbital or a frozen orbital. The determinant ∣DC⟩ is not in the CAS since only one of thefrozen orbitals are occupied.

54

Page 55: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 10

Sampling rules

10.1 The suggestion probability distribution

Recall that earlier in this part we introduced the suggestion probability pgen(i∣j) which isthe probability of sampling (trying to spawn a walker on) the determinant ∣Di⟩ from thedeterminant ∣Dj⟩. Before we can implement the algorithm it is necessary to find a “smart”suggestion probability, and there are two main factors that should be considered.

(i): From a sampling perspective, there exist certain suggestion probabilities that are morefavourable than others. For example, using a pgen where the most physically relevantstates have a larger probability of being sampled is expected to lead to a faster con-vergence in terms of the number of iterations. This method is commonly referred toas importance sampling [10].

(ii): We must find a pgen(i∣j) that can be sampled with a low numerical cost. As anexample of the opposite, assume that we want to use a pgen(i∣j) where all connecteddeterminants ∣Di⟩ (⟨Di∣Dj⟩ ≠ 0) have an uniform probability. This might be efficientfrom a sampling perspective but not from a numerical perspective. The reason is thatwe would have to explicitly find all connected determinants which is a numericallyexpensive operation.

We have used a strategy that was introduced by Booth et. al. (2009) [3], where the sugges-tion probability distribution has the form

pgen(i∣j) =

⎧⎪⎪⎪⎪⎪⎪⎪⎪⎨⎪⎪⎪⎪⎪⎪⎪⎪⎩

ps ×Aj(pk), for ∣Di⟩ = (−)pa†pak∣Di⟩, p ≠ q,

(1 − ps) ×Bj(pqkl), for ∣Di⟩ = (−)pa†pa

†qalak∣Dj⟩, {k, l} ∩ {p, q} = 0,

0, otherwise.(10.1)

Here ps is a predetermined probability which represents the probability of a single excitationversus a double excitation, and Aj(pk) and Bj(pqkl) are probability distributions whichwe will look closer at in the next section. Only single and double excitations are includedhere since all pairs of unconnected determinants corresponds to a spawning probabilitypd(i∣j)∝Hij = 0. The sampling will be correct regardless of the choice of ps, but optimally

55

Page 56: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

it should reflect the “true” probability of a single excitation. Since the single excitations aremore probable than the double excitations, it is natural to choose a ps that is close to one,but a bad choice of ps would, at least in principle, only lead to a less efficient samplingand a slower convergence. The distributions Aj(pk) and Bj(pqkl) are chosen such thatthey are numerically cheap to sample. But the resulting suggestion probability distributionpgen(i∣j) is not based on any sampling considerations and will probably not give the fastestconvergence in terms of the number of iterations.

10.2 Sampling of the suggestion probabilities

We will now discuss the distributions Aj(pk) and Bj(pqkl) and show how they can besampled in an efficient manner. In the case of a single excitation, one occupied orbital ϕkis chosen with the uniform probability Ai(k) = 1/NP , and a new orbital ϕp is then pickedrandomly from the set

S0 = {ϕp ; a†pak∣Di⟩ ∈ H , p ≠ k} . (10.2)

The conditional probability of drawing p is Aj(p∣k) = 1/size(S0) and the total probabilitybecomes

Aj(pk) = Aj(p∣k)Ai(k) = [NP × size(S0)]−1. (10.3)

In the case of a double excitation, two random occupied orbitals ϕk, ϕl are chosen withthe uniform probability

Bj(kl) = (NP

2)

−1=

2

[NP (NP − 1)](10.4)

We now need to consider if there are any constants on which q we can pick. We must findthe subset S1 of orbitals that fulfills these constraints and pick a random orbital ϕq ∈ S1with the probability

Bj(q∣kl) = 1/size(S1). (10.5)

The next step is to follow the same procedure for p. We find the subset S2 of orbitals thatfulfills our constraints given that ϕq is already picked, and pick a random ϕp ∈ S2 with theprobability

Bj(p∣qkl) = 1/size(S2). (10.6)

Since the probability of drawing the pair (p, q) in general is dependent of which order theyare picked, we must explicitly calculate the probability of drawing p, q in the reverse order.We follow the same procedure as above and find

Bj(p∣kl) = 1/size(S3), (10.7)

Bj(q∣pkl) = 1/size(S4). (10.8)

The total probability becomes

Bj(pqkl) = Bj(kl)(Bj(q∣pkl)Bj(p∣kl) +Bj(p∣qkl)Bj(q∣kl)). (10.9)

56

Page 57: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

10.3 Finding the sets SnAs many criteria as possible should be set to reduce the number of elements in the setsSn. We must only make sure that pgen(i∣j) ≠ 0 when the spawning probability pd(i∣j) ≠ 0,otherwise the sampling will be erroneous. If pgen ≠ 0 and pd(i∣j) = 0 the spawning step willbe rejected, and the sampling will be less than optimal but will still give the correct result.For two dimensional quantum dots, the following quantities are conserved in an interaction

mp =mk, sp = sk (single excitation), (10.10)

mp +mq =mk +ml, sp + sq = sk + sl (double excitations) , (10.11)

where mi and si is the magnetic quantum number and the spin of the i’th orbital. We willuse these conservation rules and outline a simple procedure to find the sets Sn.

In the case of a single excitation, assume that we have annihilated an orbital ϕk, thenS0 is calculated

S+0 = {ϕi,mi =mk, si = sk}, (10.12)

S0 = S+0 /T , (10.13)

where T is the set of all occupied orbitals in ∣Dj⟩ and S+0 /T is the set S+0 where all elementswhich are in T are removed.

In the case of a double excitation, assume that we have drawn two occupied orbitalsϕk, ϕl with opposite spins. Then we have the restrictions that

If sk ≠ sl ⇒

∣mk +ml −mq ∣ ≤ R, (10.14)

where R is the absolute value of the largest m in our basis. The smallest and the largestallowed magnetic quantum number mMIN ,mMAX can be found

If sk ≠ sl ⇒,

mMIN = max(−R,mk +ml −R), (10.15)

mMAX = min(R,mk +ml +R). (10.16)

In the case where the two orbitals k, l have the same spins, it is possible to improve Eq.(10.14) slightly

if sk = sl,

⇒ ∣mk +ml −mp∣ < R, (10.17)

which gives

If sk = sl ⇒

mMIN = max(−R + 1,mk +ml −R), (10.18)

mMAX = min(R − 1,mk +ml +R). (10.19)

The set S1 is now defined as

S+1 = {ϕi;mi ∈ [mMIN ,mMAX], si ∈ {sk, sl}}, (10.20)

S1 = S+1 /T , (10.21)

57

Page 58: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

and the set S2 is defined as

S+2 = {ϕi,mi =mk +ml −mq, si = sk + sl − sq}, (10.22)

S2 = S+2 /{T , ϕq}. (10.23)

If either S1 = 0 or S2 = 0, the spawning event is rejected. The sets S3 and S4 are calculatedin the same way by interchanging p and q in the equations above.

Excited state: ∣nm⟩ Suggestion probability/(1 − ps) = B0(nm01)

∣ϕ2ϕ5⟩ 1/18∣ϕ3ϕ4⟩ 1/18∣ϕ6ϕ11⟩ 2/18∣ϕ7ϕ10⟩ 2/18∣ϕ8ϕ9⟩ 2/18∣ϕ12ϕ19⟩ 2/18∣ϕ13ϕ18⟩ 2/18∣ϕ14ϕ17⟩ 1/18∣ϕ15ϕ16⟩ 1/18∣ϕ2ϕ17⟩ 1/18∣ϕ3ϕ16⟩ 1/18∣ϕ4ϕ15⟩ 1/18∣ϕ5ϕ14⟩ 1/18

Table 10.1: Example of the suggestion probabilities of double excitations from the reference de-terminant ∣01⟩ which is described by the probability distribution B0(nm01) (see: Eq. (10.1)). Thesystem is a two particle quantum dot with four shells in the basis, and the spin orbitals ϕi are enu-merated as in Fig. 4.1. Only the states where the total spin and magnetic quantum number areconserved is included. The probabilitiesB0(nm01) are calculated using the rules of the last section.Note that the suggestion probability of a state has no connection to how physically important it is.

58

Page 59: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 11

Storing and accessing the Coulombmatrix elements

The Coulomb matrix elements (CME)

vijkl ≡ ⟨ϕiϕj ∣V ∣ϕkϕl⟩AS , (11.1)

must be available every time the spawning probability is calculated. It is therefore criticalfor the speed of the code to be able to access them quickly. Calculation of the CME on thefly is very inefficient. Storage of the CME in an array is much faster but it is not straightforward to find an efficient way of addressing and accessing them.

One way is to store all nonzero matrix elements in one array and the correspondingoccupations ijkl in a second array. The address of the matrix element can then be obtainedby finding the index of the corresponding occupations numbers in the occupations array.This method has the advantage that only the nonzero elements are stored and the drawbackthat all occupations must be stored as well and that a numerically expensive search must beperformed on the occupations array.

In this section we will show how it is possible to map each of the nonzero matrix ele-ments to a unique address. The advantages are that the expensive search and the storage ofthe occupations array is omitted.

11.1 Indexing scheme

In this section we will refer to the states ∣ϕiϕj⟩ as the spinless wave functions, meaning thatany of the coulomb matrix elements can have 16 different spin configurations. Only 6 ofthese are permitted, namely those where the total spin is conserved. In addition, the matrixelements are unchanged if the spin projection of the states is polarized, reducing the numberof unique elements to 3. We will enumerate the three allowed pairs of spin configurationsin the following way

ns(ijkl) = 0 if (si, sj , sk, sl) ∈ {(↑, ↓, ↓, ↑), (↓, ↑, ↑, ↓)}, (11.2)

ns(ijkl) = 1 if (si, sj , sk, sl) ∈ {(↑, ↓, ↑, ↓), (↓, ↑, ↓, ↑)}, (11.3)

ns(ijkl) = 2 if (si, sj , sk, sl) ∈ {(↑, ↑, ↑, ↑), (↓, ↓, ↓, ↓)}. (11.4)

59

Page 60: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

When we want to specify the spin configuration of the orbitals we will denote the matrixelement

vns(ijkl)ijkl . (11.5)

From the definition

vijkl = ∫ dxdyψ†i (x)ψ†

j(y) [ψl(y)ψk(x) − ψk(y)ψl(x)] , (11.6)

it is clear that

vijkl = vjilk = vklij = vlkji = −vjikl = −vijlk = −vklji = −vlkij . (11.7)

From the above symmetries we see that most matrix elements can be represented in multipleways. For numerical reasons we want to construct a set where each element is representedonly once. First we define the mapping f(ijkl) which is a reordering of the indices ijklwhere only three operations are allowed to permute the indices:

• Changing the positions of the two first indices with the two last.

• Interchanging the two first indices.

• Interchanging the two last indices.

The reordered indices must fulfill one of the three equations below:

Case I:

i ≤ j ≤ k ≤ l.

Case II:

i < j > k ≤ l where i < k.

Case III:

i < j > k < l where i = k, j ≤ l. (11.8)

It can be shown that

f(ijkl) = f(jilk) = f(klij) = f(lkji)

= f(jikl) = f(ijlk) = f(klji) = f(lkij), (11.9)

meaning that each unique element given the symmetries of Eq. (11.7) is represented exactlyonce in the set of vijkl∈F where F is the set of all possible combinations f(ijkl). We definep(ijkl) to be the number of permutations that are necessary to arrange the indices in thedesired order. Any matrix element can now be written

vijkl = (−1)p(ijkl)vns(f(ijkl))f(ijkl) , (11.10)

where we have included the spin configuration in the superscript.

60

Page 61: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

11.2 Mapping of the indices to a pointer

It is possible make a mapping of the indices (ijkl) to memory addresses in such a way thatnone of the matrix elements of Eq. (11.10) are represented more than once, and we willnow explain how this is done.

We store all elements with an address that is stored as (in C++ notation)

(*(P[n_S] + n_G)+n_I), (11.11)

where P is an array of double pointers 1 and n_S, n_G and n_I are non-negative integers.First n_S is calculated according to Eq. (11.2)-(11.4)

n_S← ns(ijkl). (11.12)

Next we find (i′j′k′l′) ← f(ijkl) according to Eq. (11.8)). The indices j′, k′, l′ (case I,IIof Eq. (11.8)) or j′, l′ (case III of Eq. (11.8) ) are mapped to the integer n_G, where the setof all possible n_G consists of all integers in an interval that start at 0. We will show howto find N_G later in this chapter.

Next we find nI which is the number of orbitals ϕm withm < i′ and a magnetic quantumnumber

mi′ =mk′ +ml′ −mj′ . (11.13)

Note that n_I can be all integers between 0 and j′ in case I, between 0 and k′ in case II andbetween 0 and l′ in case III .

Since both N_G and N_I always occupy all values in an interval beginning at 0, alladdresses of (11.11) corresponds to exactly one matrix element vns(f(ijkl))

f(ijkl) which meansthat this is a space efficient way of storing the CME.

11.3 Graphical representation of model spaces

The method of mapping the indices j, k, l or j, l to n_G is inspired by a method that isoutlined by Ref. [12], where it is demonstrated how one can map general determinants toan index. A short introduction to this method follows.

Assume a three particle state ∣n0n1n2⟩ where n0 < n1 < n2 and ni ∈ [0,5]. First wenote that all possible determinants can be represented by one path in Fig. 11.1. All pathsthat start in the upper left circle and end in the lower left circle, and follow the direction ofthe arrows through the circles, represents a determinant. The occupation number ni is equalto the value of n at the circle where one moves from the row marked (ni) to the next row,and the index can be found by summing the arrow weights (the number above the arrows)along the path. In this case it is easy to check that all paths corresponds to a unique indexand that n0 < n1 < n2. As an example, the determinant ∣124⟩ is represented by the pathmarked up by the double headed arrows in Fig. 11.1. The index of the path is found bysumming the arrow weights and as we see from the figure the index is 1 + 1 + 4 = 6.

We need two rules to construct the tables Fig. 11.1. First note that the circled numbersrepresents the total number of paths leading from the upper left circle. To find this number

1In C++ this array is declared as double*** P.

61

Page 62: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Case I:n n0 n1 n2

0 1

↡0↘

1 1 1

↓1� ↓

0↘

2 1 2 12↘ ↓

1� ↓

0↘

3 3 3 13↘ ↡

1↘ ↓

4 6 44� ↓

5 10

Figure 11.1: Each path that can be made by following the arrows from the upper left corner to thelower right corner represents a three particle state ∣n0n1n2⟩ where n0 < n1 < n2 and ni ∈ [0,5]. Theoccupation number ni is equal to the value of n at the circle where one moves from the row marked(ni) to the next row. Each such path can be mapped to an index, and these indices occupy all valuesin an interval that starts on zero. The index can be found by summing the numbers above the arrowsalong the path, and all paths corresponds to a unique index. For example, ∣124⟩ is represented by thepath marked up by the double headed arrows, and the index is 1 + 1 + 4 = 6.

one simply adds the numbers circles from which one can move to the given circle. Thenumbers above the arrows is the difference between the circled number at the start and atthe end of the arrow, and appears when one moves from one row to the next in the table.

In simulations, we would initialize the matrix of the arrow weights

MGRMS =⎛⎜⎝

0 0 01 1 12 3 4

⎞⎟⎠. (11.14)

The index of a determinant (path) ∣n0n1n2⟩ can then be calculated

MGRMS(n0,0) +MGRMS(n1 − 1,1) +MGRMS(n2 − 2,2). (11.15)

11.4 The arrow weight matrices

In our case we need to make tables and arrow weight matrices for the three cases of Eq.(11.8)

Case I: All paths j ≤ k ≤ l, i ≤ j are represented in the Fig. 11.2. The arrow weights aremarked as M I

i,j . By following the rules introduced in the last section, it is easy

62

Page 63: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

to verify that

M I0,i = 0, M I

0,i =MI0,i−1 + 1, (11.16)

M Ii,0 =M

Ii−1,0 +M

Ii,j−1 for i ≠ 0, j ≠ 0, (11.17)

NI =MIN0−1,0 +M

IN0−1,1 +M

IN0−1,2, (11.18)

where NI is the number of possible paths. The index N_G can be calculated bysumming the matrix elements

N_G =M Ij,0 +M

Ik,1 +M

Il,2. (11.19)

Case I:n j k l

0 1MI

0,0→

MI0,1→

MI0,2→

↓ ↓ ↓ ↓

1MI

1,0→

MI1,1→

MI1,2→

↓ ↓ ↓ ↓

2MI

2,0→

MI2,1→

MI2,2→

↓ ↓ ↓ ↓

⋮ ⋮ ⋮ ⋮

No − 1MIN0−1,1

→MINo−1,1→

MINo−1,2→ NI

Figure 11.2: All paths j ≤ k ≤ l, i ≤ j are represented here. See the explanation in the text.

Case II: Figure 11.3 contains all paths j > k ≤ l, i < k. The first row (n = 0) is emptysince i < k. In this case the arrow weight matrix can be constructed by using thefollowing rules:

M II0,i =M

II1,i = 0, (11.20)

M IIi,o = i −No − 1, for i > 1, (11.21)

M II2,1 =M

II2,2 = No − 1, (11.22)

M IIi,1 = No − 1 − i for i ∈ [3,No − 2], (11.23)

M IIi,2 =M

IIi−1,2 +M

IIi,1 for i ∈ [3,No − 2], (11.24)

M IINo−1,2 =M

IINo−2,2 +M

IINo−2,1 + 1. (11.25)

The index N_G is calculated

N_G =M IIj,0 +M

IIk,1 +M

IIl,2 +NI , (11.26)

NI is added to start the indexing at the last index if case I. Total number of pathsis

NII =MII0,N0−1 +M

II1,N0−2 +M

II2,No−1 + 1. (11.27)

63

Page 64: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Case II:n j k l0

1MII

11→

MII12→

MII20

↗ ↑ ↓ ↓

2MII

21→

MII22→

↑MII

30

↗ ↑ ↓ ↓

3MII

31→

MII32→

⋮ ⋮ ⋮ ⋮ ⋮

MIINo−3,0

↗ ↑ ↓ ↓

No − 3MIINo−3,1→

MIINo−3,2→

MIINo−2,0

↗ ↑ ↓ ↓

N0 − 2MIINo−2,1→

MIINo−2,2→

MIINo−1,0

↗ ↓ ↓

No − 1NI→ 1

MIINo−1,2→ NII

Figure 11.3: All paths j > k ≤ l, i < k are represented here. See the explanation in the text.

Case III: Figure 11.4 contains all paths j ≤ l, i < j. The first row (n = 0) is empty sincei = k < j. The arrow weight matrix can be constructed in the same way asM Ii,j . The index N_G can be calculated using the tho first columns of M I and

subtracting 1 from j and l since both i, j must be larger than zero (see the tablebelow)

N_G =M Ij−1,0 +M

Il−1,1 +NI +NII , (11.28)

where NI and NII is added to start the indexing at the last index if case II.

11.5 Memory requirements and numerical speed

The memory used to store the CME increases rapidly as a function of the basis size, but hememory requirements are still acceptable. For example, for a basis with 28 shells, there are57 × 106 CME and 33 × 106 pointers which requires about 1.2GB of memory. The arrayweight matrices are very small, and with 28 shells the largest of these have the dimensions406 × 3.

In our implementation of the algorithm, a total of 6 if-tests and a little less than 4 array

64

Page 65: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Case III:n j l0

1NIII→ 1

MIII1,0→

MIII1,1→

↓ ↓ ↓

2MIII

2,0→

MIII2,1→

↓ ↓ ↓

3MIII

3,0→

MIII3,1→

↓ ↓ ↓

⋮ ⋮ ⋮

No − 1MIIINo−1,0→

MIIINo−1,1→ NIII

Figure 11.4: All paths j ≤ l, i < j are represented here. See the explanation in the text.

lookup on average (in the small weight matrices) are necessary to retrieve the address of aCME. This is the same for all systems regardless of the size of the basis.

11.6 Generalisation to other systems

It should be straight forward to generalize this method to other systems.The only require-ment is that the matrix elements have the same symmerties (see: Eq. (11.7)) with regardto the spatial part of the single particle wave functions. Other quantum numbers should ingeneral be possible to account for by redefining the array nI .

65

Page 66: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Part IV

Data analysis

66

Page 67: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

A large amount of data is collected during an FCIQMC simulation. The cal-culated observables are based on statistical measures, like the generational es-timator and the projected estimator which we introduced in the last chapter.These are only interesting if we can find a reliable measure of the precisionof the results. In the first chapter, we introduce a numerically efficient wayof estimating the statistical error. This method was discussed in an article byFlyvbjerg and Pedersen (1989) [5], and we will simply refer to it as Flyvbjerg-Pedersen analysis or blocking analysis. We will first discuss this method in ageneral context, and then how in can be used to calculate the statistical error ofthe generational and the projected estimator.

We will then discuss curve fitting. In section 5.3, we introduced a formula thatcan be used to extrapolate the energies of finite Hilbert spaces to the limit ofan infinite basis. But to do so, we need to fit a parametrized function to a set ofdatapoints. Least square fitting is an efficient method of curve fitting, and wewill introduce this method in the second chapter in this part.

67

Page 68: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 12

Statistical analysis

A large amount of data is generated during a simulation, and observables are calculated onthe basis of mean values of different data sets. These estimates are only interesting if wecan find a reliable measure of the precision of the results. The standard way of doing this isto calculate the statistical error ε, which is defined as the standard deviation of the samplemean for a given number of samples. In this section we will show how the statistical errorcan be estimated using Flyvbjerg-Petersen analysis[5], and also discuss complications thatarise when we calculate the statistical error of the projected energy.

12.1 The statistical error

Assume that we have drawn a number of samples {xi, x2, . . . , xn} from the statistical dis-tribution p(x), and that we want to estimate the statistical error ε of the mean

f =1

n

n

∑i=1fi, fi ≡ f(xi). (12.1)

We further assume that the sampling is ergodic, such that limn→∞ f is equal to the ensambleaverage

⟨f⟩ = ∫ dxp(x)f(x). (12.2)

The mean f is a fluctuating quantity for real data sets where n <∞, and the statistical errorε is defined as the standard deviation of f . We first calculate the variance

ε2 = ⟨f2⟩ − ⟨f⟩2. (12.3)

By inserting Eq. (12.1) into Eq. (12.3) it is straight forward to show that

ε2 = ⟨[1

n

n

∑i=1fi]

2⟩ − ⟨

1

n

n

∑i=1fi⟩

2=

1

n2

n

∑i,j=1

γij , γij = ⟨fifj⟩ − ⟨fi⟩⟨fj⟩. (12.4)

Further manipulation of this expression give

ε2 =1

n2

⎡⎢⎢⎢⎢⎣

n

∑i=1γii + 2

n

∑i=1

n

∑j=i+1

γij

⎤⎥⎥⎥⎥⎦

=1

n2[nγ0 + 2

n−1∑t=1

(n − t)γt] , (12.5)

68

Page 69: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

here γt is the correlation function

γt = γij , t = ∣i − j∣, (12.6)

where the correlation only depends on the “time” t between the samples. Now we can write

ε2 =1

n[γ0 + 2

n−1∑t=1

(1 − t/n)γt] . (12.7)

For uncorrelated data sets γt = 0 for t ≠ 0 and the formula becomes very simple, and theexpression for the statistical error can be reduced to the simple form

ε =γ0√n, (12.8)

where γ0 is the standard deviation of f which can be estimated by taking the standarddeviation of the data set {f0, f1, . . . , fn}.

12.2 Flyvbjerg-Petersen analysis

The samples from concurrent iterations in an FCIQMC simulation are heavily correlated.This is due to the fact that the distribution of walkers fluctuates slowly around an equilibriumdistribution, and therefore we can not use the simple expression of Eq. (12.8). We willnow introduce the Flyvbjerg-Petersen analysis[5], which is a method where the statisticalerror can be found without explicitly calculating the correlation function γt and at a lowcomputational cost.

Assume that the data set {f1, f2, f3, . . . , fn} is transformed into a new data set that ishalf the size {f

(2)1 , f

(2)2 , f

(2)3 , . . . , f

(2)n/2} where

f(2)i =

1

2(f2i−1 + f2i) . (12.9)

The key point is that the mean and the statistical error are invariant under this transformationsuch that

f = f (2), ε = ε(2). (12.10)

When we do this transformation repeatedly, we get the data sets

{f(2m)1 , f

(2m)2 , f

(2m)3 , f

(2m)n/2m} , m = 1,2,3,4, . . . . (12.11)

and it is proved by induction that all of these data sets have the same mean and statisticalerror. As we increase m, the correlation between the samples f (2m)

i and f (2m)i+1 will become

smaller. And therefore, as we see from Eq. (12.7),

ε(2m)

= σ(2m)/√n/2m → ε as m becomes large. (12.12)

We now see that we can find the error ε by calculating a series of values ε(2m) with increas-

ing m until it converges to ε. The estimated error will then increase until the point whereit remains fixed within statistical fluctuations. This procedure can be performed by writing

69

Page 70: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

a small computer program that repeatedly transforms the initial data set according to Eq.(12.10) and calculates ε(2

m).Note that the statistical error of ε2

mcan be estimated using the formula

ε2m

≈σ2

m

√n/2m

⎝1 ±

1√

2(n/2m))

⎠. (12.13)

See [5] for a justification of this formula.

12.3 Flyvbjerg-Pedersen analysis for FCIQMC

To calculate the statistical error of the shift S, we store its value each iteration, and useblocking analysis to calculate the error after the simulation has finished. Since we onlystore one sample each iteration, the amount of data that needs to be stored is small.

It is somewhat more complicated to calculate the statistical error of the projected energy.This is due to the fact that the projected energy is a function of two stochastic variables.Recall that the projected energy can be written

⟨Ep⟩ =∑j∈CH0j⟨nj⟩

⟨n0⟩, (12.14)

where C is the set of the indices of all determinants that are connected to the referencedeterminant D0

C = {j ; ⟨D0∣H ∣Dj⟩ ≠ 0} . (12.15)

Each iteration i, we save the two quantities

Ei ≡∑j∈CH0jn

(i)j , and Gi ≡ n

(i)0 . (12.16)

The projected energy can be written as a function of these quantities

⟨Ep⟩ =∑Ni=1Ei/N

∑Ni=1Gi/N

=∑Ni=1Ei

∑Ni=1Gi

. (12.17)

However, we can not use the blocking algorithm on ⟨EP ⟩ because there is no simple way tosplit up the fraction of the sums into blocks. We have instead sorted the individual stochasticvariables in blocks E(n)

i and G(n)i

E(n)i ≡

1

n

ni

∑k=n(i−1)+1

Ei, (12.18)

G(n)i ≡

1

n

ni

∑k=n(i−1)+1

Gi, (12.19)

with i ∈ [1,N/n], (12.20)

such that the projected energy can be written

⟨EP ⟩ ≈∑Mi=1E

(n)i

∑Mi=1G

(n)i

=1

M

M

∑i=1

E(n)i

G(n)i

+ ξn, M = N/n. (12.21)

70

Page 71: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

and the sample variance

Var⎡⎢⎢⎢⎢⎣

∑Mi=1E

(n)i

∑Mi=1G

(n)i

⎤⎥⎥⎥⎥⎦

= Var⎡⎢⎢⎢⎢⎣

1

M

M

∑i=1

E(n)i

G(n)i

+ ξn

⎤⎥⎥⎥⎥⎦

= Var⎡⎢⎢⎢⎢⎣

1

M

M

∑i=1

E(n)i

G(n)i

⎤⎥⎥⎥⎥⎦

+Var [ξn] + 2Cov⎡⎢⎢⎢⎢⎣

1

M

M

∑i=1

E(n)i

G(n)i

, ξn

⎤⎥⎥⎥⎥⎦

. (12.22)

In the case that the statistical fluctuations of ξn are much smaller than the statistical fluctu-ations of the sample mean, as we see from the above equation, the statistical error can be

estimated by doing blocking analysis on the dataset {E(n)i /G

(n)i }

N/n

i=1threating E(n)

i /G(n)i

as a single stochastic variable. We will now find an expression for ξn, and show that it infact can be neglected.

The error ξn can be found by considering the Taylor expansion of the projected esti-mator. We let µE be the sample mean of {Ei} and µG be the sample mean of {Gi}. Themultivariate Taylor expansion of the fraction E(n)

i /G(n)i around the point (µE , µG) is

T

⎡⎢⎢⎢⎢⎣

E(n)i

G(n)i

⎤⎥⎥⎥⎥⎦

= T0

⎡⎢⎢⎢⎢⎣

E(n)i

G(n)i

⎤⎥⎥⎥⎥⎦

+ T1

⎡⎢⎢⎢⎢⎣

E(n)i

G(n)i

⎤⎥⎥⎥⎥⎦

+ T2

⎡⎢⎢⎢⎢⎣

E(n)i

G(n)i

⎤⎥⎥⎥⎥⎦

+ . . . (12.23)

The zeroth, first and second order terms are

T0

⎡⎢⎢⎢⎢⎣

E(n)i

G(n)i

⎤⎥⎥⎥⎥⎦

=µEµG

, (12.24)

T1

⎡⎢⎢⎢⎢⎣

E(n)i

G(n)i

⎤⎥⎥⎥⎥⎦

=1

µG(E

(n)i − µE) −

µEµ2G

(G(n)i − µG), (12.25)

T2

⎡⎢⎢⎢⎢⎣

E(n)i

G(n)i

⎤⎥⎥⎥⎥⎦

=µEµ3G

(G(n)i − µG)

2−

1

2µ2G(G

(n)i − µG)(E

(n)i − µE). (12.26)

We want to find the Taylor expansion of the sum (1/M)∑Mi=1(E

(n)i /G

(n)i ). This is a mul-

tivariate Taylor expansion T in the variables (E(n)1 , . . . ,E

(n)M ,G

(n)1 , . . . ,G

(n)M ), but since

each term of the sum only depends on one pair E(n)i ,G

(n)i , it can be written as the sum

T

⎡⎢⎢⎢⎢⎣

1

M

M

∑i=1

E(n)i

G(n)i

⎤⎥⎥⎥⎥⎦

=1

M

M

∑i=1T

⎡⎢⎢⎢⎢⎣

E(n)i

G(n)i

⎤⎥⎥⎥⎥⎦

. (12.27)

The zeroth order term is

1

M

M

∑i=1T0

⎡⎢⎢⎢⎢⎣

E(n)i

G(n)i

⎤⎥⎥⎥⎥⎦

=µEµG

, (12.28)

which is exactly the projected energy. The first order contribution disappears since

1

M

M

∑i=1T1

⎡⎢⎢⎢⎢⎣

E(n)i

G(n)i

⎤⎥⎥⎥⎥⎦

=1

µG(

1

M

M

∑i=1E

(n)i − µE) −

µEµ2G

(1

M

M

∑i=1G

(n)i − µG) = 0. (12.29)

71

Page 72: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

This means that the leading term in the error ξn is the second order term

1

M

M

∑i=1T2

⎡⎢⎢⎢⎢⎣

E(n)i

G(n)i

⎤⎥⎥⎥⎥⎦

=µEµ3G

1

M

M

∑i=1

(G(n)i − µG)

2−

1

2µ2G

1

M

M

∑i=1

(G(n)i − µG)(E

(n)i − µE)

=µEµ3G

Var(G(n)) −

1

2µ2GCov(G(n),E(n)

), (12.30)

where Var(G(n)) is the variance of the data set {G(n)1 , . . . ,G

(n)M }Ni=1 and Cov(E(n),G(n))

is the covariance of the data sets {G(n)1 , . . . ,G

(n)M }Ni=1 and {E

(n)1 , . . . ,E

(n)M }Ni=1. We have

now shown that ξn has a leading term

ξn ≈µEµ3G

Var(G(n)) −

1

2µ2GCov(G(n),E(n)

), (12.31)

which, for the systems we have treated, is a very small number. Note that typical values forthe means are µG ∼ 103-105 and µE/µG ∼ 10−1-10. The fluctuations of ξn are expectedto be much smaller than the fluctuations of the projected estimator and can therefore beneglected when we calculate the statistical error. As we can see from Fig. 12.2, ξn falls offas a function of n which means that it is favourable to use a large n. We therefore leavethe block size at one, and increase n instead. This is analogous to increasing the blocksize when ξn is negligible, but in the case of a large ξn we would see a convergence of thestatistical error in terms of this variable as well.

Figure 12.1: Blocking analysis of the of the projected estimator ⟨EP ⟩ and the generational estimator⟨S⟩. We see convergence at ∼ 1 mili-Hartree for both estimators. The blocksize n is doubled betweeneach data point.

72

Page 73: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Figure 12.2: The error ξn as a function of n, where n is the blocksize. Both of these are definedin Eq. (12.21). The error is in units of Hartree, and is very small compared to the projected energywhich is close to 20 Hartree.

73

Page 74: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 13

Curve fitting

We will here introduce the least square method which is a method of fitting parametrizedfunctions to data points. This section is to a large degree based on the note on least squaremethods by Richter (1995) [28] and the article on the Levenberg-Marquardt algorithm byMarquardt (1963) [17].

13.1 The least square method

Assume that we have a set of points {(xi, yi)}ni=1, and that we want to fit to the function

y(x,a), a = (a1, a2, . . . , am) to these points with respect to the parameters ai. A commonoptimization method is the least squares method, where the optimal values for ai are foundby minimizing the function

M(a) =n

∑i=1

[y(x,a) − yi]2

σ2i, (13.1)

where σi is the standard deviation of the value yi. The minima is found at the point a0 where

[δM(a)δai

]a0= 0∀ i ∈ [1,m] . (13.2)

We will first look at the linear least square problem where y(x,a) can be written as alinear function. This is the starting point for nonlinear least square problems as well sinceall functions can be approximated as a first degree Taylor polynomial close to a minima.The linear y(x,a) is written

y(xj ,a) =m

∑i=1aifi(xj) =∑

i

aiFji, (13.3)

which can be rewritten as the matrix equation

y = Fa. (13.4)

Eq. (13.1) can also be written as a matrix equation

M(a) = (b −Xa)T (b −Xa) , (13.5)

74

Page 75: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

where b is a vector with the components bi = yi/σi and X is a matrix Xij = fj(xi)/σi. Theminima is found when Eq. (13.2) is fulfilled. Derivation with respect to ai now yields

0 = 2XT(b −Xa0)

⇒ XTXa0 = XTb

⇒ a0 = (XTX)−1Xb = CXTb. (13.6)

This problem can be solved efficiently on a computer using standard methods. See forexample [8] for a detailed description.

The nonlinear problem is typically solved by using an iterative algorithm that searchesfor the minima of M(a) in the parameter space of a. One class of such methods arethe gradient methods, where one repeatedly steps in the direction of the negative gradi-ent a ← a − k∇aM(a), until the minima is found. Another class of iterative methods arethe Gauss-Newton methods, where the strategy is to expand the nonlinear function as a firstorder Taylor polynomial and solve it as a linear least square problem. The procedure isrepeated until convergence. The most popular least squares algorithms, like the Levenberg-Marquardt method [17], combines the individual strengths of these algorithms. Severalhighly optimized implementations of the Levenberg-Marquardt algorithm are available asfor example the MinPack library, or its Python wrapper curve_fit in the SciPy library.

13.2 Error analyses of the least square fit

In this section we will only look at the nonlinear problem. More specifically, we want tocalculate the error of the extrapolated function y(x,a) at a point x based on the standarddeviations σi of the data.

When we get sufficiently close to the minima a0, the y(x,a) and M(a) can be writtenas first order Taylor expansions

y(x,a) = y(x,a0) + (a − a0)Td(x,a0), (13.7)

M(a) =M(a0) + (a − a0)TH(a0)(a − a0), (13.8)

where H(a) has elements Hij and d(x,a) has elements di

di =δy(x,a)δai

, Hij =δ2M(a)δaiδaj

. (13.9)

If we now substitute f(x)→ d(x,a0) in Eq. (13.3) we get

Xij =1

σi

δy(xi)

δaj. (13.10)

Now it is easy to see that we end up with the same expression for the minima as in the linearcase

a = CXTb. (13.11)

An infinitesimal change in a0 is written

∂a = CXT∂b. (13.12)

75

Page 76: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

The covariance matrix σ2a with elements σaij is

σ2a = ⟨∂a∂a⟩ = ⟨C(XT∂b)(XT∂b)TC⟩

= CXT⟨∂b∂bT ⟩XCT . (13.13)

The matrix ⟨∂b∂bT ⟩ has the elements ⟨(∂yi/σi)(∂yj/σj)⟩. Here {yi} are assumed to bestatistically independent variables, which means that

⟨(∂yi/σi)(∂yj/σj)⟩ = δij (13.14)

⇒ ⟨∂b∂bT ⟩ = 1, (13.15)

and

σ2a = CXTXCT= CC−1CT

= C. (13.16)

This result allows us to calculate the covariance matrix σ2y(x,x′,a) = ⟨∂y(x,a)∂y(x′,a)⟩

which in the special case that x = x′ is the variance of y(x,a).

σ2y(x,x′,a) = ⟨∂y(x,a)∂y(x′,a)⟩

=m

∑i=1

m

∑j=1

⟨δy(x,a)δai

δy(x′,a)δaj

∂ai∂aj⟩

=m

∑i=1

m

∑j=1

⟨∂ai∂aj⟩δy(x,a)δai

δy(x′,a)δaj

= d(x′,a)TCd(x,a), (13.17)

which means that the standard deviation of y(x,a) can be written

σ2y(x,x,a) =√

d(x,a)TCd(x,a). (13.18)

13.3 Error analysis of E(R)

We will use Eq. 13.18 from the last section to find the estimated error of the parametrizedenergy E(R) defined in Eq. (5.11) at R →∞. The error vector d with the elements di is

di = [δE

δai]a=a0

. (13.19)

For the parametrized function for the error E(R) we find the elements di:

[δE(R)

δa]

a=a0= 1, (13.20)

[δE(R)

δb]

a=a0= −b0

R

∑r=1

(N + r)r−c0 , (13.21)

[δE(R)

δc]

a=a0= −b0

R

∑r=1

log(c0)(N + r)r−c0 . (13.22)

<++> The error is always converging at a large R. We already know that ∑Rr=1 r−(c0−1)

converges for c > 2. The sum ∑Rr=1 log(r)r−c0 will also converge since it is bounded by∑Rr=1 r

−(c0−1).

76

Page 77: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Part V

Implementation of the FCIQMCalgorithm

77

Page 78: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

In this part we aim to give an overview of our implementation of FCIQMC.The code is written in C++, and is tailored to calculate energies of the station-ary states of 2-dimensional open shell quantum dots. It is organized in separateinterchangeable modules, meaning that it relatively easily can be modified totackle other systems such as 3-dimensional quantum dots, molecules or atomicnuclei, and is fully parallelized using a hybrid approach which combines mul-tithreading and parallelization with MPI.

The main ideas behind the algorithm is more or less explained in part III, butthere are several aspects of the implementation that we want to discuss furthersuch as the numerical representation of the determinants and the state vectors,the code structure, parallelization, optimizations etc.

In the first three chapters we give an overview of our implementation. Firstwe write about the numerical representation of the state vector followed by adescription of how we have implemented the basic (sequential) algorithm andhow we have implemented the parallel algorithm. After reading these chapters,one should have a general understanding of how our implementation works. Inthe fourth chapter we look closer at the code. We present the class structureand provide details about the different classes. This chapter should give a goodunderstanding of how the code is structured and what responsibilities of thedifferent classes are. In the fifth chapter we have presented some benchmarksand discuss the efficiency of the program. We have also looked at different runtime parameters, and how they should be tuned to optimize the performanceof the code. The sixth and last chapter contains a short discussion of how thecode should be modified in we want to simulate different systems than the twodimensional quantum dots.

78

Page 79: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 14

Numerical representation of thedeterminants, the basis and the statevector

14.1 The determinants

A large part of the of the code is devoted to manipulating, sorting, reading from and trans-ferring information about determinants and their populations. It is therefore crucial for theefficiency of the code that we find a smart way of representing them numerically, which isboth space efficient and computationally fast. We have chosen to store the determinants asbinary strings, ”bϕ0 , bϕ1 , . . . , bϕ2M

”, with the same number of elements as the number ofspin orbitals 2M that are accessible in the basis. The bit bϕi here represents the i’th orbital,and is set to 1 if the orbital is occupied and 0 otherwise. As an example, the state

∣Di⟩ = ∣ϕ0, ϕ1, ϕ3, ϕ5⟩, ϕi ∈ {ϕ0, ϕ1, ϕ2, . . . , ϕ2M} (14.1)

would be represented as the binary string

∣Di⟩→ ”bϕ0bϕ1bϕ2bϕ3 . . . bϕ2M” = ”1 1 0 1 0 1 0 0 0 0 0 . . .0” (14.2)

Note that in the direct product basis, the number of possible combinations of ”bϕ0 , . . . , bϕ2M”

is exactly the number of determinants in the basis, which means that this is the most spaceefficient way of storing the determinants. We have chosen to use the C++ container classsdt::bitset to store the binary strings. This class is optimized to be space efficient,and each element occupies only one bit of memory. Note that bool, which probably isthe most used type for storing bits, usually occupies 8 bits memory per bit of information.Low memory usage is an important consideration when optimizing the code for parallelcomputations since we want to minimize the communication overhead.

For numerical reasons that will be made clear in the next chapter, we want to keep thedeterminants ordered. We have therefore defined the operator < as

∣ϕa1ϕa2 , . . . , ϕaNP ⟩ < ∣ϕb1ϕb2 , . . . , ϕbNP ⟩ only if

22M−a1 + 22M−a2 + ⋅ ⋅ ⋅ + 22M−aNP < 22M−b1 + 22M−b2 + ⋅ ⋅ ⋅ + 22M−bNP , (14.3)

79

Page 80: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

and we define the determinants {∣Dn1⟩, ∣Dn2⟩, . . .} to be sorted when ∣Dni⟩ < ∣Dni+1⟩.In the rest of this thesis, when we say that a determinant is greater or lesser than anotherdeterminant or that a set of determinants are sorted, we are referring to this equation.

14.2 The single particle basis

We keep 2M spin orbitals in our basis, each identified by its index i ∈ [0,2M − 1]. Eachspin orbital ϕi is uniquely represented by the triplet (m,s,n), where m is the magneticquantum number, s is the spin and n is the principal quantum number. Given the index i,the triplet (m,s,n) is stored in the following way:

(i): ϕi has spin ↑ if i is odd and ↓ if i is even.

(ii): The quantum numbers n and m are stored in two arrays of length M .

int *pi_m = new int[M];int *pi_n = new int[M];

The magnetic quantum number of orbital i is stored as the floor(i/2)’th element inpi_m, and the principal quantum number is stored as the floor(i/2)’th element inpi_n.

14.3 The state vector

The state vector is represented by the signed population of walkers that populate differentdeterminants. Assume that ND is the number of populated determinants. We store thedeterminants as the ND first elements of a bitset array.

bitset<N> *pb_determinants = new bitset<N>[i_ndmax];

And the signed population of walkers is stored as the ND first elements of a long array.

long *pl_population = new long[i_nwmax];

Here the population of pb_determinants[i] is stored as pl_population[i].The number of populated determinants ND will vary from one iteration to the next,

but usually only a fraction of the total number of determinants in the basis are populated.So every iteration these arrays have to be rearranged, such that the populated determinantsalways are stored as the ND first elements.

80

Page 81: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 15

A single FCIQMC iteration

The aim of this chapter is to explain how the sequential FCIQMC algorithm has been imple-mented. We will do this by going through a single iteration of the algorithm, which includesthe kill/clone, spawn and annihilation step.

Assume that we start with a population of walkers {ni0 , ni1 , . . . , niND} where ni is thesigned population of the determinant ∣Di⟩. As we already have discussed, the population isrepresented by two vectors

pb_determinant[m] ← ∣Dim⟩, (15.1)

pl_population[m] ← nim . (15.2)

We further assume that the determinants are indexed and sorted such that ∣Dim⟩ < ∣Din⟩ ifm < n. During an FCIQMC iteration, we loop through all determinants

∣Dα⟩, α = i1, i2, . . . , iND , (15.3)

where each determinant is constructed from the orbitals {ϕα1 , . . . , ϕαNP }

∣Dα⟩ = ∣ϕα1 , . . . , ϕαNP ⟩. (15.4)

A: The kill/clone and spawn steps:

For each element we perform the following steps:

1: Calculate the killing/cloning probability:

We first calculate and store the diagonal matrix element ⟨Dα∣H ∣Dα⟩

p_dp← ⟨Dα∣H ∣Dα⟩, (15.5)

which is given by Eq. (15.6)

⟨Dα∣H ∣Dα⟩ =

NP

∑i=1

⟨ϕαi ∣HHO ∣ϕαi⟩ +1

2

NP

∑ij=1

⟨ϕαiϕαj ∣V ∣ϕαiϕαj ⟩AS . (15.6)

The kill/clone probability is now calculated according to Eq. (8.11).

d_pd = d_dt*(d_pd-dS);

Here d_dt← τ is the timestep and d_dS← S is the shift.

81

Page 82: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

2: Loop over all walkers on ∣Dα⟩:

We then enter a loop where we do the kill/clone and spawn step for all walkers on the currentdeterminant ∣Dα⟩. We let

i_loopw← ∣nα∣, (15.7)

and enter the loop:

for (; i_loopw>0; i_loopw--)

● 2a: Perform the spawning step:

We attempt to spawn walkers on a connected determinant ∣Dβ⟩. As we discussed inchapter 10, we let ∣Dβ⟩ be a single excitation of ∣Dα⟩ with probability ds and a doubleexcitation with probability (1 − ds). We draw a random uniform χ ∈ [0,1] and if χ < dswe try to spawn walkers on a determinant

∣Dβ⟩ = (−1)Pa†pak∣Dα⟩, (15.8)

and else we try to spawn walkers on a determinant

∣Dβ⟩ = (−1)Pa†pa

†qakal∣Dα⟩, (15.9)

where k, l, p, q are sampled according to the rules that we set up in chapter 10, and P isthe number of permutations that are necessary to rearrange the annihilation and creationoperators. We spawn nspawned new walkers, where

nspawned = floor (∣pd(β,α)∣ + 1) . (15.10)

and pd(β,α) is calculated according to Eq. (8.12)

pd(β∣α) = τ⟨Dα∣H ∣Dβ⟩/pgen(β∣α). (15.11)

Here pgen(β∣α) is the sampling probability of determinant ∣Dβ⟩ from determinant ∣Dα⟩

which we also discussed in chapter 10. The off diagonal matrix element ⟨Dα∣H ∣Dβ⟩ iscalculated according to Eq. (4.29)

⟨Dα∣H{a†pak}∣Dα⟩ =

NP

∑j=1

⟨ϕpϕαj ∣V ∣ϕkϕαj ⟩AS , (15.12)

in the case of a single excitation and Eq. (4.30)

⟨Dα∣H{a†pa

†qakal}∣Dα⟩ = ⟨ϕpϕq ∣V ∣ϕkϕl⟩AS , (15.13)

in the case of a double excitation. If a spawning event is successful, we store the newlyspawned walkers on the arrays: pb_new and ppl_new. The first is an 1×nmax bitsetarray which stores the determinant ∣Dβ⟩, and the second is a 2 × nmax long array thatstores the signed number of new walkers, and the integer nmax is a preset value that

82

Page 83: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

sets the size of the array. The newly spawned walkers and whether their parents wereinitiators, are stored according to the following rules:

pb_new[l_nnew]← ∣Dβ⟩ (15.14)

if ∣Dα⟩ is an initiator: (15.15)

ppl_new[0][l_nnew]← nspawned,

ppl_new[1][l_nnew]← 0,

else if ∣Dα⟩ is a non-initiator:

ppl_new[0][l_nnew]← 0,

ppl_new[1][l_nnew]← nspawned, (15.16)

l_nnew← l_nnew + 1. (15.17)

Here l_nnew is an integer that we use to count the number of newly spawned walkers.This parameter is set to zero at the beginning of each FCIQMC iteration.

Note that according to the spawning rules of i-FCIQMC, we need to know if the parentof a walker is an initiator, the total number of non- initiators trying to spawn on thesame determinant and whether ∣Dβ⟩ was previously populated before we can say if thespawning event was successful. Consequently, we do not know whether a spawning eventwas successful before after an iteration.

● 2b: Perform the kill/clone step:

We try to kill or clone a walker with the probablity d_pd ← Pd(α∣α). Remember thatd_pd is already calculated and stored, and is equal for all walkers on the current deter-minant. We now attempt to kill or spawn walkers according to the following rules:

first draw a random uniform χ ∈ [0,1] (15.18)

if d_pd > χ:

pl_population[α]− = sign(nα) ∗ floor(∣d_pd∣ + 1), (15.19)

else if ∣d_pd∣ > χ:

pl_population[α]+ = sign(nα) ∗ floor(∣d_pd∣ + 1). (15.20)

where nα is the signed population on ∣Dα⟩.

B: The annihilation step:

When we have run through the previous steps for all determinants, we must annihilate allpairs of walkers of opposite signs that populate the same determinant. We have chosento do this in the following way: We first sort the arrays that contain the newly spawnedwalkers pb_new, ppl_new. The determinants array are sorted in ascending order, andthe population arrays are reordered in exactly the same way. Note that these arrays mightcontain equal determinants, in which case we sum the populations and remove the duplicate.For example, it might happen that

pb_new[i] = pb_new[j], (15.21)

83

Page 84: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

and in this case we sum

ppl_new[0][i]+ = ppl_new[0][j], (15.22)

ppl_new[1][i]+ = ppl_new[1][j], (15.23)

remove pb_new[j], pb_new[0][j] and pb_new[1][j] from the simulation andsubtract one from l_nnew (remember that l_nnew is the total number of spawning events).After this step we end up with a sorted determinants array

pb_new[i] < pb_new[i+1] for all i ∈ [0,l_nnew-2], (15.24)

and where ppl_new[0][i] and ppl_new[0][i] contain all walkers spawned onpb_new[i] from initiators and non- initiators respectively.

The next step is now to merge the arrays of old and newly spawned walkers. We makeuse of temporary arrays pb_temp and pl_temp, and copy both the old and new deter-minants to these arrays. This must be done according to the rules of the initiator adaptionof FCIQMC. This part of the algorithm is most easily understood by reading the C++ codewhich we have pasted below. Here l_ndet is the number of elements in the arrays thatstores the old determinants and l_nnew is the number of elements in the sorted list ofnewly spawned walkers.

long i = 0, j = 0, n = 0, l_temp;while ( (i<l_ndet) && (j<l_nnew) ){

if < ... pb_determinants[i] == pb_new[j] ... >{

pb_temp[n] = pb_determinants[i]; //old determinantspl_temp[n] = pl_population[i];// here all attempts to spawn is accepted since the// determinant was previously populatedpl_temp[n] += ppl_new[j][0];pl_temp[n] += ppl_new[j][1];

i++;j++;

}else if < ... pb_determinants[i] > pb_new[j] ... >

{l_temp = 0;// initiators are always allowed to spawnl_temp += ppl_new[j][0];// non initiators are only allowed to spawn if// the absolute value of the sum of new walkers// is larger than oneif ( abs(ppl_new[j][1]) > 1 ){

l_temp += ppl_new[j][1];}pb_temp[n] = pb_new[j];pl_temp[n] = l_temp;j++;

}

84

Page 85: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

else \\( < ... pb_determinants[i] < pb_new[j] ... > ){

//old determinantspb_temp[n] = pb_determinants[i];pl_temp[n] = pl_population[i];i++;

}// if the population is larger than 0, accept the determiantif ( pl_temp[n] != 0 ){

n++;}

}

Now, either all old walkers or all new walkers are copied to the temporary arrays. The nextstep is to copy the rest of the walkers:

if (i==l_ndet){

while (j<l_nnew) // all old walkers are already copied{

pb_temp[n] = pb_new[j];pl_temp[n] = ppl_new[j][0];if ( abs(ppl_new[j][1])>1 ){

pl_temp[n] += ppl_new[j][1];}j++;if ( pl_temp[n] != 0 ){

n++;}

}}else if ( j==l_nnew ){

while ( i<l_ndet) // all new walker are already copied{

pb_temp[n] = pb_determinants[i];pl_temp[n] = pl_population[i];i++;if ( pl_temp[n] != 0 ){

n++;}

}}

Now, all determinants are contained in the n first elements of the temporary arrays. We fin-ish by swapping the pointers of the temporary arrays and the populations and determinantsarrays, and reset the number of walkers and determinants.

85

Page 86: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

//reset number of determinantsl_ndet = n;l_nnew = 0;

//Pointer swappingbitset<N> *pb_sswap = pb_determinants;pb_determinants = pb_temp;pb_temp = pb_swap;

long *pl_swap = pl_population;pl_population = pl_temp;pl_temp = pl_swap;

C: Varying the shift:

The last step is to vary the shift S to stabilize the populatios. We assume that the oldnumber of walkers is already stored as l_oldnumwalkers. The new number of walkersl_numwalkers can be calculated:

l_numwalkers = 0;for (int i=0; i<l_ndet; i++)

l_numwalkers += abs(pl_population[i]);

The new shift is now calculated according to Eq. (8.16).

86

Page 87: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 16

Parallelization

16.1 Introduction

Parallelization allows simulations on multicore computers or clusters of interconnectedcomputers or nodes. There are two main models of parallel computing, the shared memorymodel and the distributed memory model, which are based on different underlying memoryarchitectures. Shared memory programs communicate by changing shared memory vari-ables and distributed memory programs communicate via message passing. On multicorecomputers, we can choose whether to use a shared or a distributed memory model. Oncomputational clusters, where the memory is only accessible to the cores on each node, adistributed memory model must be chosen. When we implemented FCIQMC, we foundthat it was necessary to use a composite approach combining the shared and the distributedmemory models. For simulations with a large set of basis functions, the amount of memoryneeded to store the Coulomb matrix elements is so large that at least some of the cores haveto share memory. Distributed memory parallelization was implemented because we wantedthe code to run on computational clusters with many nodes.

FCIQMC is in principle a highly paralellizable algorithm. The most time consumingpart of the algorithm is the clone/kill and spawn steps which must be calculated for a largenumber ∼ 105 − 108 of walkers. These calculations are independent of each other andcan therefore be run in parallel without any communication between the processes. Theannihilation step does however include a lot of communication and therefore induces asignificant communication overhead. In this chapter we will discuss these issues along withother details of the parallelization of algorithm.

16.2 Numerical libraries

We have used the library OpenMP[21] which is an interface for shared memory paralleliza-tion. More specifically, it is an implementation of multithreading which is a method whereseveral lightweight processes or threads are started and allocated to different cores.

OpenMP has been implemented using a coarse grained model where the threads onlyshare a minimum of objects and variables, as for example the Coulomb matrix elementsand the list of walkers. This was done to minimize the number of locks and mutex’es(critical and atomic clauses in OpenMP) that are necessary to avoid conflicting read andwrite operations to the same memory locations.

87

Page 88: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

MPI is an abbreviation for Message Passing Interface and is a library specification whichprovides an interface for synchronization and communication between processes with dis-tributed memory. The MPI standard defines the syntax and the semantics of a number oflibrary routines and has several implementations, among others OpenMPI[7] which we haveused in our code.

16.3 The distribution of walkers on the MPI tasks

Due to the annihilation step in the FCIQMC algorithm, we need a fast method to searchthrough the population and find all walkers that reside on any given determinant, and thisbecomes more difficult when we run the code with many MPI tasks. This problem can besolved by distributing the determinants in a specific way which we will now discuss.

We assume that the determinants are enumerated such that

∣Di⟩ < ∣Di+1⟩, (16.1)

where the operator < is defined in Eq. (14.3), and that the walkers are distrubuted on mul-tiple MPI tasks which are enumerated 1,2,3, . . . . The determinants {∣Di1⟩, ∣Di2⟩, . . .}, aresorted and distributed such that only walkers that populates determinants ∣Di⟩ with i insome interval [M(n − 1) + 1,M(n)] populates MPI task n. The array

V = (∣DM(1)⟩, ∣DM(2)⟩, . . . , ∣DnD⟩), (16.2)

now keeps the information about where a determinant, if it is populated, is stored. To makethis information accessible to all processes we distribute V to the MPI tasks.

Figure 16.1: This figure shows schematically how the determinants are distributed on the MPI tasks.The determinants are sorted such that all determinants on MPI task i are larger than ∣DM(i−1)⟩ andsmaller than or equal to ∣DM(i)⟩.

88

Page 89: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

16.4 Load balancing

The process of distributing the walkers such that the workload is the same on all threads isreferred to as load balancing. All threads have to wait for the last thread to finish at the endof an iteration, which means that the numerical efficiency will suffer if the computationalload is not evenly distributed. The load balancing of the OpenMP threads and the MPI tasksfollow the same principles, and in this section we will refer to both the MPI tasks and thethreads as processes.

Each process i receives a number N (i)W of walkers that populates a number N (i)

D ofdeterminants. Ideally, the walkers should be distributed in such a way that all processesspend the same time processing the walkers. However, this is not straight forward since theCPU time needed to process one walker is dependent on many different factors. We haveassumed that the computation time for a set of N (i)

W walkers living on N (i)D determinants is

tCPU(N(i)W ,N

(i)D )∝ kWN

(i)W + kDN

(i)D + const, (16.3)

where kW , kD are implementation and system dependent parameters. We think this is areasonable assumption since the number of calls to the most costly functions, which arethe functions that calculate the kill/clone and spawn probabilities, are linearly dependent ofN

(i)D and N (i)

W . According to Eq. (16.3), the walkers should ideally be distributed to theprocesses i =,1,2,3, . . . ,Nprocs in such a way that

N(a)W kW +N

(a)D kD =

Nprocs

∑i=1

(N(i)W kW +N

(i)D kD)/Nprocs, ∀a ∈ [1,Nprocs]. (16.4)

The constants kW and kD are found empirically. In practice we set kW = 1 and optimizekD. This parameter is system dependent, and the optimal value should ideally be found foreach new simulation.

16.5 The program flow

In this section, we will look at the work flow and how the walkers are administrated by theparallelized program. Together with the last chapter where we described how the sequentialalgorithm is implemented, this section should give a more or less complete picture of howwe have implemented the FCIQMC algorithm. We do not provide programming details orcode examples here, but these can be found in the next chapter where we discuss the C++code.

In figure 16.2, one iteration of the code is schematically illustrated in four steps A,B,Cand D, and these steps are explained in detail below.

A: We start with a certain number of walkers on each MPI task. The walkers populatethe determinants ∣Di1⟩, ∣Di2⟩, . . . , which are sorted and distributed on the different MPItasks. The MPI tasks are load balanced in accordance with Eq. 16.4.

The first step is, on each MPI task, to distribute the walkers to the threads in such a waythat they are load balanced.

B: Each thread performs the clone/kill and spawn steps on its list of walkers by using thesequential algorithm.

89

Page 90: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

C: After the previous step, all MPI tasks now have two lists of walkers. The first is theold list of walkers minus the killed walkers and plus the cloned walkers. These walkersare situated on the correct MPI task since the cloned walkers populates the same deter-minants as their parents. The second list consists of the newly spawned walkers whichpopulates different determinants than their parents. These walkers must be sent to theMPI task where their resident determinants are listed, sorted and merged with the oldlist of walkers.

As we discussed in the last chapter, the newly spawned walkers are stored in the arrayspb_new and pl_new. And it is the elements of these arrays that must be redistributed.After the redistribution, the walkers are merged with the old populations and determi-nants arrays in the same way as we described in the last chapter 1 .

D: The number of walkers and determinants on the different MPI tasks may now havechanged. The MPI tasks are load balanced by redistributing the determinants. Becauseof the way the determinants are sorted, only the first/last determinants are transmitted,and only to or from the last/next MPI task.

Except for the additional steps that must be taken to redistribute the newly spawned walkersand load balance the nodes and the threads, the parallel algorithm is more or less identicalto the sequential algorithm.

1We discussed this in the last chapter under point B (the annihilation step).

90

Page 91: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Figure 16.2: This figure is explained in the text in section 16.5

91

Page 92: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 17

Organization of the code and theclasses

In this chapter we will look closer at the C++ code, and show how the code is structured.Note that with exception of the main function, there is no part of the code that is not partof a class. In this chapter each of the classes has its own section where we describe thefunctionality of the class, what classes it instantiates and so on.

17.1 Overview

The code is organized in the following classes

• runSimulation: This class contains the main loop and coordinates the otherclasses.

• walkerContainerClass: Keeps informations about the population of walkers.

• sortWalkers: Sorts the new walkers and merges them with the list of old walkers.

• loadBalanceThreads: Distributes the walkers to the threads.

• walkerDistribution: Distributes the walkers to the MPI tasks.

• walkerPropagator: Runs through a list of walkers and performes the killingcloning and spawning steps.

• hamiltonianElements: Calculates the hamiltonian elements ⟨Di∣H ∣Dj⟩.

• libGRIE: Tabulates and stores the Coulomb matrix elements.

• inputVars: Reads and stores the preset run parameters.

• initSimulation: Initializes the basis and some run time parameters.

In addition, the library OpenFCI [15] are used to calculate the Coulomb integrals, andthe library CRandomMersenne [6] to generate random numbers. The random numbergenerator that we have used is an implementation of the Mersenne Twister algorithm [18]which is considered to be a fast algorithm that produces random numbers of high quality.

The simulator is wrapped in a python code that compiles the C++ code, starts simula-tions, organizes, analyzes and plots the output data etc.

92

Page 93: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Figure 17.1: UML Class Diagram. Some classes are not included like initSimulation,CRandomMersenne, OpenFCI and inputVars.

93

Page 94: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

17.2 The initSimulation class

This class initiates the libGrie class which contains the Coulomb matrix elements and thearrays pi_m and pi_n which contains the quantum numbers of the single particle orbitals.It also sets the seed 1 of the random number generator and some other run time parameters.

17.3 The runSimulation class

This class coordinates the other classes and contains the main loop of the program. Theclasses walkerContainerClass and libGRIE are instantiated before we enter themain loop, and are shared between all threads. We then enter the function run which canbe summarized as follows:

(I): A number i_numthreads of threads are spawned and the program enters the par-allel section.

(A): The class walkerPropagator are instantiated within each thread. Each ofthese classes recieves a pointer to the libGRIE object to be able to access theshared Coulomb matrix elements.

(B): Each thread allocates memory for intermediate storage of newly spawned walk-ers. This is done to prevent data races among the threads.

(C): The program enters the main loop

(i): Each thread calls the walkerPropagator::singleStep() func-tion to do a single FCIQMC iteration.

(ii): The newly spawned walkers are written to the shared arrays ppd_newand pb_new of the class walkerContainerClass .

(iii): The program enters a sequential section where only one of the threadsdoes work(a): The walkerContainerClass object redistributes the new walk-

ers to the different MPI task. It then loadbalance the MPI tasks, andthe threads of the individual tasks.

(b): Statistics are collected from all MPI tasks and written to an outputfile.

17.4 The walkerContainerClass class

This class holds four public arrays and one public vector that stores all information aboutthe current population of walkers, the newly spawned walkers and the load balancing of thethreads. It instantiates the classes walkerDistribution and sortWalkers, whichsorts the walkers, redistributes the walkers on the different MPI tasks and merge the list ofold and new walkers.

The state vector is represented by two arrays. The first is a bitset array which storesthe populated determinants, and the second is a long array which stores their populations.

1 The random number generator is initialized with an integer that is called a seed. The sequence of randomnumbers that are produced by the random number generator depends on the value of the seed.

94

Page 95: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

bitset<N>* pb_determinants = new bitset<N>[i_ndmax];long* pl_population = new long[i_nwmax];

The variable l_ndet tells us how many different determinants that have a non zero popula-tion. These determinants are always stored in the l_ndet first entries of pb_determinantsand pl_population .

The newly spawned walkers are stored on the two arrays

bitset<N>* pb_new = new bitset<N>[i_maxnspawn];long** ppl_new = new long[i_maxnspawn];

Assume a spawning event where ∣n∣ walkers are spawned on the determinant ∣Dj⟩ from thedeterminant ∣Di⟩, and that this is the i_nnew’th spawning event. The sign of n can bepositive or negative depending of the sign of the spawned walkers. The information aboutthe spawning event is stored in the following way:

pb_new[i_nnew]← ∣Dj⟩.

If ∣Di⟩ is an initiator:

ppl_new[i_nnew][0]← n

ppl_new[i_nnew][1]← 0

If ∣Di⟩ is a non-initiator:

ppl_new[i_nnew][0]← 0

ppl_new[i_nnew][1]← n

These arrays must be available when the new list of walkers are merged with the old listof walkers. Often, a walker is spawned on a determinant that is listed on a different MPItask, and there is no way of finding out if the spawning event was successful until the newwalkers are redistributed.

The loadbalancing of the threads are calculated by the class loadBalanceThreadsand the information about how the walkers are distributed is stored on the vector

vector<loadBalThr> wdistthr;

which has the same number of elements as the number of OpenMP threads. wdistthr[i]contains the information about which walkers that are processed by thread i and is aninstance of the struct

struct loadBalThr{

unsigned long first;unsigned long ndet;long nwfirst_thrd;long nwlast_thrd;

};

where first is the index of the first determinant to be processed, and ndet is the numberof determinants. The walkers on the first and the last determinant on a thread can be splitbetween two threads. nwfirst_thrd and nwlast_thrd is the number of walkers onthe first and the last determinant that should be processed by the current thread. wdistthris reset every time the function loadBalance is called.

95

Page 96: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

17.5 The sortWalkers class

This class sorts the spawned walkers and merges the lists of new and old walkers.The functor LessThan finds the smallest of two determinants. This is a class where

the operator () is overloaded with function that compares two determinants given theirindices.

class LessThan{

private:bitset<N> b_tmp;unsigned int l_tmp;bitset<N>* pb_dets;

public:LessThan (bitset<N>* pb_dets) { this->pb_dets = pb_dets; }bool operator()

(const unsigned long lhs, const unsigned long rhs);};

The comparison of the determinants can be efficiently performed by using bit operations.The next example shows how the xor operator (represented by ^ in C++) can be used tofind the “smallest” of the two determinants b_lhs and b_rhs.

bool operator()(const unsigned long lhs, const unsigned long rhs);{

b_tmp = (pb_dets[rhs]^pb_dets[lhs]);l_tmp = b_tmp._Find_first();if (l_tmp==N)

return false;else if (pb_dets[rhs].TEST(l_tmp))

return false;else

return true;}

Here _Find_first() returns either the index of the first bit equal to 1, or N if all bits are0, where N is the template parameter of the bitset objects which equals the number ofspin orbitals in the basis. The function lhs.test(k) returns true if the k’th bit of lhsisset, and false otherwise. The class LessThan is instantiated with a pointer to the first firstdeterminant in pb_determinant or pb_new. This allows us to test if determinant i issmaller than determinant j using the following notation

LessThan lessthan(&pb_determinant[0]);bool b_lessthan = lessthan(i,j);

Instead of sorting the bitset array directly, we now sort an array ul_index with orderedindices in the range [1, . . . ,ND], where ND is the number of determinants that are to besorted. The order of he sorted indices tells us how to reorder the determinants afterwards.This is faster and more practical for many reasons. Most importantly, when N is large it ismuch more time consuming to sort the bitset array directly simply because more dataneeds to be moved around.

96

Page 97: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

The function orderIndices initialise ul_index array and sort it by using the C++Standard Template Library function std::sort 2.

for (unsigned long i=0; i<n; i++)ul_index[i] = i;

std::sort(&ul_index[0], &ul_index[n], LessThan(pb_new) );

Note that we pass the functor LessThan as an argument. This is a method to overload theoperator < with the operator () of the LessThan class.

The function reorderWalkers reorder the newly spawned determinants after thearray ul_index is sorted. Determinants that is represented more than once are mergedand the their populations are summed. To do the reordering of the arrays efficiently, wecopy the determinants array and the populations array to an intermediate array and swappointers.

The function mergeNewAndOldmerges the old list of determinants and a list of sortedwalkers according rules of initiator-FCIQMC. We use intermediate arrays and pointer swap-ping in this function as well.

17.6 The walkerDistribution class

This class take care of the distribution of walkers and determinants on the different MPItasks. Most of the MPI communication is handled here.

As discussed earlier, the determinants are sorted and distributed on the different MPItasks. Every iteration, the newly spawned walkers are sent to the MPI task where their hostdeterminant is listed. To know where to sent the walkers, each MPI task must be aware ofwhich determinants that are listed on which MPI task. This information is, as we discussedin section 16.3, contained in the array

bitset<N>* pb_lastdet = new bitset<N>[i_numthreads];

which contains the greatest determinant on each of the MPI tasks.After the spawning step, each new walker is sorted according to which determinant it

populates. When the walkers are sorted, we only need find the first and the last determinantof the interval that we want to transmit to each of the MPI tasks. For this purpose we usethe STL binary search function std::lower_bound. Similar to what we did in the lastsection, we overload std::lower_bound with a functor that defines the < operator.

This class also redistributes the determinants when the MPI tasks are load balanced.

17.7 The loadBalanceThreads class

This class is responsible for the load balancing of the threads. The function loadBalancefinds the distribution of walkers according to Eq. (16.4).

2 std::sort is an implementation of the so called introsort algorithm [19], which is a fast sorting algo-rithm with a worst case scaling of O(N log(N)).

97

Page 98: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

17.8 The walkerPropagator class

This class performs a single FCIQMC step, and is instantiated on all threads. Each object ofthis class receives the list of walkers that is distributed to the threads by the loadbalanceclass. It calculates the spawning, killing and cloning step according to the FCIQMC algo-rithm.

The function singleStep runs through the list of determinants. For each determinanti the following steps are performed:

(i:) Call the class hamiltonianElements and calculate the diagonal matrix element⟨Di∣H ∣Di⟩.

(ii:) Call the function updatePojectedEnergy to accumulate the projected energy if∣D0⟩ is connected to ∣Di⟩.

(iii:) Run through the list of all walkers j on determinant i

(a) Assume that the preset probability of a single excitation is ds.

If U < ds try to do a single excitation

Else try to do a double excitation.

where U is a random uniform ∈ (0,1). Then call sampleProjector whichdraws the new determinant a†

par ∣Di⟩ or a†pa

†qaras∣Di⟩ and calculates the sugges-

tion probability, and trySingleExcitation or tryDoubleExcitationwhich calculates the Coulomb matrix elements and the excitation amplitude,“rolls the dice” and spawns new walkers.

(b) Try to kill or clone a walker. Draw a random uniform U ∈ [0,1] and calculatedp = −τ(⟨Di∣H ∣Di⟩ − S).

If ⟨Di∣H ∣Di⟩ < 0 then remove the walker if ∣⟨Di∣H ∣Di⟩∣ > U .

Else if ⟨Di∣H ∣Di⟩ > 0 then add a walker if ⟨Di∣H ∣Di⟩ > U .

Adding or removing a walker is done by adding to or subtracting from the i’thelement of the populations array.

We will take a closer look at the function sampleProjector. This function draw arandom determinant that is connected to Di, and calculate the suggestion probability. For asingle excitation we call

double walkerPropagator<N>::sampleProjector(const int iact_w,int &ia1,int &ic1)

Where iact_w is the index of the determinant, and ia1,ic1 is changed to the indices ofthe annihilated and created orbitals. For a double excitation the function is overloaded withtwo more indices ia2 and ic2.

First we pick a random orbital to be annihilated and store it as ai1

98

Page 99: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

ia1 = o_random.IRandomX(1,inum_part);//find the position of the i’th set biti = b_slater_active._Find_first();for (j=1;j<ia1;j++)

i = b_slater_active._Find_next(i);ia1 = i;

where _Find_first() and _Find_next(i) are highly optimized functions of thebitset class that finds the first bit or the first bit after the i’th bit that is set. Then we con-struct a bitset b_slatertemp which contain all orbitals that preserve the total magneticquantum number and the spin

//find the magnetic quantum number of the new stateima = pi_m[ia1/2];//the spin must be the same as that of the annihil. orbif (ia1%2) //ic1 is spin down (1)

b_slatertemp = pbamc_dwn[ima+ir]&~b_slater_active;else //ic1 is spin up (0)

b_slatertemp = pbamc_up[ima+ir]&~b_slater_active;

The bitsets pbamc_up[ima+ir] / pbamc_dwn[ima+ir] contains all orbitals with amagnetic quantum number ima and spin up / down. These bitsets are initialized when theclass is instantiated. b_slater_active is the active determinant ∣Di⟩ and pi_m is thearray containing the magnetic quantum number of the orbitals.

We count the number of orbitals in this set. This number must be known to calculatethe suggestion probability.

idim_S5 = b_slatertemp.count();if (idim_S5==0) {return -1;}

Then we pick a random orbital from this set.

//pick random from S5ic1 = o_random.IRandomX(1,idim_S5);//find the position of the i’th set biti = b_slatertemp._Find_first();for (j=1;j<ic1;j++)

i = b_slatertemp._Find_next(i);ic1 = i;return static_cast<double>(inum_part*idim_S5);

The suggestion probability for the single excitations is the return value divided by the pre-determinad probability of a single excitation ps.

The same strategy is used to find the doubly excited determinants and their suggestionprobability.

17.9 The hamiltonianElements class

This class calculates the elements of the Hamiltonian matrix, and is instantiated by thewalkerPropagator class. It communicates with the libGRIE class that holds theCoulomb matrix elements.

99

Page 100: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

17.10 The libGRIE class

This class tabulates the Coulomb matrix elements using the indexing scheme that is de-scribed in section 11. This class is only instantiated once on each MPI task.

The reason why the libGRIE object is shared among the threads is that the amount ofmemory needed to store the Coulomb matrix elements can become several GB for large R.If each thread where to store its own libGRIE object the memory footprint of the programwould become very large.

The class variables are not changed after the initialization. This means that severalthreads can access the class methods simultaniously without risking the occurrence of raceconditions. Thus, sharing an object of the class between the threads will not slow down thecode.

17.11 The inputVars class

This class reads runtime parameters from a text file and stores them as class variables.Instead of passing the runtime parameters around in the program, we pass an object of thisclass.

100

Page 101: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 18

Benchmarking the Code

In this chapter we have tested the efficiency of the code, both sequentially and with OpenMPand MPI, and which effect different run time parameters have on the execution time.

18.1 Hotspots by CPU usage

The hotspots are the most CPU intensive parts of the code. These are the parts of the codethat we would gain the most from optimizing. To find the hotspots we have performed atests on a single workstation. MPI was not used in this test, but the scaling with MPI isreviewed separately later in this chapter.

(i:) class walkerPropagator 38% of total CPU time of which

68% was spent in the function sampleProjector. which calculates the genera-tional probabilities pgen for the single and the double excitations.

(ii:) class CRandomMersenne 30% of total CPU time. This is the random numbergenerator generating random uniforms.

(iii:) class libGRIE 20% of total CPU time of which

close to 100% was spent in the function getCoulIE. This function finds theCoulomb matrix elements given the indices (p, q, r, s) of the annihilated and cre-ated orbitals.

(iv:) class hamiltonianElements 7% of total CPU time of which

94% was spent in the function getSingleExcitationAmplitudewhich cal-culates the amplitudes ⟨Di∣H {a†

par} ∣Di⟩.

6% was spent in the function getDiagonalElementwhich calculates ⟨Di∣H ∣Di⟩

(v:) The remaining CPU time was mainly spent waiting because the threads had differentworkloads. The sortWalkers class and the loadBalanceThreads class spent less than1% of the total run time.

101

Page 102: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

As we see, the calculation of the generational probabilities pgen, the generation of randomuniforms and accessing the Coulomb matrix elements is the most time consuming part ofthe code.

The sampleProjector method is believed to be reasonably fast, and it is difficultfor us too see how this function could be further optimized. It is however clear that the over-all performance of the code would improve much from such optimizations, and alternativesampling methods might be an interesting subject for future studies. The random numbergenerator is a highly optimized implementation of the well known Mersenne-Twister al-gorithm, which we believe to be a good choice for our implementation. Although fasteralgorithms exists, this one does not compromise on the quality of the random numbers.We have also invested much effort in optimizing the method getCoulIE that returns theCoulomb matrix elements, and we do not know any other method that is faster than ours forthis purpose.

18.2 Scaling with openMP and MPI

Because of the serial sections of the code, the computational efficiency will only increase upto a certain number of nodes and cores. The total run time can not be less that the executiontime of the serial part of the code, and the performance gain of adding an extra node fallsrapidly close to this limit. This relationship is described by Amdahls law which states thatif the serial part of the code spends s of the total run time, the speedup with n processes isn/(1 + s[n − 1]) which converges to 1/s for large n.

The walkers on a single determinant can be split between threads but not between MPItasks. This means that the best possible speedup for a system with NW walkers in totaland nm walkers on the most populated determinant is of order NW /nm. If we increasethe number of MPI tasks beyond roof[NW /nm], we will not see any speedup. This meansthat a simulation will always be limited by the most populated MPI task with nm walkers,and that simulations with many walkers on few determinants should be run with as manythreads as possible per MPI task.

The speedup as a function of the number of OpenMP threads and as a function of MPItasks is shown in Fig. 18.1. This plot shows that the MPI implementation is efficientand indicates that the communication overhead is small. But even if the system whichwe have simulated here scales well with MPI, this result does not necessarily apply to allsystems. There are many factors which affect the amount of communication between thenodes and the communication overhead. For example, we would expect less communicationwith systems that are weakly correlated since the spawning probabilities on average aresmaller (Hamiltonian matrix closer to diagonal form). Likewise, if the fluctuations in thedistribution is small, we would expect less communication since the determinants wouldhave to be redistributed less often. These characteristics are system dependent and difficultto predict.

Among the tunable parameters which affect the amount of communication is the timestep τ , the determinant load parameter kD and the redistribution threshold. The time stepaffects the walker dynamics, and there exists an optimal parameter from a sampling per-spective. But when we run the code on many nodes, the time step is proportional with thespawning rate, and should therefore be kept low to minimize the communication overhead.The optimal values for τ , kD and the redistribution threshold are system dependent, and

102

Page 103: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

should ideally be optimized for each new system.

(a)

Figure 18.1: (MPI) Wall time of simulations with a different number processes or MPI tasks. AllMPI tasks run on different nodes to maximize the communication overhead. (OpenMP) CPU timeof simulations with a different number of cores. All runs performed on a single node. (Ideal scaling)The best possible parallel scaling is n−1, where n is the number of MPI tasks or threads.

18.3 Scaling with the number of walkers

As we have argued earlier (see section 16.4), we would expect the run time of the part of thecode that handles the kill/clone and spawn steps to scale linearly with the number of walkersand the number of determinants. The scaling of the part that handles sorting, annihilationand redistribution of walkers is more difficult to predict, but is expected to have a worstcase scaling of O(N log(N)) 1 with both the number of newly spawned determinants andthe total number of determinants. However, the dependency of the number of determinantson the number of walkers is system dependent and not generally known. Furthermore, thispart of the code is not parallelized with OpenMP, and could therefore have a large negativeimpact on the overall run time.

Our experience from simulations is that given that the number of nodes are kept con-stant, the computation time scales close to linearly with the number of walkers. This isillustrated in Fig 18.2 where we have plotted the run time of simulations of different sys-tems as a function of the number of walkers.

1 The sort algorithm has a worst case scaling of O(N log(N)) where N is the number of determinantsthat are to be sorted. We use C++ Standard Library function std::sort which is an implementation of theintrosort algorithm [19].

103

Page 104: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Figure 18.2: Scaling of the algorithm when the number of walkers are increased for systems with adifferent number of particles NP , number of shells R + 1, spin s and magnetic quantum number m.All systems have an oscillator frequency ω = 1 and are run with the same number of iterations. Aswe see from this figure, the run time t seems to have a linear dependency of the number of walkers.

18.4 The determinant load parameter and the redistributionthreshold

The CPU time of simulations with different values for the determinant load parameter kD isillustrated in Fig. 18.3. The optimal value for this parameter differs from system to system,thus it should ideally be tuned for each new system. But as this is a very time consumingtask we have used a fixed value kD = 1.4 in most simulations.

When it comes to the redistribution threshold, we have found that using a value ∼ 10−2

is efficient for the systems that we have simulated. We have used a redistribution thresholdof 0.03 for all simulations.

104

Page 105: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Figure 18.3: Different simulations where all runtime parameters are the same except the load weightparameter kD. This parameter determines how the nodes are load balanced as defined in Eq. (16.4).As we see, the CPU time is at its minima at kD ≈ 1.4. This number is however system dependent,and ideally each new system should be minimized with respect to kD to optimize the numericalspeed.

105

Page 106: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 19

Modifying the code to simulate othersystems

Our code is tailored to simulate two dimensional quantum dots, but it is straight forward tomodify it to handle other systems like atoms, molecules or nuclei. In this short chapter weare looking closer on how this can be done.

Assume that we want to apply the FCIQMC code to an arbitrary system. To do so,we need to know the Hamiltonian matrix in the basis of the determinants {∣Di⟩} whichare constructed from the single particle wave functions {∣ϕi⟩}. In addition we need tokeep track of the quantum numbers n,m, s, . . . of the single particle wave functions. Tobe able to sample the spawning step efficiently, we must also know which quantities thatare conserved in an interaction ⟨Di∣H ∣Dj⟩. These properties differs from one quantummechanical system to the next, and the code has to be modified if the quantum numbers orthe conservation rules are different from the two dimensional parabolic quantum dots whichwe have simulated.

Only a few functions and classes will have to be modified or rewritten to simulate dif-ferent many body systems. As we already have discussed, we store the quantum num-bers on arrays pi_n and pi_m. If the new system have additional quantum numbers,more such arrays would have to be introduced, and the classes walkerPropagator andhamiltonianElement would have to undergo some small changes. In addition wewould have to change the following classes and functions:

1. The function walkerPropagator::sampleProjector.

This function samples the suggestion probabilities (see: chapter 10) and has to berewritten if the new system has different symmetries. Generally, only determinants∣Di⟩, ∣Dj⟩ where certain quantities are conserved are connected, and only connecteddeterminants should be sampled when we try to spawn new walkers.

2. The class hamiltonianElement.

This class has to be rewritten to calculate the Hamiltonian matrix elements of the newsystem.

3. The class libGRIE.

This class must be replaced with a class that stores or calculates the Coulomb matrixelements (or mode generally the interaction matrix elements) of the new system.

106

Page 107: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

4. The class initSimulation.

This class initiates the arrays pi_m and pi_n which contains the quantum numbersand has to be rewritten.

All the classes that administrates the walkers (walkerContainerClass, loadBalanceThreads,sortWalkers and walkerDistribution), and the runSimulation class wouldbe left unchanged.

107

Page 108: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Part VI

Results

108

Page 109: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

In this part we discuss the results of a series of simulations with the FCIQMCalgorithm and the optimized algorithm i-FCIQMC. We test the algorithm, dis-cuss its advantages and disadvantages and compare it to other numerical meth-ods, and we have also made a few predictions for different open shell systems.

The first chapter is devoted to testing and validating the program, and we showthat our code reproduces known results with a high accuracy. In the next twochapters, we look at how the code performs with different systems with a vary-ing degree of correlation and a different number of particles. In the fourth andfifth chapter we look closer at different methods to optimize the algorithm.Morespecifically, we study the convergence of the results of simulations with i-FCIQMC, with both the plain harmonic oscillator basis and with a Hartree-Fock basis. In the sixth chapter we calculate the extrapolated energies of dif-ferent open shell systems and compare the results to Diffusion Monte Carlo(DMC) resuls. We also discuss the validity of the extrapolation formula anddiscrepancies between our results and the DMC energies.

At last we summarize and discuss our results together with what we believe areinteresting furure prospects.

109

Page 110: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 20

Validating the code

20.1 Introduction

To validate the code we have found some cases where we know the “correct” outcome of asimulation. In some cases there exist closed form expressions which provides us with theexact result and in other cases we have compared with values from other numerical methodswhich ought to give the same outcome. We know that the FCIQMC energy should convergeto the Full Configuration Interaction (FCI) energy within a given Hilbert space. An obviousway to validate the code is therefore to compare our results with FCI energies. We havecompared our energies to the results of Refs. Kvaal 2006 [15], Rontani et. al. (2006) [29]and Olsen (2012) [20] which have performed FCI simulations with the same Hilbert spacesas we study. In the case of the two particle quantum dot, the closed form expression ofthe energy for certain values of the oscillator frequency ω is known [37]. For example,the two particle ω = 1 quantum dot has a ground state energy of exactly 3 Hartree (H).Because of the relatively small dimensionality of the Hilbert spaces of this system, we cando simulations with a high number of shells and a high accuracy.

The situation is different for the initiator adaption of the algorithm, i-FCIQMC. Wedo not even know the closed form expression of the underlying projection operator, andconsequently it is difficult to find any good test cases. The only method we have foundto test our implementation is to check that the energies actually converge to the FCIQMCvalue in the limit of a high number of walkers and a low initiator limit.

20.2 FCIQMC

20.2.1 A simple system, two electrons in two shells

The first test to validate the code was to compare with the FCI ground state energy of thetwo particle system in two shells with an oscillator frequency ω = 1. In two shells, the singleparticle basis consists of only six spin orbitals

{ϕ1, ϕ2, ϕ3, . . . , ϕ6}, (20.1)

and the Hilbert space is spanned by the three determinants which have a total spin andmagnetic quantum number equal to zero

H = {∣ϕ1, ϕ2⟩, ∣ϕ3, ϕ6⟩, ∣ϕ4, ϕ5⟩} = {∣1⟩, ∣2⟩, ∣3⟩}. (20.2)

110

Page 111: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

The Hamiltonian matrix is a 3 × 3 matrix with the elements

Hi,j = ⟨i∣H ∣j⟩, i, j ∈ [1,3], (20.3)

The numerical value of the matrix elements is generated with OpenFCI, and we find theground state energy to be 3.15233 . . .H , a result which is reproduced with our code.

20.2.2 Comparing FCIQMC energies and FCI energies

The next test was to compare FCIQMC energies to the results of Refs. [15, 20, 29] whichhave used FCI to calculate ground state energies of parabolic quantum dots. In Tab. 20.1,the results of a small series FCIQMC runs are listed and compared with FCI results. TheFCI results was in most cases reproduced with a small error in the range of 0.6 mH or less.The exception is the simulations of the 5 particle quantum dots with R = 5, where the FCIenergies are significantly lower. Note that the results still agree to within 1 mH , and thatthe FCI results for the same system are reproduced with R = 7. When the differences are sosmall, it is difficult to discuss them further without an error estimate for the FCI results.

All Refs. have used the Lanczos algorithm, which is an iterative procedure where a tridi-agonal matrix which is similar to the Hamiltonian matrix is constructed. The eigenvaluesof this matrix are expected to converge to the energy spectrum of the Hamiltonian. Whenthe difference between the estimated ground state energy from one iteration to the next issmaller than some preset value δk, the simulation is assumed to have converged. But δk doesnot set an upper bound for the error. Olsen(2012) [20] demonstrated that for some systemsthe energy seems to converge to one value before it suddenly drops and converges to the“real” ground state value. As an example, for the four particle quantum dot with m = s = 0and ω = 1/

√6, Refs. [15, 29] found a ground state energy of approximately 0.6581H while

the “true” value is 0.0016H lower at 0.6566H . In this case, a δk smaller than 10−7H wasneeded for the simulation to converge to the lower value (which was the same groundstateenergy as the FCIQMC algorithm found for this system). The convergence criteria for theenergy δk is only provided by Olsen [20], which used a value of 10−6H/ω2 in most simu-lations. Although it is possible to estimate the Lanczos error [8], only Olsen has discussedthis subject, and none of the references have included the errors of their results.

R = 5 R = 5 R = 5 R = 7 R = 7 R = 7N ω m 2s ⟨S⟩ ⟨Ep⟩ FCI ⟨S⟩ ⟨Ep⟩ FCI

2 1 0 0 3.0140(6) 3.0136(1) 3.01363 (†) 3.0091(4) 3.0091(1) 3.00924 (†)

2 1/4 0 0 0.9334(2) 0.9335(1) 0.933399 (†) 0.9323(2) 0.9323(1) 0.932331 (†)

3 1/16 1 1 0.69029(4) 0.69025(8) 0.690300 (†) 0.69008(5) 0.69021(9) 0.690159 (†)

3 1/16 0 3 0.69087(3) 0.69089(2) 0.690893 (†) 0.69080(3) 0.69079(2) 0.690789 (†)

4 1/36 0 0 0.65672(5) 0.6562(4) 0.656630 (∗) 0.65546(5) 0.6557(6) 0.655454 (∗)

4 1/36 0 2 0.65674(4) 0.6563(3) 0.65669 (‡) 0.65551(5) 0.6550(5) 0.65550 (‡)

5 1/4 0 5 5.2887(1) 5.2886(1) 5.28773 (†) 5.2825(1) 5.2825(1) 5.28248 (†)

5 1/16 0 5 1.84080(4) 1.8409(1) 1.83971 (†) 1.83132(4) 1.8314(2) 1.83141 (†)

Table 20.1: Here and m,s and ω are the magnetic quantum number, the spin and the oscillatorfrequency, andR+1 the number of shells. ⟨S⟩ and ⟨Ep⟩ are the statistical and generational estimator,and energies are in units of Hartree. The FCI energies are provided by [15] (†), [29] (‡) and [20](∗). Note that the number of digits of the FCI energies does not reflect the accuracy of the results.

111

Page 112: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

20.2.3 Testing FCIQMC energies against analytical results

In the article by Taut [37], it is shown that the ground state energy of the two particlequantum dot with ω = 1 is exactly 3H . We have performed a series of simulations withR = 5,10,15,20,25 and 30 to check whether the energy converges towards the exact result.The energy is improved every time we increase the number of shells, and with R = 30the energy is approximately 2mH too high. Also note that, as will be discussed later, theextrapolated energy (using Eq. (5.11)) yields an energy 3.0000(1)H . The results are listedin Tab. 20.2 and illustrated in Fig. 25.2.

R ⟨S⟩ ⟨EP ⟩

5 3.0133(6) 3.00136(1)10 3.0059(6) 3.0063(2)15 3.0037(7) 3.0036(2)20 3.0028(8) 3.0028(2)25 3.0019(4) 3.0021(1)30 3.0016(3) 3.0018(1)

Table 20.2: Simulations with two particle quantum dots with spin and magnetic quantum numberm = s = 0 and different number of shells R+1 in the basis. All listed energies have units of Hartree.The exact result in the limit R →∞ is 3 Hartrees.

20.3 i-FCIQMC

To ensure that the i-FCIQMC energy has converged, a series of simulations must be runwith an increasing number of walkers. When both ⟨S⟩ and ⟨EP ⟩ are converged to the sameenergy, we can assume that the energy has converged to the FCIQMC value. Based on theresults of Ref. [4], we would also expect this to happen with a number of walkers that issmaller that NC . We have observed this behaviour for all i-FCIQMC simuations that wehave performed. As an example we will look at the 5 particle quantum dot with ω = 1and 2s = m = 1 in 9 shells. We have used the FCIQMC result with 5 × 105 particles as abenchmark for the energy. The FCI space consists of 6.5×105 determinants and the criticalnumber of walkers is approximately 1.3×105. As we see from Fig. 20.1, FCIQMC must berun with at least the critical number of walkers to converge while the i-FCIQMC energiesconverges at a much lower number of walkers. Already at 104 walkers the i-FCIQMCenergy is within a few mH from the FCIQMC result, and as the number of walkers isincreased the errorbars gets smaller.

112

Page 113: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

(a) NI = 1

(b) NI = 2

(c) NI = 3

Figure 20.1: Simulations for systems with 5 particles, 9 shells, magnetic quantum number and spinm = s = 1 and a Hilbert space with a dimensionality dim(H ) = 6.5 × 105. The critical numberof walkers is NC ≈ 1.3 × 105. Here ⟨S⟩ is the generational estimator and ⟨EP ⟩ is the projectedestimator while conv is the “exact” FCI value at 14.9830(5)H . Here we have used results from anFCIQMC simulation with 5 × 105 walkers as the exact energy. All simulations are run with 2 × 106

iterations.

113

Page 114: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 21

The statistical estimators

In this section we will discuss the behaviour of the generational estimator ⟨S⟩ and the pro-jected estimator ⟨EP ⟩. We have included results from simulations of different 2 particlesystems with 8 shells and different oscillator frequencies ω. Although these systems have avery small Hilbert space with only 104 determinants in the basis, the statistical estimatorsshow the same general behaviour as we have seen for other systems. We have run 4 simula-tions with 104 walkers which is well above the critical number of walkers that is necessaryfor the energies to converge. The value for ω is set to different values, 10.0, 1.0, 0.1 and0.01, otherwise all parameters are the same. The results are listed in Tab. 21.1 and as wesee, both the projected estimator ⟨Ep⟩ and the generational estimator ⟨S⟩ converges to theFCI value.

First, notice that the relative error (measured as a fraction of the total energy) of bothestimators gets larger for smaller ω. This is a general trend in our simulations, and mightbe explained as a consequence of the degree of correlation in the systems. For high ω thesystem is weakly correlated, and excitations will be less probable. In this case, most of thewalkers will presumably be concentrated in a smaller part of the Hilbert space. In a stronglycorrelated system, the walkers will presumably be more spread out in the Hilbert space, andone can say (with a little sloppiness) that we are sampling a larger number of determinantswith the same number of walkers.

From Tab. 21.1 we also see that the projected estimator ⟨Ep⟩ gives the best energy esti-mate for large ω, while the generational estimator ⟨S⟩ does for small ω. This is illustratedin Fig. 21.1 where the fluctuations Ep gradually become larger than the fluctuations of S aswe decrease ω. There may be several reasons why the statistical estimators have a differentdependence of the oscillator frequency ω. First, the projected estimator does only dependon walkers that populates determinants that are connected to the reference determinant ∣D0⟩

while the generational estimator depends on the total population. This means that for mostsystems, the projected estimator are calculated on basis of a subset of the population. (Thisdoes not apply to the two particle system where all determinants are connected to ∣D0⟩).Second, the general estimator is sensitive to the total number of walkers while the projectedestimator is sensitive to the shape of the distribution. And third, the projected estimatoris extra sensitive to the number of walkers n0 on the reference determinant ∣D0⟩ since itappears in the denominator in the expression for the projected energy. If n0 gets to small,we would expect the projected estimator to have a large error. It should be commented thatsystems where the ∣D0⟩ component of the ground state is small, may require a very large

114

Page 115: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

population to acquire a sufficiently large n0.

ω ⟨n0⟩/⟨NW ⟩ ε⟨S⟩/ε⟨Ep⟩ FCI [20] ⟨S⟩ ⟨Ep⟩

10.0 0.69 20 – 23.6772(40) 23.6771(2)1.0 0.47 6 3.0092637. . . 3.0094(6) 3.0092(1)0.1 0.37 2.5 – 0.4413(10) 0.4412(5)

0.01 0.15 0.5 0.073835. . . 0.07387(3) 0.07380(6)

Table 21.1: The ratio of the population on the reference determinant to the total population⟨n0⟩/⟨NW ⟩ and ratio of the error of the generational estimator to the statistical estimator ε⟨S⟩/ε⟨Ep⟩increase as we decrease the oscillator frequency ω. Thus the generational estimator will give a bet-ter estimate of the energy than the projected estimator when ω is small. FCI energies were onlyavailable for ω = 1 and 0.1. All energies are in units of Hartree.

Having two different estimates for the energy is valuable as it heightens our confidencein the results. In fact, in the case that the estimators does not agree we can assume that thesimulations are not converged. The estimators are only, as we can see from their definitions,expected to give the same result in the case that the distribution of walkers resembles theground state of the given Hilbert space.

115

Page 116: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

(a) ω = 10

(b) ω = 1

(c) ω = 0.1

(d) ω = 0.01

Figure 21.1: The instantaneous value of the projected energy Ep(τ) and the shift S(τ) during5 × 104 iterations for simulations with different oscillator frequencies ω. All energies are in unitsof Hartree. The fluctuations in Ep(τ) becomes larger relative to the fluctuations in S(τ) as wedecrease ω. All simulations are with two particle quantum dots with spin and magnetic quantumnumber s =m = 0 and with eight shells in the basis.

116

Page 117: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 22

The scaling of the algorithm

In this chapter we will discuss how the algorithm scales with the basis size, the oscillatorfrequency (which is linked to the degree of correlation), the number of walkers and also thenumber of particles.

22.1 The critical number of walkers

The number of walkers NC that is necessary for the energy to converge is a system andbasis dependent parameter which we will refer to as the critical number of walkers. Thestrength of the FCIQMC algorithm is that NC often is much smaller than the number ofdeterminants in the basis dim(H ). The algorithm is only efficient for systems where theNC/dim(H ) ratio is small, and it is therefore of interest to study the dependency of thisratio on different parameters.

As demonstrated in Fig. 22.1 and described in section 8.5, the critical number of walkerscan be found by performing a simulation with a fixed shift S close to the ground state value.In the beginning of the simulation, the spawning events will be much more frequent than theannihilation events and the population will grow rapidly. But when the number of walkersis large enough, the annihilation events will become more probable, and the population willeventually reach a plateau.

If the number of walkers is smaller than NC , the long time average of the distributionof walkers will generally not converge to the ground state distribution. The annihilationbetween positive and negative walkers will be inefficient, and as we discussed in section8.5, annihilation is neccessary for convergence to the ground state.

As illustrated in Fig. 22.2, the critical number of walkers is both dependent on thedimensionality of the basis and the oscillator frequency ω. When the basis is truncatedon a higher shell number R, or when the oscillator frequency ω is decreased, the criticalnumber of walkers NC increases. This is not very surprising since the walkers presumablyare spread out on more determinants in both cases, either because more determinants areavailable in the basis or because the correlations between the electrons are stronger.

22.2 Scaling of the FCIQMC algorithm

We have found that the critical number of walkersNC has a linear relationship to the dimen-sionality of the Hilbert space dim(H ). This is illustrated in Fig. 22.3(a). This figure also

117

Page 118: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

(a) FCIQMC simulation with constant S ≈ E0

(b) FCIQMC energies.

Figure 22.1: FCIQMC simulations of 6 particle quantum dots with m = 2s = 0 and an oscillatorfrequency ω = 1. In plot (a) we see that the number of walkers NW reaches a plateau at NW ≈

9×105 which is the critical number of walkers NC . The population growth is still exponential whenNW > NC , but with a smaller exponent. As plot (b) shows, the FCIQMC (NI = 1) energy does notconverge before the number of walkers is close to NC . The energies are in units of Hartree (H)

shows that NC increase faster as a function of dim(H ) for systems with a low oscillatorfrequency ω. As an example, the three particle quantum dot with ω = 0.25 requires a NC

which is close to 20 times as large as for the ω = 1 quantum dot.The slope of NC as a function of dim(H ) for a given system is a measure of the

efficiency of FCIQMC. Since the run time of a simulation is roughly proportional to thenumber of walkers, it is a direct measure of the computational cost. Fig. 22.3(b) showsthe numerical value of the slope for different quantum dots with the same ω. As this plotillustrates, some of the systems scales more favourably than others. The extremes are the3 and 4 particle quantum dots, where the slopes differs by two orders of magnitude. Itis interesting to notice that the four particle system is a difficult system for the Lanczosalgorithm (FCI) as well. This is discussed by Ref. [20] and in section 20.2.2.

118

Page 119: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

(a) Simulations with different R.

(b) Simulations with different ω.

Figure 22.2: Simulations of 3 particle quantum dots with a fixed shift S ≈ E0 and a spin andmagnetic quantum number m = 2s = 1. The critical number of walkers NC is marked by a plateauin the number of walkers. NC increase when the shell number R is increased or when the oscillatorfrequency ω is decreased. The reason that the population is less smooth here than in Fig. 22.1 is thatNC is smaller and consequently the statistical fluctuations become larger.

119

Page 120: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

22.3 Concluding remarks

We have observed that the critical number of walkers is approximately linearly dependentof the basis size NC ≈ sdim(H ). The slope s is a system dependent parameter whichincreases when ω is decreased. Based on our results we can not see any relationship betweens and the number of particles in the system. This is a weak result since we only havetaken the slope of NC for four systems. As we discussed in section 18.3 the run time isapproximately linear with the number of walkers. This means that the algorithm scales asO(dim(H )).

120

Page 121: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

(a) NC as a function of dim(H ) for 3 particle quantum dots with m = 2s = 1.

(b) The slope of NC as a function of dim(H ). ω = 1 for all quantum dots.

Figure 22.3: (a): Simulations of 3 particle quantum dot with a magnetic and spin quantum numberm = 2s = 1 with different oscillator frequencies ω. The critical number of walkersNC was calculatedwith a fixed shift S ≈ E0. The critical number of walkers is plotted against the dimensionality of theHilbert space, and as we see there is a linear relationship, but with a different slope for different ω.(b): The slope of NC as a function of dim(H ) is a measure of how easily the system is threated bythe FCIQMC algorithm. The slopes have been calculated with a fixed shift S which is approximately1% higher that the ground state energy.

121

Page 122: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 23

Convergence of the i-FCIQMCenergies

Simulations with the initiator adaption of FCIQMC converges with a number of walkersNW less than the critical number of walkers NC , but at the cost of introducing an initiatorerror. As we discussed in chapter 9, the initiator error will disappear when the number ofwalkers NW is large enough. By running a series of simulation with an increasing numberof walkers, we would therefore expect the energy to converge as the initiator error becomessmall. This provides us with a simple procedure to find the unbiased energy.

As an example, we will look at simulations of a five particle quantum dot with spin andmagnetic quantum numbersm = 2s = 1 and with 24 shells in the basis. The Hilbert space ofthis system has a dimensionality dim(H ) = 3.5 × 109, and the critical number of walkersis NC ∼ 3 × 108 assumed that NC scales linearly with dim(H ). We have run one series ofsimulations with an initiator threshold 1 NI = 4 and one with NI = 12, and with a varyingnumber of walkers in the rangeNW ∈ [5×104,2×106]. The results are plotted in Fig. 23.1.

At a low number of walkers the initiator error is large, but eventually the energies seemsto have converged within the statistical fluctiations. This happened at NW = 4 × 104 forthe NI = 4 simulations and at NW = 8 × 104 for the NI = 12 simulations. This is betweentwo and three orders of magnitude less than NC , and demonstrates that i-FCIQMC is a veryefficient optimization for this system.

With NI = 4 and NW ≤ 4 × 104, the distribution of walkers did not equilibriate. Thiscould be observed by monitoring the population of the reference determinant n0 whichfluctuated around zero. We believe that the reason is that the density of walkers was too lowfor efficient annihilation, similar to what happens in a FCIQMC simulation when NW <

NC . This did not happen withNI = 12, in which case n0 was stable already atNW = 2×104.The simulations converged at a lower number of walkers when we used a high NI , but atthe cost of a large initiator error. In fact, both with NI = 4 and NI = 12 approximately8 × 105 walkers was required before the energy could be established with an error smallerthan one mili-Hartree.

As we have demonstrated here, the i-FCIQMC energies converge when we increase thenumber of walkers. In our simulations we have assumed that the energies are convergedwhen the following criteria are fulfilled:

1Remember that the initiator threshold NI is the population limit where a determinant is added to theinitiator space. This was discussed in chapter 9.

122

Page 123: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

(i): The statistical estimators ⟨S⟩ and ⟨EP ⟩ yields the same result.

(ii): The statistical estimators are constant within the statistical error when we increase thenumber of walkers.

We have chosen to use small values for NI less than or equal to four in all simulations. Thereason is twofold. First, using a large NI is an uncontrolled approximation, and we do notknow how it affects our results. Second, our experience is that even though the simulationsconverge at a lower number of walkers with a large NI , the initiator error may be large, andthe number of walkers that is needed for the energies to converge to the FCI energy may bethe same or even larger.

123

Page 124: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

(a) NI = 4

(b) NI = 12

Figure 23.1: Simulations of a five particle quantum dot with 24 shells in the basis and with magneticand spin quantum numbers m = 2s = 1. The vertical axis are in units of Hartree. All runs areperformed with the same number of iterations (2×106). For this system the dimension of the Hilbertspace is dim(H ) = 3.5×109 and the critical number of walkers isNC ∼ 3×108. We have plotted thegenerational estimator ⟨S⟩ and the projected estimator ⟨EP ⟩ as a function of the number of walkersNW with different initiator thresholdsNI . Conv is the best i-FCIQMC result. Note that the energiesconverge at NW << NC .

124

Page 125: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 24

Simulations with a Hartree Fockbasis

As we have seen, FCIQMC and i-FCIQMC enable us to calculate the FCI energies of sys-tems which are far out of the scope of conventional diagonalization methods like the Lanc-zos algorithm. But we have also seen that the critical number of walkers together with thenumerical cost, increases very fast as we increase the number of shells or the number ofparticles. In an attempt to improve the convergence we have looked at the effect of using aHartree- Fock (HF) basis instead of the plain harmonic oscillator (HO) basis. We have runtests with a six particle R = 9, ω = 1,m = s = 0 quantum dot with both the HF basis and theHO basis to compare the results. Since the HF basis is simply a unitary transformation ofthe HO basis, we would expect to get the exact same energies.

The first test was to find the critical number of walkers NC . Surprisingly, NC was alittle higher with the HF basis than with the HO basis, with NC ≈ 8× 106 and NC ≈ 9× 106

respectively. This indicates that the plain FCIQMC algorithm would require approximatelythe same number of walkers to converge with both the HF basis and the HO basis.

The next test was to run two series of i-FCIQMC simulations with identical run timeparameters, one with the HF basis and one with the HO basis. The results are plotted inFigs. 24.1 and 24.2 and clearly shows that the statistical errors becomes much smaller withthe HF basis. Figure 24.2 shows that the statistical error of the projected energy is almostone order of magnitude smaller with the HF basis than with the HO basis. In fact, since thenumerical error is proportional to

ε∝ n−1/2, (24.1)

where n is the number of iterations, we would need 100 times as many iterations to reducethe error with one order of magnitude. And in this sense, implementing the HF basis is alarge optimization.

The total run time of these simulations were relatively small. As an example, the totalrun time withNW = 5×104 on 32 cores was approximately 19 hours (36 minutes wall time).The energy of this simulation were converged and the projected estimator had a statisticalerror of 0.4 mili-Hartree (H). As a comparison, Olsen [20] have run simulations with theexact same system, but with a HO basis with effective interactions 1 . This simulation spent

1 The HO basis with effective interaction is a transformed HO basis, and was shown by Olsen [20] to speedup the convergence of the Lanczos algorithm considerably. Effective interactions are explained by Ref. [15].

125

Page 126: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

a total run time of 13500 hours. Although the FCI simulation maybe would converge fasterwith a HF basis, this results clearly demonstrates that i-FCIQMC is much more efficient forthis system.

Note that we have only performed simulations with a HF basis on this particular system,and we have yet to test how it works with other systems.

(a) HO basis.

(b) HF basis.

Figure 24.1: These plots shows the convergence of the projected estimator ⟨EP ⟩ and the genera-tional estimator ⟨S⟩ for simulations with six particles, m = s = 0, an oscillator frequency ω = 1,an initiator threshold NI = 3 and a basis truncated at ten shells. The exact value (Conv.) is takento be the energy with the smallest error. Note that the y-axis of the lower the plot are zoomed into a smaller scale. The simulations with the HF basis have a much smaller statistical error than thesimulations with the HO basis.

126

Page 127: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

(a) Convergence of EP

(b) The statistical error of ⟨EP ⟩

Figure 24.2: These plots shows the convergence of the projected energy for simulations with sixparticles, m = s = 0 an oscillator frequency ω = 1, an initiator thresholdNI = 3 and a basis truncatedat ten shells. The exact value is taken to be the energy with the smallest error. We have run thesimulations both with the harmonic oscillator (HO) basis and the Hartree Fock (HF) basis. Thefiltered Hilbert space of this systems has 2.3 × 107 determinants and the critical number of walkersis ∼ 8×106 for the HO basis and ∼ 9×106 for the HF basis. We see that the error is almost one ordersmaller for the simulations performed with the HF basis.

127

Page 128: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 25

Extrapolated energies

25.1 Introduction

The FCIQMC energies set an upper bound to the ground state energy, but are limited bythe basis set incompleteness of the FCI spaces. We have used the results of Ref. [16] andsection 5.3 to extrapolate the energies to the limit of a complete basis. Extrapolation of theenergy is common practice in quantum chemistry [12], and provides a systematic way ofimproving the energies.

In this section, we will calculate a set of extrapolated energies and compare these toDiffusion Monte Carlo (DMC) energies which are not affected by a basis incompletenesserror. We use the extrapolation formula Eq. (5.11)

E(R) ≈ a − bR

∑r=1

(N + r)r−c, (25.1)

where N is the number of particles, R + 1 is the number of shells and a, b, c ∈ R areconstants. A curve fit of the FCIQMC values to E(R) yields the optimal parameters a, b, c.The extrapolated energy is taken at the limit R → ∞, and the error is estimated using Eqs.(13.18) and (13.22) assuming that Eq. (25.1) is exact.

As we discussed earlier, the extrapolation formula has an uncontrolled error ∝ ν(R)

where ν(R) is an unknown function. ν(R) is however assumed to fall off quickly as afunction of R. This is justified by the results of Kvaal [16] together with general consid-erations about the form of the function. As we will see in this section, this assumptionseems to hold well for the systems that we have threated. To minimize ν(R) and reduce theextrapolation error, we have only used energies calculated with R ≥ 5.

25.2 Testing the extrapolation formula

Fig. 25.1 shows the fitted curves of the extrapolation formula to energies from a series ofsimulations. All energies are calculated with i-FCIQMC with an initiator threshold NI = 4and a different number of walkers NW to assure that the energies are properly converged.The correspondence between the data points and the fitted curves are very good, indicatingthat Eq. (5.11) applies well to the direct product spaces and that ν(R) indeed is small.This impression is strengthened by the numerical values of the extrapolated energies of

128

Page 129: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

the 2 and 6 particle quantum dots with an oscillator frequency ω = 1 which shows a goodcorrespondence with the results of Refs. [24, 20, 37]. The extrapolated energy of the twoparticle quantum dot is 3.0000(1) Hartree (H) which is very close to the exact result of3H [37]. The extrapolated energy for the 6 particle quantum dot is 20.160(1)H whereasthe DMC result is 20.1597(2)H and the coupled cluster 1 result is 20.1582 [24]. Theconvergence of the energy for the two and six particle systems are illustrated in Fig. 25.2.

25.2.1 Open shell results for ω = 1/1.892

We have run a series of simulations in an attempt to reproduce the results of Pederiva et.al. (2000) [22, 23]. Pederiva et. al. have run DMC simulations with single and multideterminant wave functions on open shell systems. These results are as far as we know notreproduced in any other articles, and it is therefore interesting on its own to find out whetherFCIQMC yields the same results. Even if the DMC calculation minimize the energy for agiven set of nodes, the nodes imposed by the guiding wave function is an uncontrolledapproximation. FCIQMC on the other hand is free of approximations and is systematicallyimprovable, but is limited by a much higher computational cost. As we see from Tab. 25.2,the results for the two particle quantum dot is in good agreement with the DMC results. Thethree and five particle results are however significantly lower. We also see that the lowestFCIQMC value is lower than the DMC values for the three and four particle systems, andsince our energies are variational, this indicates that the DMC values are too high.

Np m 2s E(∞) Lowest FCIQMC DMC (Ref. [22, 23])

2 0 0 1.0219(2) 1.0222(1) 1.02164(1)3 1 1 2.2314(3) 2.2326(1) 2.2339(1)4 0 0 3.7138(3) 3.71508(2) (*)5 1 1 5.5302(2) 5.5327(3) 5.5338(1)

Table 25.1: Open shell results with a different number of particles NP and with an oscillatorfrequency ω = 1/1.892. The three and the five particle results are significantly lower than the DMCresults. Since the lowest FCIQMC energies are variational, this suggests that the DMC results aretoo high for these systems. The result marked with (∗) is not available. We found that there existsan erratum [23] to the article by Pederiva et. al. [22] where they correct some of the energies. Herethey write that the energies of the four particle states with m = s = 0 and m = 0,2s = 2 are nearlydegenerated, and that the m = 0,2s = 2 state is the ground state with an energy 3.7145(1)H . Theenergy of the m = s = 0 state in the first article was not correct. We unfortunately found out too lateto do simulations with the m = 0,2s = 2 state.

25.2.2 Open shell results for ω = 1

We have also included the open shell results of the ω = 1 simulations for up to six particles.Only the closed shell results (with two and six particles) have been found in publishedarticles [24, 20, 37]. And as we already have discussed, these results correspond very wellwith our FCIQMC energies.

1The coupled cluster energies was obtained with CCSD(T) and a basis with effective interactions. We havenot written about the coupled cluster method in this thesis, but a good introduction is provided in Ref. [33].

129

Page 130: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

NP m 2s E(∞) Lowest FCIQMC DMC (Ref. [24])

2 0 0 3.0000(3) 3.0018(1) 3.00000(3)3 1 1 6.3564(2) 6.3596(3)4 0 0 10.2635(5) 10.2684(4)5 1 1 14.9489(6) 14.9570(7)6 0 0 20.160(1) 20.171(2) 20.1597(2)

Table 25.2: Open shell results with a different number of particles NP and with an oscillatorfrequency ω = 1. We have only found published energies for the closed shell results. These resultsare reproduced by FCIQMC.

25.3 Summary and Comments

This chapter contains two main results that we want to emphasize. The first concerns the va-lidity of the extrapolation formula (5.11) and the second concerns the discrepancies betweenthe DMC energies and the FCIQMC energies for the open shell quantum dots.

As we discussed in section 5.3, Kvaal [16] has derived a closed form expression for thebasis incompleteness error. This expression has however an unknown factor (1 + ν(R))

where ν(R) is assumed to be negligible, and is only proved to be valid for the energy cutspaces. Kvaal has used FCI calculations to show that his formula applies well to variousthree, four and five particle quantum dots. But due to the high numerical cost of the FCImethod, he was only able to study these systems with “small” FCI spaces. The FCIQMCmethod has a much lower numerical cost, and we were therefore able to test Kvaal’s formulawith much larger FCI spaces. Our results indicate that Kvaal’s formula applies well to thedirect product spaces, and that the error ν(R) is negligible for the FCI spaces that we havestudied.

Next, we want to comment on the differences between the FCIQMC and the DMC re-sults. Our results indicate that some of the open shell DMC results of Pederiva et. al.(2000) [22] are to high. These are the three and five particle results for the ω = 1/1.892

quanum dots, for which we have seen that the DMC energies are significantly higher thanour FCIQMC energies. Furthermore, the FCIQMC energies are variational which indicatesthat the DMC energies are too high. The most important source of error in a DMC calcu-lation is the fixed node error, and it is therefore reasonable to assume that this is the reasonwhy the DMC energies are too high. This would suggest that the nodes need to be optimizedeither by using a multi determinant trial wave function or by finding a more optimal singleparticle basis. Note that Pederiva et. al. [22] have used single determinant wave functionsfor the three and five particle systems, and a single particle basis which is optimized usingDensity Functional Theory calculations.

130

Page 131: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

(a) ω = 1.

(b) ω = 1/1.892 ≈ 0.28.

Figure 25.1: Plots of the parametrized error ∆E = E(R) − E(∞) where E(R) is calculatedaccording to the extrapolation formula Eq. (5.11). R + 1 is the number of shells in the basis, ω isthe oscillator frequency and the error are in units of Hartree. The datapoints to which the curvesare fitted are plotted with errorbars. These are the FCIQMC energy minus the extrapolated energyat infinity E(∞). As we see, the correspondence between the parametrized energy E(R) and theFCIQMC energies is very good.

131

Page 132: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

(a) 2 particle results, ω = 1.

(b) 6 particle results, ω = 1.

Figure 25.2: These plots shows the convergence of the FCIQMC energies as we increase the numberof shells R + 1. The lines labelled “DMC” are the Diffusion Monte Carlo energies of Ref. [24], andthe lines labelled “Fitted curve” are calculated according to the extrapolation formula Eq. (5.11).For R →∞ the parametrized functions converge to 3.0000(1)H for two particles and 20.160(1)Hfor six particles. The exact results are 3H in the two particle case and in the six particle case the bestvalue is the DMC result at 20.1597(2)H .

132

Page 133: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

(a) 3 particle results, ω = 1/1.892, 2s =m = 1.

(b) 5 particle results, ω = 1/1.892, 2s =m = 1.

Figure 25.3: These plots shows the convergence of the FCIQMC energies as we increase the numberof shells R + 1. The lines labelled “DMC” are the Diffusion Monte Carlo energies of Ref. [22,23], and the lines labelled “Fitted curve” are calculated according to the extrapolation formula Eq.(5.11). FCIQMC converges to lower energies than DMC [22, 23] which are 2.2339H for the threeparticle quantum dot and 5.5338(1)H for the five particle quantum dot. The data points representthe FCIQMC energies, and since these are variational the DMC energies appears to be too high.

133

Page 134: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Chapter 26

Conclusions and perspectives

We will in this chapter sum up our main achievements and results, and discuss prospects forfurther work.

26.1 Summation and achievements

Our initial motivation was to implement the FCIQMC algorithm and apply it to quantumdots. We have written a fully parallelized C++ code from scratch which is scaling well upto several hundred cores. This may be seen as our main achievement, and has been the partof this project in which we have invested the most work. In this part we have validated thecode by demonstrating that it reproduces FCI energies, and by showing that the i-FCIQMCenergies converge to the FCIQMC energies when the number of walkers is sufficiently large.We have also applied the algorithm on a new physical system, namely the two dimensionalquantum dots, which to our knowledge has not been studied with FCIQMC before.

We have found that the efficiency of the algorithm is highly system dependent. We usedthe ratio of the critical number of walkers NC to the number of determinants in the basisdim (H) as a measure of the efficiency of the algorithm. This is a valid measure since therun time of the simulations is roughly proportional to the number of walkers. The algorithmwas shown to scale as sdim (H ) where s is a system dependent parameter. We have foundthat s is larger for systems with a low oscillator frequency ω (strong correlations), but wewere not able to see any systematic relationship to the number of particles in the system.

We have also tested our implementation of the i-FCIQMC algorithm, and demonstratedthat for the five particle system with m = 2s = 1 and 24 shells in the basis, the algorithmconverged within mili-Hartree precision with less than 106 walkers while the critical numberof walkers NC was more than two orders of magnitude larger. We also did some runs witha Hartree- Fock (HF) basis for the six particle quantum dot with m = s = 0 and ten shells.Although the critical number of walkers did not decrease, the statistical error was measuredto be almost one order of magnitude smaller with the HF basis than with the HO basis.

At last, we estimated FCI energies in the limit of an infinite basis E(∞) by fitting theextrapolation formula Eq. 5.3 to FCIQMC energies. This formula was derived by Kvaal[16], but was only shown to be correct for energy cut spaces. Our results indicate that itapplies to direct product spaces as well. The parametrized curves show a seemingly perfectfit to the FCIQMC energies up to a high number of shells and the extrapolated energiesreproduce Diffusion Monte Carlo and Coupled Cluster results for the closed shell quantum

134

Page 135: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

dots [24, 23]. However, the Diffusion Monte Carlo results for open shell quantum dots withω = 1/1.892 [22, 23] was higher than the FCIQMC energies. Since the FCIQMC energiesare variational, this indicates that the DMC results are too high.

26.2 Ideas and prospects

As we saw in the last part, implementing the Hartree-Fock(HF) basis resulted in a muchfaster convergence of the FCIQMC energies. The first step to improve the performance ofthe program would therefore be to do simulations with an improved basis. In addition to theHF method, it is also possible to optimize the basis using more refined methods like DensityFunctional Theory calculations [12].

As the FCIQMC algorithm is a relatively new algorithm, it has only been applied to alimited range of systems. And since this algorithm has different strengths and weaknessescompared to other many-body methods, it might be possible to gain new insights by apply-ing it to new systems. To my knowledge, FCIQMC has been applied to a range of atomsand molecules (see for example [3, 4]), the homogeneous electron gas [34] and a range ofsolids [2], but not to nuclear systems.

One application of the algorithm that could be interesting is to study three-body forces.The number of Hamiltonian matrix elements increases drastically when three body forcesare included, and as a consequence, the numerical cost of methods like FCI or CoupledCluster blows up. Assumably, with the FCIQMC method, it might be possible to includethree-body forces without a large increase in the numerical cost. The reason is that the three-body interactions are less probable than the one or two body interactions. From a samplingperspective, this means that triple excitations should be sampled less often than the singleand double excitations. So even if the three body forces are numerically more expensive tosample, they will not necessarily add very much to the overall numerical cost. Note that thisis the same as we do when we sample the one-body and two-body interactions, and choosea high probability (ps) for the single excitations (see chapter 10).

26.3 Concluding remarks

As we have seen, the FCIQMC algorithm enables us to calculate FCI energies for systemswith Hilbert spaces that are far out of the scope of “brute force” diagonalization algorithmslike the Lanczos algorithm. But as we saw in the last chapter, the energy converges veryslowly as a function of the basis size. And although we can do simulations with largeHilbert spaces, the exact ground state can only be estimated by extrapolating the energiesto the complete basis. FCIQMC is a good complement to the Lanczos algorithm, which webelieve is more practical for “small” Hilbert spaces as it automatically calculates a spectrumof excited energies. Both of these algorithms provide good benchmarks for other many bodymethods that operate in a Slater determinant basis since they yield unbiased energies withina given Hilbert space.

We would also like to comment on the development of FCIQMC and related algorithms.As the algorithm is relatively new, we currently see a lot of development and new applica-tions of the algorithm. See for example the article by Booth et. al. (2013) [2] where thealgorithm is applied to a range of solids. Recently, several new algorithms have appearedwhich also do stochastic sampling of discrete Hilbert spaces with walkers. Examples are the

135

Page 136: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

stochastic extension of the Lanczos algorithm Shimizu et. al. (2013) [35], and stochasticcoupled cluster Thom (2010) [38]. This is an exciting field where there currently is manynew ideas and a lot of development happening.

136

Page 137: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Part VII

Appendix

137

Page 138: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Appendix A

Running the code

The code is wrapped in a python runFCIQMC.py script that generates a headerfile and a.ini file with run time parameters. Template parameters must be available at compile time.Therefore the bitset template parameter N, is written to the headerfile as a precompilatordefinition.

The following parameters must be set before each simulation

●: i_r: The number of shells in the basis −1.

●: i_maxndets: The maximum number of determinants that can be stored on each MPItask.

●: d_dt: The time step τ .

●: d_lambda: The interaction strength λ = 1/ω2.

●: i_ranseed:The random seed. If this parameter is set to −1, the random seed is setequal to the system time.

●: i_limit_nw: When the number of walkers reaches this limit, we start variyng theshift parameter to control the number of walkers.

●: i_num_loops: The total number of FCIQMC loops.

●: i_n_start_coll_e: The number of iterations where we start to collect energy.

●: d_ds: The initial energy shift S.

●: i_initiatorlimit: When the population of walkers on a determinant reaches thislimit, the determinant is added to the initiator space.

●: s_initial_state: The reference determinant and the initial state in our simula-tions. Ex: ∣ϕ0, ϕ2⟩ =’0,2’.

●: s_frozen_orbs: The frozen spin orbitals of the CAS. Ex: If the spin osbitals ϕ1, ϕ2

are frizen, we set this variable to ’1,2’.

●: i_active_orbs: The number of the highest spin orbital in the CAS space.

●: b_writeodata: Set to True to write the simulation data to file.

138

Page 139: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

●: d_detweight: The load weight parameter. Find the best value to optimize the loadbalancing.

●: d_redistlimit: The maximal relative difference between the load weight of twoMPI tasks before we redistribute the determinants.

●: i_numthreads: The number of threads. Overridden by the enviromental variableOMP_SET_NUM_THREADS.

The following example shows how the runtime parameters are set

#example run script runscript6particles.pyimport runFCIMC as rfrom math import sqrt

r.b_writeodata = True #write output data to file

r.i_maxndets = 1e7 #size of determinants arraysr.i_num_loops = 5e4 #number of loopsr.i_n_start_coll_e = 1e4 #start collecting energy

r.d_detweight = 1.4 # load balancing parameterr.d_redistlimit = 0.04 # relative load weight difference before

load balancing of MPI tasks

r.delta_t = 0.001 #timestepr.d_ds = 27 #initial energy shift

r.d_lambda = 1 # interaction strength (= 1/sqrt(omega))r.i_r = 10 # number of shells-1 in the basisr.s_initial_state = ’0,1,2,3,4,5’

r.i_initiatorlimit = 4 #i-FCIQMC initiarot limitr.i_active_orbs = 11 #active orbitals in the CAS 0,1,2,3,..,11r.frozen_orbs = ’0,1’ #frozen orbitals in the CAS

#the name of the simulations (and the outputfiles)simulationtag = ’6particles_example’#simulation tag set to yyyy_dd_mm_ss by defaulth in not specifiedr.geninifiles(simulationtag)

.ini file and the header file can is created when we call the function geninifiles. Thecode can now be run from the command line with the following commands.

user@host:$ python runscript6particles.pyuser@host:$ make run

The outputdata will be stored to the file 6_particles_example.dat.

139

Page 140: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

Bibliography

[1] J. B. ANDERSON, A random-walk simulation of the schrödinger equation: H+3 , The

Journal of Chemical Physics, 63 (1975), p. 1499.

[2] G. H. BOOTH, A. GRUNEIS, G. KRESSE, AND A. ALAVI, Towards an exact descrip-tion of electronic wavefunctions in real solids, Nature, 493 (2013), p. 365.

[3] G. H. BOOTH, A. J. W. THOM, AND A. ALAVI, Fermion monte carlo without fixednodes: A game of life, death, and annihilation in slater determinant space, The Journalof Chemical Physics, 131 (2009), p. 054106.

[4] D. CLELAND, G. H. BOOTH, AND A. ALAVI, Communications: Survival of thefittest: Accelerating convergence in full configuration-interaction quantum montecarlo, The Journal of Chemical Physics, 132 (2010), p. 041103.

[5] H. FLYVBJERG AND H. G. PETERSEN, Error estimates on averages of correlateddata, The Journal of Chemical Physics, 91 (1989), p. 461.

[6] A. FOG, [software] CRandomMersenne version 2.01. 2010-08-03, 2013. A C++library to calculate random numbers using the Mersenne Twister algorithm. http://www.agner.org/random.

[7] E. GABRIEL, G. E. FAGG, G. BOSILCA, T. ANGSKUN, J. J. DONGARRA, J. M.SQUYRES, V. SAHAY, P. KAMBADUR, B. BARRETT, A. LUMSDAINE, R. H. CAS-TAIN, D. J. DANIEL, R. L. GRAHAM, AND T. S. WOODALL, Open MPI: Goals,concept, and design of a next generation MPI implementation, in Proceedings, 11thEuropean PVM/MPI Users’ Group Meeting, Budapest, Hungary, September 2004,p. 97.

[8] G. H. GOLUB AND C. F. VAN LOAN, Matrix Computations (Johns Hopkins Studiesin Mathematical Sciences)(3rd Edition), The Johns Hopkins University Press, 3rd ed.,Oct. 1996.

[9] E. GROSS, E. RUNGE, AND O. HEINONEN, Many-particle theory, A. Hilger, 1991.

[10] B. L. HAMMOND, W. A. LESTER, AND P. J. REYNOLDS, Monte Carlo Methods inAb Initio Quantum Chemistry, World Scientific, 1994.

[11] A. HARJU, Variational monte carlo for interacting electrons in quantum dots, Journalof Low Temperature Physics, 140 (2005), p. 181.

140

Page 141: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

[12] T. HELGAKER, P. JØRGENSEN, AND J. OLSEN, Molecular Electronic Structure The-ory, John Wiley & Sons, LTD, Chichester, 2000.

[13] M. H. KOLODRUBETZ, J. S. SPENCER, B. K. CLARK, AND W. M. FOULKES, Theeffect of quantization on the full configuration interaction quantum monte carlo signproblem, The Journal of Chemical Physics, 138 (2013), p. 024110.

[14] S. KVAAL, Analysis of many-body methods for quantum dots, PhD thesis, Universityof Oslo, Norway, 2008.

[15] S. KVAAL, Open source FCI code for quantum dots and effective interactions.arXiv:0810.2644v1, 2008.

[16] S. KVAAL, Harmonic oscillator eigenfunction expansions, quantum dots, and effec-tive interactions, Physical Review B, 80 (2009), p. 045321.

[17] D. W. MARQUARDT, An Algorithm for Least-Squares Estimation of Nonlinear Pa-rameters, SIAM Journal on Applied Mathematics, 11 (1963), p. 431.

[18] M. MATSUMOTO AND T. NISHIMURA, Mersenne twister: a 623-dimensionallyequidistributed uniform pseudo-random number generator, ACM Transactions onModeling and Computer Simulation, 8 (1998), p. 3.

[19] D. MUSSER, Introspective sorting and selection algorithms, Software Practice andExperience, 27 (1997), p. 983.

[20] V. K. B. OLSEN, Full configuration interaction simulation of quantum dots, Master’sthesis, University of Oslo, 2012.

[21] OPENMP ARCHITECTURE REVIEW BOARD, OpenMP Application Program Inter-face Version 3.1, 2011.

[22] F. PEDERIVA, C. J. UMRIGAR, AND E. LIPPARINI, Diffusion monte carlo study ofcircular quantum dots, Physical Review B, 62 (2000), p. 8120.

[23] , Erratum: Diffusion monte carlo study of circular quantum dots [physical reviewb 62, 8120 (2000)], Physical Review B, 68 (2003), p. 089901.

[24] M. PEDERSEN LOHNE, G. HAGEN, M. HJORTH-JENSEN, S. KVAAL, AND F. PED-ERIVA, Ab initio computation of the energies of circular quantum dots, Physical Re-view B, 84 (2011), p. 115302.

[25] M. A. REED, J. N. RANDALL, R. J. AGGARWAL, R. J. MATYI, T. M. MOORE,AND A. E. WETSEL, Observation of discrete electronic states in a zero-dimensionalsemiconductor nanostructure, Physical Review Letters, 60 (1988), p. 535.

[26] S. M. REIMANN AND M. MANNINEN, Electronic structure of quantum dots, Reviewsof Modern Physics, 74 (2002), p. 1283.

[27] P. J. REYNOLDS, D. M. CEPERLEY, B. J. ALDER, AND W. A. LESTER, Fixed-nodequantum monte carlo for molecules., The Journal of Chemical Physics, 77 (1982),p. 5593.

141

Page 142: Full Configuration Interaction Monte Carlo Studies of Quantum … · 2014-12-26 · Full Configuration Interaction Monte Carlo (FCIQMC) is an ab initio method to calculate ground

[28] P. RICHTER, Estimating errors in least-squares fitting, The Telecommunications andData Acquisition Progress Report 42-122, (1995), p. 107.

[29] M. RONTANI, C. CAVAZZONI, D. BELLUCCI, AND G. GOLDONI, Full configurationinteraction approach to the few-electron problem in artificial atoms, The Journal ofChemical Physics, 124 (2006), p. 124102.

[30] C. C. J. ROOTHAAN, New developments in molecular orbital theory, Rev. Mod. Phys.,23 (1951), p. 69.

[31] J. J. SAKURAI, Modern Quantum Mechanics (Revised Edition), Addison Wesley,2 ed., Sept. 1993.

[32] M. SCHLOSSHAUER, Decoherence: And the Quantum-To-Classical Transition, TheFrontiers Collection, Springer, 2007.

[33] I. SHAVITT AND R. BARTLETT, Many-Body Methods in Chemistry and Physics:MBPT and Coupled-Cluster Theory, Cambridge Molecular Science, Cambridge Uni-versity Press, 2009.

[34] J. J. SHEPHERD, G. H. BOOTH, A. GRUNEIS, AND A. ALAVI, Full configuration in-teraction perspective on the homogeneous electron gas, Physical Review B, 85 (2012),p. 081104.

[35] N. SHIMIZU, T. MIZUSAKI, AND K. KANEKO, Stochastic extension of the lanczosmethod for nuclear shell-model calculations with variational monte carlo method,Physics Letters B, 723 (2013), p. 251.

[36] J. S. SPENCER, N. S. BLUNT, AND W. M. FOULKES, The sign problem and popula-tion dynamics in the full configuration interaction quantum monte carlo method, TheJournal of Chemical Physics, 136 (2012), p. 054110.

[37] M. TAUT, Two electrons in an external oscillator potential: Particular analytic solu-tions of a coulomb correlation problem, Physical Review A, 48 (1993), p. 3561.

[38] A. J. W. THOM, Stochastic coupled cluster theory, Phys. Rev. Lett., 105 (2010),p. 263004.

[39] C. J. UMRIGAR, M. P. NIGHTINGALE, AND K. J. RUNGE, A diffusion Monte Carloalgorithm with very small time-step errors, The Journal of Chemical Physics, 99(1993), p. 2865.

142