Accelerating Fermi Operator Expansion: ML-Inspired Methods | Zhang | JuliaCon Global 2025 @TheJuliaLanguage
Accelerating Fermi Operator Expansion: ML-Inspired Methods | Zhang | JuliaCon Global 2025  @TheJuliaLanguage
Uploaded December 2025 | Updated September 2026, 2 weeks ago
Accelerating Fermi Operator Expansion: ML-Inspired Methods by Qi Zhang

PreTalx: pretalx.com/juliacon-2025/talk/88WEPL

Calculating electronic properties of materials using the density matrix formalism enables
linear scaling with system size, compared to the cubic scaling of direct diagonalization. To
obtain density matrices, one typically applies the Fermi–Dirac operator to the Hamiltonian
of a given system. The second-order spectral projection (SP2) scheme has proven effective
across a broad range of temperatures. We generalize this SP2 method, drawing inspiration
from machine learning models, to recursively expand the Fermi–Dirac operator. This approach
accurately captures properties such as fractional occupation numbers and electronic entropy
while significantly reducing computational cost by replacing highly nonlinear matrix
functions with iterative matrix multiplications. Performance further improves by
running these calculations on GPUs.

In this presentation, we show how Julia enables rapid prototyping of this algorithm and the
subsequent design of a user-friendly API. We share strategies for optimizing performance
(e.g., removing type instabilities, reducing allocations, and avoiding code duplication)
with the help of robust benchmarking tools from the Julia community. We have been pleasantly
surprised to see that writing GPU-compatible Julia code adds minimal overhead compared to
calling CUDA C++ directly, while substantially improving readability—particularly when
leveraging tensor cores. We also take advantage of automatic differentiation packages to
generalize our approach to differentiating physically meaningful functions. Test cases for
this model use a rich ecosystem of random distribution generation code, showcasing the
flexibility and power of Julia for computational chemistry applications.
Accelerating Fermi Operator Expansion: ML-Inspired Methods | Zhang | JuliaCon Global 2025Audi Max | JuliaCon Global 2026 | Day 3Getting Started With Supercomputing | Lehosky, Olesky | JuliaCon Global 2025Lessons from using JuMP in HARD software | Harley Mackenzie | JuMP-dev 2025Wave and Ray Optics for Light Based Tomographic 3D printing | Wechsler | JuliaCon 2024Interfacing Julia with Kerbal Space Program using KRPC.jl | Chung | JuliaCon Global 2025Sparse BLAS: Developing a C++ Interface | Brock | JuliaCon Global 2025Optimal Planning for Steel Industry Decarbonization | Vinícius Justen PintoReactant: Optimize Julia functions with MLIR & XLA | Moses | JuliaCon Global 2025JuMP on demand: Creating your own compute cluster for solving optimisation problems | James FosterTrajectoryBundles.jl: parallelizable, derivative-free traj. opt. | TrowbridgeKeynote: Software at ASML: the Force behind making microchips | du Mee | JuliaCon 2024
The Julia Programming Language |

Accelerating Fermi Operator Expansion: ML-Inspired Methods | Zhang | JuliaCon Global 2025

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER