Preconditioning and perturbative estimators in full configuration interaction quantum Monte Carlo
Nick S. Blunt, Alex J. W. Thom, Charles J. C. Scott

TL;DR
This paper introduces preconditioning and perturbative estimators in FCIQMC, significantly enhancing efficiency and accuracy by reducing noise and enabling larger time steps, demonstrated on benzene.
Contribution
It presents a novel combination of preconditioning with perturbative estimators in FCIQMC, improving efficiency and accuracy over previous methods.
Findings
Reduced statistical noise in perturbative corrections
Allowed larger time steps without errors
Achieved more accurate results for benzene
Abstract
We propose the use of preconditioning in FCIQMC which, in combination with perturbative estimators, greatly increases the efficiency of the algorithm. The use of preconditioning allows a time step close to unity to be used (without time-step errors), provided that multiple spawning attempts are made per walker. We show that this approach substantially reduces statistical noise on perturbative corrections to initiator error, which improve the accuracy of FCIQMC but which can suffer from significant noise in the original scheme. Therefore, the use of preconditioning and perturbatively-corrected estimators in combination leads to a significantly more efficient algorithm. In addition, a simpler approach to sampling variational and perturbative estimators in FCIQMC is presented, which also allows the variance of the energy to be calculated. These developments are investigated and applied to…
| System | Error/ | Error/ | % corrected | Error/ | % corrected | |
|---|---|---|---|---|---|---|
| C2 (equilibrium, cc-pVQZ) | 2.20(5) | 0.10(5) | 95(4) | 0.05(5) | 97(4) | |
| C2 (stretched, cc-pVQZ) | 3.0(1) | 0.3(1) | 89(6) | 0.5(1) | 82(5) | |
| Formaldehyde (aug-cc-pVDZ) | 4.0(1) | 0.3(1) | 93(4) | 0.02(22) | 100(6) | |
| Formamide (cc-pVDZ) | 7.2(3) | 0.8(3) | 112(8) | 0.6(4) | 108(8) | |
| Butadiene | 12.9(4) | 0.4(7) | 97(6) | 1.0(10) | 92(8) | |
| Hubbard model () | 4.6(1) | 0.6(1) | 87(4) | 0.51(5) | 89(3) | |
| Hubbard model () | 66.49(9) | 23.73(9) | 64.3(2) | 23.7(1) | 64.3(2) | |
| Method | Estimator | Energy / |
| CCSD(T) | -0.5813 | |
| CCSDT | -0.5817 | |
| CCSDT[Q] | -0.5826 | |
| CCSDT(Q) | -0.5845 | |
| FCIQMC | -0.5609(3) | |
| () | -0.5420(5) | |
| -0.597(14) | ||
| FCIQMC | -0.5612(3) | |
| (preconditioned, | -0.5435(5) | |
| ) | -0.5833(10) |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Preconditioning and perturbative estimators in full configuration interaction quantum Monte Carlo
Nick S. Blunt
Department of Chemistry, Lensfield Road, Cambridge, CB2 1EW, United Kingdom
Alex J. W. Thom
Department of Chemistry, Lensfield Road, Cambridge, CB2 1EW, United Kingdom
Charles J. C. Scott
Department of Chemistry, Lensfield Road, Cambridge, CB2 1EW, United Kingdom
Abstract
We propose the use of preconditioning in FCIQMC which, in combination with perturbative estimators, greatly increases the efficiency of the algorithm. The use of preconditioning allows a time step close to unity to be used (without time-step errors), provided that multiple spawning attempts are made per walker. We show that this approach substantially reduces statistical noise on perturbative corrections to initiator error, which improve the accuracy of FCIQMC but which can suffer from significant noise in the original scheme. Therefore, the use of preconditioning and perturbatively-corrected estimators in combination leads to a significantly more efficient algorithm. In addition, a simpler approach to sampling variational and perturbative estimators in FCIQMC is presented, which also allows the variance of the energy to be calculated. These developments are investigated and applied to benzene , an example where accurate treatment is not possible with the original method.
I Introduction
An important goal of quantum chemistry is the more accurate and routine treatment of strongly correlated systems. For weakly correlated systems, low-order coupled cluster (CC) theory is well motivated and extremely successfulRaghavachari et al. (1989); Bartlett and Musiał (2007), now pushing to larger systems through adaptations to reduce the scaling of the methodRiplinger and Neese (2013); Li et al. (2009); Eriksen et al. (2015). An ultimate goal is a similarly successful polynomial scaling method for strong correlation, and much work continues in this direction. There is a crucial need for better benchmarks to aid such development.
For this task, methods such as the density matrix renormalization group (DMRG) algorithmWhite (1992); Chan (2004); Olivares-Amaya et al. (2015), selected configuration interaction (SCI)Huron, Malrieu, and Rancurel (1973); Schriber and Evangelista (2016); Tubman et al. (2016); Holmes, Tubman, and Umrigar (2016); Garniron et al. (2017); Loos et al. (2018) and full configuration interaction quantum Monte Carlo (FCIQMC)Booth, Thom, and Alavi (2009); Cleland, Booth, and Alavi (2010); Spencer, Blunt, and Foulkes (2012) are important tools. Although they are relatively expensive compared to low-order CC, they are systematically improvable, and capable of providing near-exact benchmarks in regimes where other methods give unsatisfactory results. They are also useful beyond providing benchmarks, for example as complete active space (CAS) solvers in CASPT2 (CAS plus second-order perturbation theory) approachesZgid and Nooijen (2008); Ghosh et al. (2008); Thomas et al. (2015); Li Manni, Smart, and Alavi (2016); Smith et al. (2017), or in the case of DMRG, as the method of choice in 1D or quasi-1D systems. Approaches based on coupled cluster theory by including high-order clusters also show promise for this taskXu, Uejima, and Ten-no (2018).
The current FCIQMC algorithm is time limited far more than it is memory limited. On a large-scale cluster, a large FCIQMC simulation may take multiple days to run, yet use a small fraction of the memory available. Moreover, we usually encounter the situation where the final statistical error is multiple orders of magnitude smaller than systematic error [for example, see Table II of Ref. (Blunt et al., 2015a)]. This suggests that it may be possible to devise a faster FCIQMC algorithm in exchange for larger statistical noise, which would be a very desirable trade-off, and there are good reasons to believe that FCIQMC can be made substantially faster than the current algorithm.
We recently demonstrated that it is possible to calculate a second-order perturbative correction to initiator error in FCIQMCBlunt (2018). This correction can often remove over of initiator error in weakly correlated systems, and can be accumulated from existing information in FCIQMC, and therefore has little extra cost. However for large systems or small walker populations, we find that the associated statistical noise can be very large (the opposite situation to the noise on traditional FCIQMC estimators, described above, where statistical noise is small).
Here we propose a modified algorithm where this situation is greatly improved. Specifically, it is shown that FCIQMC can be performed with preconditioning, as commonly performed in quantum chemistry (and optimization problems generally), which allows the use of a much larger time step. This is achieved at the expense of performing multiple spawning attempts per walker, which limits the savings in computer time overall. However, this regime is highly beneficial for the calculation of the perturbative corrections, often reducing statistical noise by an order of magnitude or more, resulting in a far more efficient algorithm. As such, we show that preconditioning has limited benefits to convergence time in FCIQMC, but significantly helps the calculations of perturbatively-corrected estimators.
In addition, we introduce a more simple and efficient approach to sampling the variational energy, and also demonstrate that it is possible to sample the variance of the energy in FCIQMC, as commonly performed in variational Monte Carlo.
We recap FCIQMC in Section II. The use of preconditioning in FCIQMC is introduced in Section III, and then contrasted with the traditional approach in Section IV. A new approach to calculating estimators is discussed in Section V. Lastly, results are given in Section VI, investigating perturbative estimators and the preconditioned FCIQMC approach, with an application to benzene.
II FCIQMC
In FCIQMC the ground-state wave function is converged upon by performing imaginary-time evolutionBooth, Thom, and Alavi (2009), where the wave function obeys
[TABLE]
where is the Hamiltonian, denotes imaginary-time and is a shift which is slowly varied to control the walker population. This evolution is performed in a basis, , in which the components of obey
[TABLE]
In FCIQMC, as in other QMC approaches, the wave function coefficients are sampled by a collection of walkers. If we define the number of walkers on as , then the amplitude of each walker can be defined as . A stochastic algorithm to perform the above evolution can then be realized by the following steps:
Spawning: Loop over all occupied determinants, . For each walker on , choose one connected determinant, ( and ), with some probability . Then create a spawned walker on with amplitude . 2. 2.
Death: Loop over all occupied determinants. Each determinant spawns to itself with amplitude . 3. 3.
Annihilation: Sum together all current and spawned walkers on each occupied determinant to get the new coefficients, . 4. 4.
Rounding: For all determinants with an absolute amplitude, , less than , stochastically round the absolute amplitude down to [math] (kill the walker) with probability , or up to with probability .
It can be seen that the death step exactly includes the diagonal contribution to , while the spawning step corresponds to stochastically sampling off-diagonal terms. Rather than looping over all off-diagonal elements in the above summation, precisely one element is chosen for each walker, with some probability . The size of the spawned amplitude must then be divided by this probability to keep the algorithm unbiased, so that the average spawned weight is correct.
The shift, , is updated slowly to oppose changes in the walker population. This is done every iterations by
[TABLE]
where is a damping parameter, and is the total walker population.
Note that the above definition of the FCIQMC algorithm uses non-integer walker amplitudes, , as first suggested by Umrigar and co-workersPetruzielo et al. (2012). This differs from the original FCIQMC presentationBooth, Thom, and Alavi (2009), where integer values of were enforced. The use of non-integer coefficients improves the efficiency of the method. In the same workPetruzielo et al. (2012), Umrigar and co-workers also introduced a semi-stochastic adaptation, in which the projection operator is applied exactly within an important subspace (the deterministic or core space) and by the above stochastic algorithm otherwise, further reducing stochastic noise.
The energy is commonly estimated by
[TABLE]
where the subscript ‘[math]’ refers to the Hartree–Fock determinant or other reference state. A related estimator has been usedPetruzielo et al. (2012) where is replaced by a multi-determinant trial wave function, which again reduces stochastic noise in the estimates.
II.1 The initiator approximation and walker blooms
The above algorithm allows the exact FCI wave function to be sampled without bias. However, in practice a population plateau appears in the simulation, below which the fermion sign problem leads to uncontrollable noiseSpencer, Blunt, and Foulkes (2012). This plateau height therefore sets a minimum memory requirement on the simulation, which is typically much smaller than that required to store the FCI space, but which nonetheless grows exponentially with the system size. As such, the FCIQMC algorithm as stated above is still restricted to small systems.
To overcome this, Cleland et al. introduced the initiator approximation to FCIQMC, known as i-FCIQMCCleland, Booth, and Alavi (2010, 2011). In this, all determinants with a weight greater than are defined as initiators (with equal to or , typically). Initiators are allowed to spawn to any determinant, while non-initiators may only spawn to already-occupied determinants. Attempted spawnings from non-initiators to unoccupied determinants are removed from the simulation. An exception occurs if two non-initiators spawn to the same determinant in the same iteration, in which case the spawnings are allowed (the ‘coherent spawning rule’). When the semi-stochastic adaptationPetruzielo et al. (2012); Blunt et al. (2015b) is used, all determinants within the deterministic space are also made initiators. We note that in some cases this deterministic space may be large, in which case the initiator error can change significantly.
This initiator approach significantly reduces the sign problem in the method, allowing arbitrarily-small walker populations to be used. In exchange, an approximation is introduced, as the Hamiltonian is effectively truncated; the above approximation is equivalent to setting Hamiltonian elements between non-initiators and unoccupied determinants to zero. As the walker population is increased, the number of initiators and occupied determinants both increase, and i-FCIQMC tends towards the exact solution. Therefore, i-FCIQMC provides a systematic way to converge to the FCI limit.
An important concept in i-FCIQMC is that of a “walker bloom”. A bloom is defined as a spawning event with weight greater than , such that the new determinant instantly becomes an initiator. Such events should be avoided, as they lead to essentially random determinants being made initiators. Furthermore, with enough bloom events we find that the initiator space grows exponentially in , and a sign problem returns. This criterion is often used to set the time step, , which is chosen so as to prevent bloom events (or to allow only a small number to occur each iteration).
III FCIQMC with preconditioning
III.1 Algorithm definition
Imaginary-time evolution as described in Section II will converge to the ground state of only if is chosen to obey
[TABLE]
where and are the highest and lowest energy eigenvalues of , respectively. For large systems and basis sets, we find that this condition restricts the time step to be of order au, or even smaller. Typically, FCIQMC may take on the order of iterations for the initial transient to decay, allowing sampling of the ground state to begin.
Preconditioning is a commonly-used approach to speed up the iterative solution of a system of linear equationsAxelsson (1994); Beauwens (2004); Saad (2011). For an eigenvalue problem , an iterative solution may be obtained by
[TABLE]
where (or often ) is referred to as the preconditioner, and are best estimates of and from iteration , and is a step size. Setting and returns imaginary-time propagation as in FCIQMC. However, for an appropriate choice of , convergence can be sped up considerably. The most common choice is the Jacobi preconditioner, defined as , which is widely used throughout quantum chemistry, such as in the Davidson methodSaad (2011). It should also be noted that the update coefficients are essentially equal to those obtained through first-order perturbation theory.
We therefore suggest the following update equation for the FCIQMC:
[TABLE]
For consistency, we have again used to denote the step size. However, it should be emphasized that taking the limit does not result in the imaginary-time Schrödinger equation, and equal values of do not give equal rates of convergence with and without preconditioning, so care should be taken in comparisons.
Exactly as has been done for FCIQMC with imaginary-time propagation, it is simple to write down an FCIQMC algorithm for the above preconditioned evolution:
Spawning: Loop over all occupied determinants, , and for each walker perform spawning attempts. For each spawning attempt from , choose one connected determinant, ( and ), with some probability . Then create a spawned walker on with amplitude . 2. 2.
Apply the preconditioner to spawnings: Loop over determinants to which spawnings have occured. For a spawned walker on , multiply its amplitude by . 3. 3.
Death: Loop over all occupied determinants. Multiply each determinant’s amplitude by . 4. 4.
Annihilation: Sum together all current and spawned walkers on each occupied determinant to get the new coefficients, . 5. 5.
Rounding: For all determinants with an absolute amplitude, , less than , stochastically round the absolute amplitude down to [math] (kill the walker) with probability , or up to with probability .
Most of the algorithm is the same as for FCIQMC with imaginary-time evolution, and we will compare the two algorithms in Section IV. In particular, the annihilation and rounding steps are identical. The main differences are that spawned walkers now have the preconditioner applied, and the death step is also appropriately modified (simplified, in fact) to account for this same factor. We have also chosen to allow each walker to make spawning attempts, so that the amplitude of each spawned walker must be divided by the same factor to keep the algorithm unbiased. Here, is some integer equal to or greater. In previous applications of FCIQMC, this has always been taken as .
One may ask precisely when the evolution of Eq. (8) converges. Fixed points of this evolution are when , as desired. Theoretically, convergence is guaranteed provided the iteration matrix has a spectral radius less than , which is met for diagonally-dominant matrices (although this is not necessary). In practice, the proposed evolution is well established as being extremely successful. We have tested this for a range of systems, including both molecular and model systems with both weak and strong correlation, and have always found convergence to occur for au or smaller, and often with au.
The use of much larger time steps has an important consequence, which must be emphasized: the size of each spawned walker is proportional to , so that larger spawned walkers will be created with larger time steps. Having very large spawning events (i.e., larger than or so) can significantly increase the stochastic noise in a simulation. The use of multiple spawning attempts per walker () was introduced above as a way to counter this. The size of each spawned walker will be proportional to , giving a way to reduce the maximum spawning size by increasing . This will increase the cost per iteration, therefore reducing the savings of using a large , a point which we will return to.
We typically choose to initialize the wave function using configuration interaction singles and doubles (CISD), which is always feasible for systems currently amenable to FCIQMC. However, this is not required in general.
We note that this preconditioned approach is similar to a previous modification to FCIQMC and coupled cluster Monte CarloThom (2010); Franklin et al. (2016), changing the step taken by a quasi-Newton approachNeufeld and Thom , which though implementedHAN ; Spencer et al. (2018) has yet to be widely used. An alternative approach within a deterministic framework was considered by Zhang and EvangelistaZhang and Evangelista (2016), who considered a Chebyshev expansion of the exponential propagator.
III.2 Population control: intermediate normalization
As described in Section II, with imaginary-time evolution the walker population is typically controlled by a shift, , which is updated by Eq. (3).
With preconditioning, a more natural choice is intermediate normalization. Consider the projected energy estimator, , defined in Eq. (5), which is equally valid both with and without preconditioning. If we set the energy in the preconditoner to equal this estimate () then it can be seen that . If evolving with Eq. (8), it is then simple to check that the coefficient on remains exactly constant throughout. We note that need not be the Hartree–Fock determinant, and can also be updated during a simulation to match the most populated determinant. This choice of population control does not restrict the method to weakly correlated systems.
For to remain exactly constant, the estimate must be obtained from the spawnings made to from the latest iteration. It is helpful to use a deterministic space containing and its most important connections, to avoid the situation where no spawnings are made to in an iteration.
With this choice of population control, the walker population will grow in the early iterations of the simulation, settling down and fluctuating about a final value once convergence has been achieved. This makes choosing a final walker population more difficult than in the original scheme. However, this can usually be achieved by performing a preliminary test with a small initial population, and then scaling appropriately.
The above modification has an effect on the projected energy estimator, defined in Eq. (5), which should be noted: the population now remains exactly constant, and so is not a random variable. Typically in FCIQMC, one would average the numerator and denominator of Eq. (5) separately, and perform the required division after this averaging. Now that the denominator is constant, this separate averaging makes no difference. This deserves consideration, as in the original approach this estimator can theoretically be biased if performed as rather than (although any such bias is essentially negligible, in our experience). Does this preconditioned approach remove all such bias? We suspect that the answer is “no”, and that this theoretical bias is transferred to the sampling of , due to the applications of in the propagation (where is a random variable), and population control biasVigor et al. (2015) due to the aggressive updates to . However, we emphasize that any such bias seems to be essentially negligible in practice.
We note that this intermediate normalization approach has recently been used in a related QMC approach to coupled cluster theoryScott et al. (2019). A related approach to population control has also been used recently by Alavi and co-workers in FCIQMC with imaginary-time propagationAlavi et al. .
III.3 The initiator approximation
In preconditioned FCIQMC, the initiator adaptation is largely unchanged: initiators are defined as determinants with an absolute amplitude greater than , which is set to or , typically. Attempted spawnings from initiators are always accepted, but spawnings from non-initiators are only accepted if made to already-occupied determinants, else they are removed from the simulation. We again use the semi-stochastic adaptation, where all deterministic states are also defined as initiators.
We again emphasize the importance of avoiding bloom events in the initiator approximation. Given that can be made much larger compared to the original FCIQMC approach, it is important then to increase appropriately in order to avoid walker blooms. Avoiding these large spawning events is important in any QMC approach to control statistical noise, but is perhaps particularly important in the initiator adaptation, where such blooms lead to random determinants being given initiator status.
Lastly, we note that with large it is necessary to remove the ‘coherent spawning’ rule of the i-FCIQMC. That is, we do not allow simultaneous spawnings to an unoccupied determinant from two non-initiators to survive. For large , such events become a frequent occurrence, and we often encounter a sign problem re-emerging. Removing this rule has only a very small effect on the accuracy of the initiator approximation.
IV Comparison of FCIQMC with and without preconditioning
IV.1 Algorithm
Here we state the differences between the original and preconditioned FCIQMC approaches. Specifically, changes relative to the original FCIQMC algorithm are:
Once spawned walkers have been generated, the preconditioner must be applied to each. 2. 2.
In the death step, a factor of is applied to each walker coefficient, rather than shifting each coefficient by 3. 3.
The shift is replaced by a separate energy estimate, which is obtained from Eq. (5). This energy is not needed in the death step, but is instead required in the preconditioner. 4. 4.
In order to reduce the size of spawned walkers in the presence of a very large , we allow each walker to make spawning attempts. In the original approach, each walker only makes spawning attempt (i.e., ).
IV.2 Implementation
The use of preconditioning does not significantly change the implementation of FCIQMC, and only a few changes may be required to implement preconditioning in an existing FCIQMC code. In particular, all communication of spawned walkers is performed in the same manner. In both approaches, spawned walkers are held in a separate array to the current walkers. These spawned walkers are communicated to their parent process and annihilated to give a final merged spawning array, which we denote . This spawning array may then be annihilated with the main walker list, , to give the new walker coefficients. One can write down an expression for the expectation value of the spawning array ,
[TABLE]
where contains only off-diagonal elements in the basis set used. Importantly, only contains off-diagonal elements of because diagonal elements are accounted for separately by the death step. Note also that we have dropped the dependence in and for notational clarity later. This identification of the spawning array will be crucial in Section V for constructing more efficient energy estimators in FCIQMC.
In the preconditioned case, the factors of are then applied directly to the spawning array after it has been communicated and merged across processors, but before it is merged with the previous walker, list .
The diagonal Hamiltonian element can be calculated for the new determinant in time from the value of the parent walker on , which is always stored. Therefore, it is not required to perform a full construction of for each spawned walker, which would be expensive.
IV.3 An example: C2 cc-pVQZ
As a simple demonstration, in Fig. (1) we compare the convergence of C2 at equilibrium bond length, in a cc-pVQZ basis and with a frozen core, both with and without preconditioning. In both cases the simulation is initialized from the CISD wave function. For FCIQMC without preconditioning, we choose , and set the time step so as to prevent bloom events (giving au), which is the standard protocol in most current FCIQMC calculations. For FCIQMC with preconditioning, we first choose a time step of au and then choose so as to prevent bloom events. Note that the energy estimator used here is the projected energy estimator, , defined in Eq. (5).
It can be seen that, while FCIQMC without preconditioning requires iterations to fully converge, convergence with preconditioning is achieved within iterations. It is very important to emphasize, however, that the iteration time is roughly proportional to . Therefore, each iteration with is roughly times more expensive than without. Even with this taken into account, convergence is quicker with preconditioning than without, at least in this case. More careful comparison and discussion is given in Section VI.4.
V Improved estimators in FCIQMC
Separately from the above discussion of preconditioning in FCIQMC, we now discuss the calculation of improved energy estimators in FCIQMC, including perturbative corrections to initiator error. We emphasize that all of the following estimators can be calculated identically in both the original and preconditioned FCIQMC approaches. Although the following section is separate from the previous section on preconditioning in FCIQMC, we will show in Section VI.2 that the preconditioned approach greatly benefits the calculation of PT2-based estimators in FCIQMC, and so we will ultimately be interested in their application together.
V.1 Sampling variational energies without reduced density matrices
In addition to the projected energy estimators (comprising both projections onto single determinants and multi-determinant trial solutions), variational energy estimators have also been used in FCIQMCOvery et al. (2014); Blunt, Booth, and Alavi (2017):
[TABLE]
Consider the numerator. Because is a stochastic estimate, the replica trick must be used to ensure that this estimator is unbiased, as has been described elsewhereZhang and Kalos (1993); Overy et al. (2014); Blunt et al. (2014); Blunt, Alavi, and Booth (2015). In this, two independent FCIQMC simulations are performed, which we label and . Then the variational estimate can be obtained as
[TABLE]
where \big{\langle}\ldots\big{\rangle} denotes an average over the simulation after convergence, and we assume real coefficients throughout. We drop this averaging notation for clarity, but it should be understood that the numerator and denominator of each estimator is averaged (separately) over the simulation from convergence onwards.
In previous FCIQMC studies, Eq. (12) has been calculated as , where is the two-particle density matrix (2-RDM), whose calculation in FCIQMC was described in Refs. (Overy et al., 2014) and (Blunt, Booth, and Alavi, 2017). The efficient implementation of 2-RDMs in FCIQMC is involved, and their accumulation can slow the simulation down by a significant factor. In this study we therefore calculate and related quantities directly.
The two main large arrays in an FCIQMC implementation are (with components ) and (with components ) as defined already. is distributed across processes with the same mapping as , such that it is easy to take a dot product between and . In the following, we therefore write all estimators in terms of and , showing how they are efficiently calculated in practice. Again we emphasize that these arrays are constructed in the same manner for both original and preconditioned algorithms, so that all of the following applies for both approaches. In the preconditioned case, the preconditioner is applied to only after the following estimators are constructed.
may be calculated as
[TABLE]
and statistical errors can be reduced by making use of spawnings from both replicas:
[TABLE]
Note that only the expectation value of this estimator is variational. Instantaneous estimates are not.
V.2 Perturbative corrections to initiator error
Given that the variational energy estimator is based on an inexact wave function subject to the initiator approximation, we recently suggestedBlunt (2018) a second-order perturbative correction to this estimator
[TABLE]
where the summation is performed over all spawnings which are cancelled due to the initiator criterion, and there is a normalization factor of . From this, a total energy estimate can be defined as
[TABLE]
The above formula for was constructed by analogy with SCI+PT2, where configuration interaction is performed within a truncated space, beyond which a second-order Epstein-Nesbet perturbative correction can be constructed. Initiator FCIQMC can also be loosely seen as a truncated method, which allows the above estimator to be written down by analogy, making use of spawned walkers which are otherwise thrown away without use. However, a truncated space for i-FCIQMC is somewhat poorly defined, first because the space of occupied and initiator determinants is non-constant, and second because some unoccupied determinants are connected to both initiators and non-initiators (as such, the truncation is more precisely on the Hamiltonian, not the space).
To make this perturbative correction more rigorous, we consider a slightly different estimator, which we call , which can then be compared to for any deviations. Given the wave function within the initiator approximation, , it is possible to write down a more accurate wave function which we denote ,
[TABLE]
[TABLE]
where . An energy estimator based upon this improved wave function can then be written down as
[TABLE]
This expression can be expanded in terms of and components to give an estimator for use in FCIQMC. First the numerator,
[TABLE]
and similarly the denominator by
[TABLE]
As for , the cross terms including and can be averaged with both combinations of replicas and , both in the numerator and denominator.
It can be seen that all of the terms in are also included in . The connection of with perturbation theory is made precise in Appendix (A). However, a simple way to see this connection is to note that can be expressed as , where is the first-order Epstein-Nesbet correction to an appropriate zeroth-order wave function, . It is then simple to show that includes a second-order perturbative correction.
The estimator has the advantage that is requires no partitioning between a variational and non-variational space. Furthermore, takes the form , where and are both wave functions accessible from FCIQMC. This is the form of a traditional estimator in a QMC method, and avoids explicitly adding a perturbative correction. On the other hand usually has smaller statistical noise, and so is often more useful in practice.
Note that in Eq. (16), (24) and (26), we calculate using the projected energy estimator, . We could also use , but find that this makes little difference in practice [as is well separated from any , particularly for Eq. (16)].
V.3 Sampling the variance of the energy
Finally, we point out that it is simple to write the energy variance, , as efficient operations involving and , and therefore to sample in FCIQMC. Ignoring normalization,
[TABLE]
We emphasize that this is the standard energy variance, and not some measure of statistical error. The calculation of has been discussed already. The calculation of is performed (using replica sampling) as:
[TABLE]
Note that the expression for involves squaring the estimate of . However, this operation can be performed after averaging over the simulation, such that bias is not a concern here.
The energy variance could be useful as a measure of initiator error in i-FCIQMC. It could also be used to calculate improved excitation energies in i-FCIQMC by variance matchingRobinson, Pineda Flores, and Neuscamman (2017). In previous applications of excited-state FCIQMCBlunt et al. (2015a), the same walker population was used for ground and excited states. Since excited states require larger walker populations for similar accuracy, this leads to an imbalance in accuracy between the two states. We expect that variance matching could improve this situation, and could perhaps also benefit model space QMCTen-no (2013); Ohtsuka and Ten-no (2015) in the same way.
Figure (2) shows convergence of with iteration number (with preconditioning and au) and walker population per replica () for the Hubbard model at , on a periodic two-dimensional -site lattice at half-filling. The lattice is the same as that presented in Supplemental Material of Ref. (Blunt, Alavi, and Booth, 2015). As expected, tends to [math] as the walker population is increased and initiator error removed.
VI Results
The results are structured as follows. Example results for the perturbatively-corrected estimators are presented in Section VI.1. In Section VI.2 it is shown that the efficiency of such estimators is greatly increased by performing multiple spawning attempts per walker (large ). The effect of correlation of QMC data on perturbative corrections is discussed in Section VI.3, and the convergence time of FCIQMC with preconditioning is considered in Section VI.4. Finally, we show application to a larger example, benzene.
All molecular geometries are presented in supporting information. The geometry of formamide and benzene were taken from Ref. (Schreiber et al., 2008). The geometry for butadiene was taken from Ref. (Daday et al., 2012).
The initiator threshold was set to for all systems except for C2, where it was set to (for consistency with results in Ref. [Blunt et al., 2015a]).
The preconditioned approach was implemented in NECINEC , which was used for all FCIQMC results. Integral files were generated with PySCFSun et al. (2017). CC benchmarks were obtained with MRCCKállay et al. (2013); Bomble et al. (2005); Kállay and Gauss (2005). SCI+PT2 benchmarks were obtained using the SHCI approachHolmes, Tubman, and Umrigar (2016); Sharma et al. (2017) with DiceDic .
VI.1 Results for perturbative corrections to initiator error
Table 1 shows examples of the correction made by and relative to , for a variety of systems. Walker populations are chosen so that substantial initiator error exists in . Hubbard model calculations are performed at half-filling on the same lattice as used in Fig. (2). Hartree–Fock orbitals were used for molecular systems. Each error is calculated relative to either the exact FCI energy (for Hubbard model examples) or a very accurate extrapolated estimate (for molecular examples). Benchmarks for C2 are extrapolated SCI+PT2 values from Ref. (Holmes, Umrigar, and Sharma, 2017). We also obtained benchmarks for formaldehyde and formamide using extrapolated SCI+PT2 (for formamide, these SCI+PT2 calculations used orbitals optimized by performing active-active rotations in an SHCI calculation with a threshold of , as described in Ref. [Smith et al., 2017]). The benchmark for butadiene is an extrapolated DMRG+PT2 result of from Ref. (Guo, Li, and Chan, 2018a).
The molecular systems considered are weakly correlated and so the PT2 correction is expected to be effective, which is found to be the case. The correction here is typically , as was found in Ref. (Blunt, 2018). The correction is less effective for the Hubbard model as the coupling strength is increased.
Results for and are seen to be essentially identical within error bars. This is expected for the reasons discussed in Section V.2. However, the statistical error on is usually smaller than that on , so that is generally preferable (although some exceptions occur, particularly for model systems, as seen for the Hubbard model at in Table 1). has the disadvantage that its derivation involves a somewhat poorly-defined definition of a zeroth-order space within the initiator approximation. In practice, however, it gives essentially identical results to with a smaller noise.
It is also interesting to consider the convergence of each estimator in a simulation. An example is shown in Fig. (3) for formamide in a cc-pVDZ basis and with a frozen core . Preconditioning was used with parameters au and . The walker population was initialized from and grew to a final value of . It is found that converges more slowly than . Note also that is equal to at initialization. This is because this definition of the PT2 correction only has contributions from spawnings cancelled due to the initiator criterion. All walkers are initialized within the deterministic space and therefore are initiators, and so the PT2 correction as defined in Eq. (16) is initially [math]. Meanwhile initializes from a much lower energy since it takes the form , where is immediately a much better estimate than . However, both and converge to the same value once the simulation has equilibrated.
VI.2 Statistical error on perturbative corrections
Although and typically have a much smaller systematic (initiator) error than and , they tend to have a much larger statistical error (noise). This is sometimes manageable, but becomes severe for large systems and small walker populations. To see why, consider the PT2 correction as it appears in :
[TABLE]
The summation is over all spawnings cancelled due to the initiator criteria. A similar term appears in estimators and (where the summation is performed over all spawnings, which does not affect the following argument).
The space sampled by the spawnings and contains up to double excitations from the occupied space, which is very large in general. Because replica sampling is required, a contribution to can only be made if spawnings from both replicas occur to the same determinant in the same iteration. As the space sampled becomes larger, or the number of spawned walkers becomes smaller, this becomes increasingly rare.
The preconditioned approach here allows one to perform fewer iterations () with a larger number of spawning attempts per walker (). It can be shown that this approach leads to smaller noise on , and , and improved efficiency overall. This can be seen by the following argument. Roughly, we expect the statistical error on an estimator such as to obey
[TABLE]
where is the number of contributions to an estimate. Since a contribution is made only if two spawnings occur to the same determinant from two independent replicas, the number of contributions is roughly proportional to the density of spawnings,
[TABLE]
This is an upper limit which will become less accurate as the space spawned to becomes saturated, i.e. for large or a small number of orbitals. Assuming this holds, then
[TABLE]
However, for a total real simulation time the number of iterations performed scales as {N_{\textrm{iterations}}}\mathrel{\vbox{ \offinterlineskip\halign{\hfil#\cr\propto\cr\kern 2.0pt\cr\sim\cr\kern-2.0pt\cr}}}T/{N_{\textrm{spawn}}}. Since is averaged over all iterations, we also have . So for a constant simulation time , as is increased,
[TABLE]
and the efficiency (with respect to estimation of ) follows
[TABLE]
Therefore, performing multiple spawning attempts per walker provides one way to greatly reduce the error on , and . It should be emphasized that the following argument holds in FCIQMC both with and without preconditioning. However, preconditioning allows to be increased such that using a large value of will not lead to slow convergence or a long autocorrelation time, which is critical. Therefore, preconditioning with large values of and leads to a far more efficient algorithm overall.
Fig. (4) demonstrates the scaling of the statistical error estimate on for three systems: C2, cc-pVQZ at equilibrium bond length; Water, cc-pVQZ at equilibrium geometry; Ne, cc-pV5Z. Core electrons are frozen for each system. In each case is increased while holding constant and also holding constant (so that the final value of is fixed, and the total simulation time is approximately fixed). The reference population is held fixed as is increased, leading to final walker populations that are very similar. It is seen that increasing does indeed reduce the noise on . For example, with the error estimate for C2 is almost , which is reduced to with , and the scaling of Eq. (36) is approximately followed. This scaling is less accurate for Ne, where the number of orbitals is smaller (and so the space spawned to is smaller) and becomes saturated with spawned walkers more quickly.
VI.3 Autocorrelation length on estimators
Although and have larger noise than and , they have a significant advantage regarding the correlation of QMC data. This is demonstrated in Fig. (5) where the two systems studied are C2 and water, as defined in Section VI.2. To investigate the correlation of each estimator, we average each simulation into blocks of increasing length, and perform an uncorrelated error analysis using these blocks. This is simply the reblocking procedure, as described by Flyvbjerg and PetersenFlyvbjerg and Petersen (1989). Note that for the simulations of C2 and water, we took a total of and iterations to average over, respectively. Therefore even with a block length of , we used or data points to construct error estimates, to ensure that these estimates are reliable.
If the data is correlated then the error estimate grows with increasing block length, eventually plateauing when subsequent blocks become approximately uncorrelated. This effect is seen to be most significant for , where for water performing an uncorrelated analysis gives an error estimate of , compared to a more realistic estimate of . An uncorrelated analysis of gives an error estimate of compared to an accurate estimate of , a much smaller but still non-negligible difference. We observe similar behavior across all systems investigated: an uncorrelated analysis typically underestimates the statistical error on by a factor of , while for this factor is typically much larger.
For and , the error estimate remains roughly constant as the block length is increased, indicating that data is approximately uncorrelated. We observe this across all systems studied. This is helpful, as a reliable error estimate on and may be obtained after a relatively small number of converged iterations. We suspect the reason for this is that the error on and is dominated by the term such as that in Eq. (16), involving a weighted dot product across the two spawning arrays. Although the FCIQMC wave function is heavily correlated from iteration to iteration, spawned walkers are essentially uncorrelated from each other. They are only correlated through their underlying dependence on the FCIQMC wave function, which should approximately cancel out in the denominator of the estimator. This seems to be very accurate based on our observations across many systems, although we would expect this observation to be only approximate theoretically. For example, is formed as the sum of and the PT2 correction; clearly an uncorrelated analysis is not exact for the former estimate (though typically has a much smaller error than the PT2 term, perhaps explaining why this is not noticeable). We would therefore still recommend a protocol of performing many FCIQMC iterations when possible, but the situation is dramatically improved compared to that for .
Note that the above arguments do not depend using a large time step or preconditioning. A time step of au was used for both examples in Fig. (5). This small autocorrelation length on and is a property of the estimators themselves, and not the use of preconditioning.
VI.4 Convergence time in the preconditioned approach
As demonstrated in Figs. (1) and (2), the use of preconditioning allows a large time step to be used in FCIQMC. Typically one can set au and achieve convergence without issue, which usually allows convergence within - iterations in our experience. Meanwhile, the original algorithm usually requires at least several thousand iterations to converge, and sometimes many more.
However, as discussed in Section III.3, setting a large time step also requires setting to be very large. The simulation time in FCIQMC is dominated by the generation and processing of spawned walkers, such that iteration time is roughly proportional to . So for a fair comparison, we should instead look at convergence speed as a function of , rather than .
Another requirement for a fair comparison is that the time step should be chosen in a consistent manner. For this, we use the automatic system for choosing , implemented in NECI. As discussed already, it is important that there are few bloom events, defined as an event where a spawned walker is created with weight greater than the initiator threshold (). Allowing a large number of bloom events can greatly increase statistical noise and lower the efficiency of the algorithm. The automatic system in NECI looks for the largest bloom event from the previous iteration (if any), and reduces so that this spawning will have weight less than in future occurrences. The time step reaches a final value during convergence.
In Fig. (6), convergence is considered for the same system as in Fig. (1) (C2, cc-pVQZ, equilibrium geometry), but plotted against . With preconditioning we take parameters and an initial time step of au. For the original algorithm, we take and an initial time step of au (so that the initial value of is consistent). It can be seen that the benefit of preconditioning is now rather limited. In this case, the use of preconditioning speeds up convergence by only a small factor. We have tested this across a range of systems (including various basis set sizes, and both equilibrium and stretched regimes), and find that convergence is typically very similar between the two algorithms, by this metric.
It is important to understand why this is. Clearly, preconditioning is well established as improving the convergence rate considerably. As a function of number of iterations, convergence is greatly sped up in FCIQMC. However in this stochastic setting the cost of each iteration scales strongly with the step size. This is dictated by the need to avoid large bloom events, to prevent large noise. Therefore, it is important to investigate bloom events more carefully. The unsigned weight of a spawned walker in the original algorithm is proportional to , where is the probability of choosing determinant , given spawning from . With preconditioning this becomes proportional to . Therefore the choice of is critical in determining the number of bloom events. In the original algorithm, the best choice of (allowing the maximum without bloom events) is given by
[TABLE]
It is far too expensive to achieve this distribution exactly, but several schemes have been proposed to achieve this approximately. These include the heat bath approach of Holmes *et al.*Holmes, Changlani, and Umrigar (2016), and approaches based on the Cauchy-Schwarz inequality (suggested by Alavi and co-workersSmart, Booth, and Alavi and investigated recently by Neufeld and ThomNeufeld and Thom (2019)). For preconditioned FCIQMC, the optimal choice of will be
[TABLE]
Therefore, optimal preconditioning requires a very different excitation generator to the original approach. In this study we have used Cauchy-Schwarz-based excitation generators implemented in NECI, designed to approximately achieve Eq. (38), and so the above comparison gives a significant advantage to the original scheme. To see the problem, consider the simple example of water in a cc-pVDZ basis set with a frozen core. In this case, the correlation energy is , and so any walker spawned to the HF determinant is amplified by a factor of by the preconditioner. Meanwhile, the largest value of from a test simulation was . Therefore the ratio of largest to smallest value of is , and ideally we would like to make spawning to low-energy determinants times more likely, and spawning to high-energy determinants times less likely, relative to the current scheme. Doing so would allow the time step to be larger, and therefore convergence and autocorrelation times shorter, by this same factor (which will be system dependent). Alternatively, one could keep the time step fixed and reduce by this factor, which would be particularly useful when the correlation length is short, or close to already.
Therefore, there is substantial potential to speed up the FCIQMC algorithm by modifying excitation generators for the preconditioned case. The design and optimization of excitation generators is an extensive task, which we do not consider here. Nonetheless, there is clearly a benefit to be gained in future work through this approach.
Lastly, in the above analysis we assumed that the iteration time scaled proportionally to . Actually, a large value of is often more efficient than this. This is because some parts of the algorithm (such as the death step and deterministic projection) are independent of . For example, for benzene as studied in Section VI.5, the average iteration time divided by is equal to 0.56 seconds without preconditioning and , while with preconditioning and this value is equal to 0.41 seconds (with in both cases). There are further ways in which large- FCIQMC can be made more efficient, as discussed in the conclusion.
VI.5 Benzene
As an application of this approach to a larger system, we consider benzene in a cc-pVDZ basis set with a frozen core , using the geometry of Ref. (Schreiber et al., 2008). This is an example that would have been too challenging to study accurately with FCIQMC previously, even with significant computational resources, and so provides a good test.
Without preconditioning, parameters au and are chosen. With preconditioning, we take au and . Both simulations used walkers and were run for hours on -core nodes, with GB of RAM per node. These resources are modest compared to large-scale FCIQMC, which can be scaled up to more than walkers and CPU cores with appropriate load balancingSpencer et al. (2018). Fig. (7) presents the convergence of , and in both approaches. Table 2 presents final estimates, averaged from convergence onwards, and compared to high-order coupled cluster.
Initiator error (relative to CCSDT(Q)) on and is roughly unchanged by the use of preconditioning. The estimate from is too high by , while the estimate from is too high by . With , the noise on is too large to be useful. This is clear from Fig. (7), where fluctuations from iteration to iteration are of size . The final averaged value in Table 2 has a stochastic error of , and no reliable conclusion can be made. Using , the noise is reduced substantially. Sensible convergence is seen, and the final estimate from has an statistical error of . This energy is between the CCSDT[Q] and CCSDT(Q) results. Continuing the preconditioned simulation for a further hours increases the estimate to . Therefore, we suspect that the true estimate (in the limit of zero statistical error) is slightly higher than that given in Table 2. The results here are not intended to be accurately converged FCI benchmarks, but estimates to assess the improvement made by and the large- approach. In this respect the approach described here makes a significant improvement over the previous method.
VII Conclusion
It has been demonstrated that FCIQMC can be performed with a preconditioner, in contrast to the traditional imaginary-time propagation, allowing time steps close to unity to be used. This results in a method which can typically converge within - iterations, while the original method typically requires at least several thousand iterations. In practice, the requirement that bloom events be avoided means that a large must also be chosen. As a result, reductions in simulation time to convergence are rather more limited. This can be traced to the fact that currently-used excitation generators are optimized for imaginary-time propagation, and must be modified in the presence of a preconditioner. This will be an area for future work, and could greatly improve the speed of the method.
However, it has been shown that the use of a large is a dramatic benefit for the calculations of perturbative corrections to initiator error. Such perturbative corrections improve the accuracy of the method dramatically, yet are almost free to calculate from rejected spawned walkers, so that we regard this as a clear improvement to FCIQMC. These improvements have been demonstrated for benzene , which is certainly not feasible with the original i-FCIQMC algorithm, and where the PT2 correction was too noisy in the previous approach. Thus, while the preconditioned approach does not speed up convergence as one might expect, it is a significant benefit in the calculation of PT2 corrections to initiator error.
In practice, we also find that performing multiple spawning attempts per walker is more efficient in terms of iteration time per spawned walker. In future work, there are obvious ways in which the algorithm could be made more efficient in the large- case. For example:
- •
In semi-stochastic FCIQMC, the deterministic projection is performed once per iteration. When performing a large number of cheap iterations (small and ) this projection becomes too expensive beyond a deterministic space size of order or so. Using a small number of expensive iterations (large and ), a much larger deterministic space could be used without this projection becoming the limiting cost.
- •
The use of large should make it more efficient to perform more of the algorithm deterministically, beyond the semi-stochastic approach. For example, for a determinant with walkers, it may be more efficient to generate all connected determinants and create spawnings accordingly, rather than calling the excitation generator times, particularly if this number is similar to or larger than the number of connected determinants (as is sometimes the case).
Combined with an excitation generator optimized for the preconditioned algorithm, such modifications could lead to a much faster algorithm. The use of perturbative estimators already allows a new range of systems to be studied accurately by the method. The implementation of these additional developments should allow the method to push further still in the near future.
Acknowledgements.
N.S.B is grateful to St John’s College, Cambridge for funding and supporting this work through a Research Fellowship. A.J.W.T. thanks the Royal Society for a University Research Fellowship under grant UF160398. C.J.C.S is grateful to the Sims Fund for a studentship. This study made use of the CSD3 Peta4 CPU cluster.
Appendix A A more rigorous PT2 correction to initiator error
As discussed in the text, a second-order perturbative correction to initiator error can be calculated by
[TABLE]
where the summation is performed over all spawnings which are cancelled due to the initiator criterion, and there is a normalization factor of . This was motivated by selected CI methods. In such approaches, the Hamiltonian is diagonalized exactly in a variational subspace, allowing a perturbative correction to be calculated with an Epstein-Nesbet partitioning, and an analogous derivation was usedBlunt (2018) to obtain Eq. (16). However, the correction to i-FCIQMC is less rigorous because it is not simple to define a zeroth order space, and not clear that the FCIQMC wave function exactly samples the corresponding ground state.
To make the correction more rigorous, we present a second-order perturbative correction without considering a truncated space. This is the same approach used recently by Guo, Li and ChanGuo, Li, and Chan (2018b) and also by SharmaSharma (2018) to perturbatively correct a DMRG wave function, and we follow their idea.
Consider partitioning the Hamiltonian so that and , where will be taken as the FCIQMC wave function (dropping the conventional [math] subscript), and define . The second-order energy correction can be obtained as
[TABLE]
where . An appropriate can be defined by
[TABLE]
where and consists of the diagonal elements of in the FCIQMC basis.
It can be shown that , and so
[TABLE]
To proceed, one can make the approximation
[TABLE]
to avoid calculating the inverse of , which is not diagonal in the FCIQMC basis. This will be a very good approximation in this case, as will be approximately zero in the space of occupied determinants. This inverse can be treated more carefully, as in Ref. (Guo, Li, and Chan, 2018b), but the above is more than sufficient for the FCIQMC case.
To put this in a form similar to that found for , we split the Hamiltonian into diagonal and off-diagonal components, . Then,
[TABLE]
where we used the definition of the zeroth-order energy, . Finally, using ,
[TABLE]
The spawned vector in FCIQMC can be written , giving a final expression for the perturbatively corrected energy estimator in FCIQMC:
[TABLE]
We see that this expression includes the all terms in the perturbative correction of Eq. (16), and is almost identical to the expression for obtained in Eq. (24). The only difference is in the final term:
[TABLE]
where we have used the definition of in Eq. (19), and included the required normalization factors. If is approximately an eigenstate of , then , and the two estimators will give very similar results. Indeed, we find in practice that results from the two estimators are essentially identical after convergence.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Raghavachari et al. (1989) K. Raghavachari, G. W. Trucks, J. A. Pople, and M. Head-Gordon, Chemical Physics Letters 157 , 479 (1989).
- 2Bartlett and Musiał (2007) R. J. Bartlett and M. Musiał, Rev. Mod. Phys. 79 , 291 (2007).
- 3Riplinger and Neese (2013) C. Riplinger and F. Neese, J. Chem. Phys. 138 , 034106 (2013).
- 4Li et al. (2009) W. Li, P. Piecuch, J. R. Gour, and S. Li, J. Chem. Phys. 131 , 114109 (2009).
- 5Eriksen et al. (2015) J. J. Eriksen, P. Baudin, P. Ettenhuber, K. Kristensen, T. Kjærgaard, and P. Jørgensen, J. Chem. Theory Comput. 11 , 2984 (2015).
- 6White (1992) S. R. White, Phys. Rev. Lett. 69 , 2863 (1992).
- 7Chan (2004) G. K.-L. Chan, J. Chem. Phys. 120 , 3172 (2004).
- 8Olivares-Amaya et al. (2015) R. Olivares-Amaya, W. Hu, N. Nakatani, S. Sharma, J. Yang, and G. K.-L. Chan, J. Chem. Phys. 142 , 034102 (2015).
