An efficient and accurate decomposition of the Fermi operator

Michele Ceriotti, Thomas D. Kühne, Michele Parrinello

Abstract

We present a method to compute the Fermi function of the Hamiltonian for a system of independent fermions, based on an exact decomposition of the grand-canonical potential. This scheme does not rely on the localization of the orbitals and is insensitive to ill-conditioned Hamiltonians. It lends itself naturally to linear scaling, as soon as the sparsity of the system's density matrix is exploited. By using a combination of polynomial expansion and Newton-like iterative techniques, an arbitrarily large number of terms can be employed in the expansion, overcoming some of the difficulties encountered in previous papers. Moreover, this hybrid approach allows us to obtain a very favorable scaling of the computational cost with increasing inverse temperature, which makes the method competitive with other Fermi operator expansion techniques. After performing an in-depth theoretical analysis of computational cost and accuracy, we test our approach on the DFT Hamiltonian for the metallic phase of the LiAl alloy.

Introduction

In quantum chemistry and materials science, calculating the properties of a system of electrons requires finding the "density matrix." The standard approach involves diagonalizing the Hamiltonian matrix ($H$), an operation that scales cubically ($O(N^3)$) with the number of electrons ($N$). For large-scale systems like proteins or complex alloys, this cubic scaling becomes a prohibitive computational bottleneck.

While linear scaling ($O(N)$) methods exist, they often rely on the Fermi Operator Expansion (FOE). Traditional FOE methods struggle in two critical scenarios: low temperatures and wide energy spectra. As temperature approaches absolute zero, the Fermi function becomes a sharp step, requiring a massive number of polynomial terms to approximate. Similarly, in high-precision calculations using plane waves, the energy range ($\Delta E$) is vast, further inflating costs. This paper introduces a hybrid numerical scheme designed to break this "curse of dimensionality."

Methods: A Hybrid Numerical Strategy

The core of the proposed method is an exact decomposition of the grand-canonical potential into a sum of $P$ terms, represented by $M_l$ matrices. The authors employ a "divide and conquer" strategy based on the mathematical conditioning of these terms.

The Tail and the Small-$l$ Region

The difficulty of the expansion is not uniform across all terms. For most terms (large $l$), the matrices are well-conditioned and easy to invert. These are handled efficiently using a polynomial series expansion optimized with a complex parameter. However, a small subset of terms (small $l$) is highly ill-conditioned, as shown in the figure below.

Condition number of expansion terms versus index $l$.

For these difficult small-$l$ terms, the authors use a Newton-like iterative inversion scheme ($B_{k+1} = 2B_k - B_kAB_k$). The breakthrough efficiency comes from "zeroth-order extrapolation": using the solution of one matrix ($M_l^{-1}$) as the starting guess for the next ($M_{l-1}^{-1}$). This acts as a near-perfect preconditioner, drastically reducing the iterations needed for convergence.

Key Insights and Results

The method was validated using a self-consistent DFT Hamiltonian of a 128-atom metallic LiAl alloy, generated via the CP2K software package. This metallic system is a challenging test case because it lacks a band gap and was tested across a wide range of electronic temperatures (316 K to 31,000 K).

Sublinear Scaling and Efficiency

Most FOE methods scale linearly with the product of inverse temperature and energy range ($\beta \Delta E$). In contrast, this hybrid approach achieves sublinear scaling. As demonstrated in the performance analysis, the total number of matrix multiplications ($m_{tot}$) grows more slowly than the complexity of the problem itself.

Sublinear scaling of computational cost with energy range.

Key performance highlights include:

  • Speedup: The method outperforms standard Chebyshev expansions once the Hamiltonian spectrum width exceeds roughly 20 times the thermal energy ($k_BT$).
  • Accuracy: In the LiAl test case, the error in band structure energy was as low as 0.01 meV/atom, meeting high-precision physics requirements.
  • Robustness: Unlike many linear-scaling methods that only work for insulators, this approach is perfectly suited for metals because it does not rely on orbital localization.

Conclusion and Future Work

By combining polynomial expansions for well-behaved terms with accelerated iterative inversion for ill-conditioned ones, this hybrid scheme provides a robust path toward large-scale electronic structure calculations. While the current work demonstrates significant efficiency gains, future research will focus on the interaction between matrix truncation (necessary for true $O(N)$ scaling) and expansion errors. Additionally, the authors suggest that in Molecular Dynamics simulations, matrices from previous time steps could serve as even better starting guesses, potentially unlocking further speedups on modern parallel supercomputers.

Summary updated

BibTeX
@article{ceriotti2008efficient,
  author = {Michele Ceriotti and Thomas D. Kühne and Michele Parrinello},
  title = {{An efficient and accurate decomposition of the Fermi operator}},
  journal = {The Journal of Chemical Physics},
  year = {2008},
  doi = {10.1063/1.2949515},
}
Figure