GPU-accelerated Auxiliary-field quantum Monte Carlo with multi-Slater determinant trial states

Yifei Huang, Zhen Guo, Hung Q. Pham, Dingshun LvarXiv 2024 · DOI

This paper, recently published by researchers at ByteDance, introduces a significant performance leap for one of the most promising methods in quantum chemistry: Auxiliary-field quantum Monte Carlo (AFQMC). By moving the heavy lifting of multi-Slater determinant (MSD) calculations onto GPUs, the team has made it possible to simulate complex, "strongly correlated" molecules—like those found in transition metal clusters—with unprecedented speed and accuracy.

TL;DR

The authors implemented GPU acceleration for AFQMC using multi-Slater determinant trial states within the open-source ipie package. This approach achieves up to a 100x speedup over traditional CPU implementations, allowing researchers to reach "chemical accuracy" for notoriously difficult transition-metal systems that were previously computationally prohibitive.

What Problem Does This Paper Address?

In quantum chemistry, the "gold standard" for predicting molecular properties is often Coupled Cluster theory (specifically CCSD(T)). However, this method struggles with strongly correlated systems—molecules where electrons interact so intensely that a single simple description (a single Slater determinant) isn't enough. Examples include transition-metal complexes and molecules during bond dissociation.

AFQMC is a powerful alternative that can handle these systems, but its accuracy depends heavily on a "trial wavefunction." To get the right answer for complex molecules, you need Multi-Slater Determinant (MSD) trial states, which use a linear combination of thousands or even millions of determinants. On standard CPUs, the math required to process these MSD trials is agonizingly slow, creating a bottleneck that prevents scientists from studying large, biologically or industrially relevant molecules.

Methods

The researchers integrated their GPU-accelerated MSD-AFQMC into ipie, a Python-based AFQMC package. Their technical approach involved several key components:

  • CUDA Kernels: They implemented Wick’s theorem—the mathematical engine used to calculate overlaps and Green’s functions—entirely as custom NVIDIA CUDA kernels.
  • Library Integration: They leveraged cupy.einsum and the cuTENSOR library to accelerate the massive matrix multiplications inherent in quantum simulations.
  • Sub-linear Scaling: Instead of treating every determinant as a brand-new calculation, the implementation reuses orbital information across determinants. This allows the code to handle 1,000 determinants in nearly the same time it takes to handle two.
  • Memory Management: Because MSD trials can be memory-intensive, they implemented a "chunking" strategy to partition determinants, allowing the simulation to fit within the memory limits of a single GPU.

Datasets

The team benchmarked their implementation on two challenging transition-metal systems:

  1. $[Cu_2O_2]^{2+}$: A classic benchmark for testing how well a method handles the balance between static and dynamic electron correlation.
  2. $[Fe_2S_2(SCH_3)]^{2-}$: An iron-sulfur cluster. These are notoriously difficult to simulate due to the large number of d-orbital electrons and complex exchange mechanisms.

They compared their results against Full Configuration Interaction (FCI) reference values and existing CPU-based benchmarks in ipie.

Key Insights and Ideas

  • The "Sweet Spot" for GPUs: The authors found that GPUs are particularly efficient when the number of "walkers" (the statistical samples in Monte Carlo) is small but the number of determinants is large. This is exactly the regime needed for high-accuracy chemistry.
  • Orbital Choice Matters: The paper highlights that using "natural orbitals" (derived from other methods like DMRG) allows AFQMC to reach chemical accuracy with far fewer determinants than standard localized orbitals.
  • Efficiency Gains: By implementing Wick's algorithm directly on the GPU, they eliminated the "hotspots" that usually slow down MSD-AFQMC, specifically the calculation of the Green’s function and local energy.

Key Results

  • Massive Speedups: For the $[Cu_2O_2]^{2+}$ system, a single NVIDIA A100 GPU was 100 times faster than a single CPU core when using $10^6$ determinants.
  • GPU vs. Node: In a more realistic production scenario, one A100 GPU outperformed a full 32-CPU node by a factor of 6x for the iron-sulfur cluster.
  • Chemical Accuracy: The GPU code successfully recovered the dynamical correlation needed to match reference energies for the iron-sulfur cluster, even when requiring more than $10^5$ determinants.

Limitations and Future Work

  • Single-GPU Limit: The current implementation runs on a single GPU. The authors note that extending this to multi-GPU setups is a straightforward next step that would enable even larger simulations.
  • Energy Estimator Bottleneck: As the number of determinants reaches the millions, the "local energy estimator" starts to consume the majority of the computation time (up to 75%). The authors suggest that a different mathematical approach for this specific part of the calculation might be needed for extreme-scale problems.
  • Beyond Ground State: Future work includes incorporating auto-differentiation to calculate molecular properties beyond just the ground-state energy, such as forces and dipole moments.

Summary updated

Abstract

The accuracy of phaseless auxiliary-field quantum Monte Carlo (ph-AFQMC) can be systematically improved with better trial states. Using multi-Slater determinant trial states, ph-AFQMC has the potential to faithfully treat strongly correlated systems, while balancing the static and dynamical correlations on an equal footing. This preprint presents an implementation and application of graphics processing unit-accelerated ph-AFQMC, for multi-Slater determinant trial wavefunctions (GPU-accelerated MSD-AFQMC), to enable efficient simulation of large-scale, strongly correlated systems. This approach allows for nearly-exact computation of ground state energies in multi-reference systems. Our GPU-accelerated MSD-AFQMC is implemented in the open-source code \texttt{ipie}, a Python-based AFQMC package [\textit{J. Chem. Theory Comput.}, 2022, 19(1): 109-121]. We benchmark the performance of the GPU code on transition-metal clusters like [Cu$_2$O$_2$]$^{2+}$ and [Fe$_2$S$_2$(SCH$_3$)]$^{2-}$. The GPU code achieves at least sixfold speedup in both cases, comparing the timings of a single A100 GPU to that of a 32-CPU node. For [Fe$_2$S$_2$(SCH$_3$)]$^{2-}$, we demonstrate that our GPU MSD-AFQMC can recover the dynamical correlation necessary for chemical accuracy with an MSD trial, despite the large number of determinants required ($>10^5$). Our work significantly enhances the efficiency of MSD-AFQMC calculations for large, strongly correlated molecules by utilizing GPUs, offering a promising path for exploring the electronic structure of transition metal complexes.
BibTeX
@misc{huang2024gpu,
  author = {Yifei Huang and Zhen Guo and Hung Q. Pham and Dingshun Lv},
  title = {{GPU-accelerated Auxiliary-field quantum Monte Carlo with multi-Slater determinant trial states}},
  year = {2024},
  eprint = {2406.08314},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2406.08314},
}
Figure