Skip to content

Supported solvers

All solvers diagonalize a Hamiltonian projected onto sampled determinant subspaces. Select a backend with create_solver; the shared interface supports direct calls and the qiskit-addon-sqd loop. Method papers and upstream code are linked in the solver list.

Usage

Assume strs_a and strs_b contain your alpha and beta determinant strings:

from sci_solvers.energy_solvers.factory import create_solver
from sci_solvers.hamiltonian import HamiltonianData

ham = HamiltonianData.from_fcidump("FCIDUMP")
solver = create_solver("torch_sci", symmetrize_spin=False, hamiltonian=ham, device="cuda")
results = solver.compute_energy(ci_strs_batches=[(strs_a, strs_b)])
total_energy = results[0].energy + ham.e_nuc

compute_energy and sci_solver_callable return one ground-state result per batch. For multiple roots, call sci_solver_callable_eigen_states and read each batch's states, ordered by energy. Every result reports convergence. Energies exclude nuclear repulsion.

Feature matrix

Solver Complex Hermitian Multiple roots GDB GPU Full RDMs
TorchSCISolver Yes Yes Yes CUDA / MPS / distributed Yes
PySCF No Yes No No Yes
SBD No No Yes Thrust No
Dice No Yes Fixed determinant space No No
Truncated Davidson No Yes No No Yes, sparse support
ARPACK Yes Yes Yes CPU eigensolver Yes
Davidson Yes Yes Yes CPU eigensolver Yes
LOBPCG Yes Yes Yes CPU eigensolver Yes
PRIMME Yes Yes Yes CPU eigensolver Yes
SLEPc Complex PETSc build Yes Yes CPU eigensolver Yes
EVSL No Yes Yes No Yes
PySCF Davidson No Yes No No Yes

SBD and Dice return occupancies and CI amplitudes rather than full RDMs. General-algebra solvers make the 2-RDM optional through compute_rdm2. TorchSCISolver requires an explicit complex dtype for complex integrals.

Basis and spin

TPB (mode="tpb") forms the Cartesian product of independent alpha/beta string sets. GDB (mode="gdb") reads parallel arrays as explicit determinant pairs. Preserve pairing for GDB; per-spin deduplication changes its subspace. Spinless inputs use flat determinant lists and a scalar electron count, supported by TorchSCISolver and the complex-capable general-algebra solvers.

PySCF and PySCF Davidson apply native spin projection. TorchSCISolver uses a native S² penalty. The other general-algebra solvers use a post-solve spin filter when spin_sq is specified. SBD does not accept a spin target; Dice accepts only None or 0.0. Spinless inputs do not define the alpha/beta partition needed for these spin options.

Choosing a solver

  • TorchSCISolver: native CPU/GPU solving and one-subspace distributed runs.
  • PySCF: CPU reference with native spin projection and full RDMs.
  • SBD / Dice: access to the corresponding external implementations.
  • General-algebra solvers: interchangeable eigensolvers for a shared operator. Fulqrum provides an optional CPU Hamiltonian builder.
  • Truncated Davidson: sparse amplitudes and one batch per call.

See the API reference for classes, signatures and capability queries, and the landing-page example for an SQD loop.