Table of Contents
Fetching ...

cuGUGA: Operator-Direct Graphical Unitary Group Approach Accelerated with CUDA

Zihan Pengmei

TL;DR

This work presents cuGUGA, an operator-direct graphical unitary group approach (GUGA) configuration interaction (CI) solver in a spin-adapted configuration state function (CSF) basis that supports both dense and density-fitted/Cholesky backends.

Abstract

We present cuGUGA, an operator-direct graphical unitary group approach (GUGA) configuration interaction (CI) solver in a spin-adapted configuration state function (CSF) basis. Dynamic-programming walk counts provide constant-time CSF ranking/unranking, and pretabulated segment factors enable constant-time evaluation of coupling coefficients. Two-electron contributions are organized through an intermediate-weight formulation that separates sparse generator enumeration from integral contraction and supports both dense and density-fitted/Cholesky backends. We further map the same primitives to GPUs by implementing the irregular DRT traversal and accumulation in custom CUDA kernels while delegating contractions to CUDA libraries. The implementation reproduces reference energies at the 10^{-11} Eh level and matches CPU/GPU sigma-vectors to 10^{-14}. On an RTX 4090, the GPU backend provides up to ~10x speedup over the CPU backend for smaller active spaces and multifold speedups on representative CASCI kernels. Speedup decreases as the active space grows because the workload becomes increasingly dominated by FP64 GEMM, which is not strongly accelerated on consumer GPUs. In addition, the cuGUGA CPU backend generally delivers >2x speedup over PySCF's determinant backend and >4x speedup over PySCF CSF backend.

cuGUGA: Operator-Direct Graphical Unitary Group Approach Accelerated with CUDA

TL;DR

This work presents cuGUGA, an operator-direct graphical unitary group approach (GUGA) configuration interaction (CI) solver in a spin-adapted configuration state function (CSF) basis that supports both dense and density-fitted/Cholesky backends.

Abstract

We present cuGUGA, an operator-direct graphical unitary group approach (GUGA) configuration interaction (CI) solver in a spin-adapted configuration state function (CSF) basis. Dynamic-programming walk counts provide constant-time CSF ranking/unranking, and pretabulated segment factors enable constant-time evaluation of coupling coefficients. Two-electron contributions are organized through an intermediate-weight formulation that separates sparse generator enumeration from integral contraction and supports both dense and density-fitted/Cholesky backends. We further map the same primitives to GPUs by implementing the irregular DRT traversal and accumulation in custom CUDA kernels while delegating contractions to CUDA libraries. The implementation reproduces reference energies at the 10^{-11} Eh level and matches CPU/GPU sigma-vectors to 10^{-14}. On an RTX 4090, the GPU backend provides up to ~10x speedup over the CPU backend for smaller active spaces and multifold speedups on representative CASCI kernels. Speedup decreases as the active space grows because the workload becomes increasingly dominated by FP64 GEMM, which is not strongly accelerated on consumer GPUs. In addition, the cuGUGA CPU backend generally delivers >2x speedup over PySCF's determinant backend and >4x speedup over PySCF CSF backend.
Paper Structure (42 sections, 35 equations, 9 figures, 7 tables)

This paper contains 42 sections, 35 equations, 9 figures, 7 tables.

Figures (9)

  • Figure 1: DRT graph parameters for CSF ranking. Orange node labels show the suffix walk counts $W(v)$, computed via backward dynamic programming. Blue edge labels display the prefix sums $\Pi(v,d)$, which define the lexicographic offsets required for ranking and unranking CSFs.
  • Figure 2: Unranking (index-to-CSF) via walk counts. At each orbital layer, the residual index $r$ selects the unique step $d_k$ whose cumulative walk-count interval contains $r$, then updates $r$ and advances to the next DRT node.
  • Figure 3: Two-level lookup-table (LUT) strategy for constant-time evaluation of segment factors. A finite mapping assigns each feasible local pattern $(\kappa,\tilde{d},d,\Delta b)$ a compact case id $m$, and a dense table $F[m,b]$ stores the corresponding segment factor for each allowed spin label $b$.
  • Figure 4: Segment-walk neighbor oracle. The active segment $[p_<, p_>]$ (with $p_<=\min(p,q)$ and $p_>=\max(p,q)$) is explored by a boundary-constrained DFS between fixed prefix/suffix nodes of the ket CSF. Each valid path produces a connected bra index $i$ and a coupling coefficient $\omega=\langle\Phi_i|E_{pq}|\Phi_j\rangle$.
  • Figure 5: Operator-direct $\bm{\sigma}=\bm{H}\bm{c}$ build. One-electron contributions are accumulated directly (diagonal) or via segment-walk enumeration (off-diagonal). Two-electron contributions follow an expand--contract--apply pipeline that isolates integral contractions (dense or DF/Cholesky) from CSF coupling enumeration.
  • ...and 4 more figures