ffsim.ucj_energy_spin_balanced¶
- ffsim.ucj_energy_spin_balanced(ucj_op, hamiltonian, nelec, *, occupied_orbitals=None, chunk_size=None)[source]¶
Compute the UCJ energy for a spin-balanced system.
The energy is computed using the fermionic backpropagation algorithm outlined in https://arxiv.org/abs/2607.21337.
- Parameters:
ucj_op (
UCJOpSpinBalanced) – The UCJ operator. Must have n_reps=1, with an optional final orbital rotation.hamiltonian (
MolecularHamiltonian) – The Hamiltonian.nelec (
tuple[int,int]) – The number of alpha and beta electrons.occupied_orbitals (
tuple[Sequence[int],Sequence[int]] |None) – The occupied orbitals for the reference state. Defaults to the Hartree-Fock state.chunk_size (
int|None) – The maximum number of two-body Hamiltonian terms to evaluate at a time. Smaller values use less memory but take longer to run. IfNone, all two-body terms are evaluated in one batch.
- Return type:
- Returns:
The expectation value of the Hamiltonian with respect to the UCJ state.