Truncated Davidson¶
Our sparse selected-CI solver applies the Hamiltonian without forming a dense matrix. Each iteration retains the largest CI amplitudes, and RDMs are built on the nonzero support. It supports real integrals, multiple roots and one batch per call, on CPU.
Usage¶
from sci_solvers.energy_solvers.factory import create_solver
from sci_solvers.hamiltonian import HamiltonianData
ham = HamiltonianData.from_fcidump("FCIDUMP")
solver = create_solver(
"truncated_davidson",
symmetrize_spin=False,
hamiltonian=ham,
nroots=1,
eps=1e-4,
max_cycle=50,
growth_factor=2.0,
backend="numba",
)
results = solver.compute_energy(ci_strs_batches=[(strs_a, strs_b)])
strs_a and strs_b define the input product basis. delta_min and delta_max
control truncation thresholds; growth_factor controls support growth.
davidson_block_size enables restarts; None leaves the subspace unbounded.
backend="numba" is the default. "cpp" uses an equivalent optional C++ extension,
built during installation when a compiler is available. Requesting it without a
built extension raises ImportError.
spin_sq has no native effect. symmetrize_spin performs post-solve amplitude
symmetrization rather than spin projection. device, dtype and chunk_size
are reserved and do not change the CPU implementation.
See the API for signatures and the Davidson paper for the underlying eigensolver.