ffsim.ucj_energy_spinless

ffsim.ucj_energy_spinless(ucj_op, hamiltonian, nelec, *, occupied_orbitals=None, chunk_size=None)[source]

Compute the UCJ energy for a spinless system.

The energy is computed using the fermionic backpropagation algorithm outlined in https://arxiv.org/abs/2607.21337.

Parameters:
  • ucj_op (UCJOpSpinless) – The UCJ operator. Must have n_reps=1, with an optional final orbital rotation.

  • hamiltonian (MolecularHamiltonianSpinless) – The Hamiltonian.

  • nelec (int) – The number of electrons.

  • occupied_orbitals (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. If None, all two-body terms are evaluated in one batch.

Return type:

float

Returns:

The expectation value of the Hamiltonian with respect to the UCJ state.