E4: Kernel Polynomial Method (KPM)
Module: sci_form::experimental::kpmFeature flag: experimental-kpm
Overview
Computes the density of states (DOS), density matrix, and Mulliken populations via Chebyshev polynomial expansion of the Hamiltonian, avoiding diagonalization entirely. Achieves
Theory
Chebyshev Expansion
Any function of a Hermitian matrix can be expanded in Chebyshev polynomials:
where
Recursion
The Chebyshev polynomials are computed iteratively:
Each step costs
Jackson Kernel
Gibbs oscillations are suppressed by the Jackson damping kernel:
Stochastic Trace
The trace is estimated stochastically:
using
API
use sci_form::experimental::kpm::*;
// Spectral bounds
let (e_min, e_max) = estimate_spectral_bounds(&hamiltonian);
// Rescale matrix to [-1, 1]
let h_scaled = rescale_matrix(&hamiltonian, e_min, e_max);
// Chebyshev expansion (exact trace for small systems)
let expansion = ChebyshevExpansion::from_matrix_exact(&h_scaled, 100);
// Jackson kernel damping
let kernel = jackson_kernel(100);
// DOS at a specific energy
let dos = expansion.dos_at_energy(0.0, &kernel);
// Full KPM DOS computation
let config = KpmConfig { order: 100, n_random: 20, ..Default::default() };
let dos_result = compute_kpm_dos(&hamiltonian, &config);
// dos_result.energies, dos_result.dos, dos_result.homo_lumo_gap
// KPM Mulliken charges
let mulliken = compute_kpm_mulliken(&hamiltonian, &overlap, n_electrons, &config);
// mulliken.charges, mulliken.total_electronsConfiguration
| Parameter | Default | Description |
|---|---|---|
order | 100 | Number of Chebyshev moments |
n_random | 20 | Random vectors for stochastic trace |
temperature | 300.0 | Electronic temperature (K) for Fermi smearing |
Scaling
| System Size | Exact Diag. | KPM |
|---|---|---|
| Infeasible |
Tests
cargo test --features experimental-kpm --test regression -- test_kpm9 integration tests covering: spectral bounds estimation, Chebyshev recursion stability, Jackson kernel positivity, DOS peak detection, band gap identification, and Mulliken charge conservation.