# GPU-Accelerated Fock Matrix Computation with Efficient Reduction
## 1 Introduction  
Quantum chemistry is a field of computational chemistry that theoretically elucidates the energy and concomitant electronic structure of chemical systems based on the principles of quantum mechanics. By considering the behavior of electrons as wave functions, it is possible to simulate the kinematics and dynamics of molecular structures with a high accuracy unattainable through approaches rooted on classical mechanics and phenomenological observations of chemical phenomena. Quantum chemistry has opened the door to a wide range of applications, including (1) drug discovery screening [1, 2]: to narrow down drug candidates from a vast set of compounds across diverse libraries, and (2) catalyst development [3, 4]: to predict the emerging molecular activities/properties and chemical reactions arising from atom/molecule interactions. However, in current developments, quantum chemical calculations are solely constrained to primarily supplementthe observations derived from phenomenological/experimental results. Furthermore, the substantial computational cost behind quantum chemistry machinery hinders the much broader practical applications. In quantum chemistry, the Hartree-Fock method [5,6] and its post-Hartree-Fock derivatives [7] provide fundamental and established frameworks for theoretically solving the Schrodinger equation. These methods require computational cost proportional to at least the fourth power of the atom count in the input system, and have undergone decades of development focused on efficient implementation. In the Hartree-Fock method particularly, the evaluation of molecular integrals [8] describing interatomic and interelectronic interactions, and the subsequent construction of the Fock matrix, dominate the computational cost. The Fock matrix encodes not only the information on the Hamiltonian in the Hartree-Fock mean-field approximation, but also the interactions, such as the Coulomb energy and the kinetic energy between atoms and electrons. The Hartree-Fock method iteratively updates and diagonalizes the Fock matrix until the electron orbitals and energies converge. Each element of the Fock matrix can be calculated by accumulating values of two-electron repulsion integrals (ERIs) onto an initial value consisting of one-electron integrals, which account for factors such as the Coulomb and the kinetic energy. In the restricted Hartree-Fock method for closed-shell systems, the update of the Fock matrix of size \(M\times M\) is defined [9] by  
\[ \begin{split} F_{\mu\
u}&=F_{\mu\
u}+4D_{\lambda \sigma}(\mu\
u|\lambda\sigma),\\ F_{\lambda\sigma}&=F_{\lambda\sigma}+4D_{\mu\
u}( \mu\
u|\lambda\sigma),\\ F_{\mu\lambda}&=F_{\mu\lambda}-D_{\
u\sigma}( \mu\
u|\lambda\sigma),\\ F_{\
u\
u}&=F_{\
u\sigma}-D_{\mu\lambda}(\mu\
u| \lambda\sigma),\\ F_{\mu\
u}&=F_{\mu\sigma}-D_{\
u\lambda}(\mu\
u| \lambda\sigma),\\ F_{\
u\lambda}&=F_{\
u\lambda}-D_{\mu\sigma}( \mu\
u|\lambda\sigma),\\ \end{split}  \tag{1}\]  
where \(F_{\mu\
u}\) denotes an element of the Fock matrix, \(D_{\mu\
u}\) denotes an element of the density matrix and \((\mu\
u|\lambda\sigma)\) represents the value of the ERIs (\(1\leq\mu,\
u,\lambda,\sigma\leq M\)). ERIs literally describe the repulsive force between two electrons, and each value is added to the six locations of the Fock matrix, weighting by the corresponding density matrix elements. In quantum chemistry, the computational cost typically scales with the number \(M\) of basis functions representing the electron orbitals. Although the Fock matrix itself is a two-dimensional matrix, its construction requires consideration of all \(O(M^{4})\) ERIs, leading to a significant computational burden. In addition to evaluating ERIs, efficient reduction of these values based on Equation (1) is crucial for accelerating the Fock matrix construction.