In this work, we introduce three algorithmic improvements to reduce the cost and improve the scaling of orbital space variational Monte Carlo (VMC). First, we show that, by appropriately screening the one- and two-electron integrals of the Hamiltonian, one can improve the efficiency of the algorithm by several orders of magnitude. This improved efficiency comes with the added benefit that the cost of obtaining a constant error per electron scales as the second power of the system size O( N2), down from the fourth power O( N4). Using numerical results, we demonstrate that the practical scaling obtained is, in fact, O( N1.5) for a chain of hydrogen atoms. Second, we show that, by using the adaptive stochastic gradient descent algorithm called AMSGrad, one can optimize the wave function energies robustly and efficiently. Remarkably, AMSGrad is almost as inexpensive as the simple stochastic gradient descent but delivers a convergence rate that is comparable to that of the Stochastic Reconfiguration algorithm, which is significantly more expensive and has a worse scaling with the system size. Third, we introduce the use of the rejection-free continuous time Monte Carlo (CTMC) to sample the determinants. Unlike the first two improvements, CTMC does come at an overhead that the local energy must be calculated at every Monte Carlo step. However, this overhead is mitigated to a large extent because of the reduced scaling algorithm, which ensures that the asymptotic cost of calculating the local energy is equal to that of updating the walker. The resulting algorithm allows us to calculate the ground state energy of a chain of 160 hydrogen atoms using a wave function containing ∼2 × 105 variational parameters with an accuracy of 1 mEh/particle at a cost of just 25 CPU h, which when split over 2 nodes of 24 processors each amounts to only about half hour of wall time. This low cost coupled with embarrassing parallelizability of the VMC algorithm and great freedom in the forms of usable wave functions, represents a highly effective method for calculating the electronic structure of model and ab initio systems.
Read full abstract