ffsim.NumNumAnsatzOpSpinBalanced¶
- class ffsim.NumNumAnsatzOpSpinBalanced(norb, interaction_pairs, thetas)[source]¶
Bases:
SupportsApplyUnitary,SupportsApproximateEqualityA number-number interaction ansatz operator.
The number-number interaction ansatz consists of a sequence of number-number interactions.
Attributes
The number of spatial orbitals.
The orbital pairs to apply the number-number interactions to.
The angles for the number-number interactions.
-
interaction_pairs:
tuple[list[tuple[int,int]],list[tuple[int,int]]]¶ The orbital pairs to apply the number-number interactions to.
Methods
from_diag_coulomb_mats(diag_coulomb_mats)Initialize the operator from a diagonal Coulomb matrix.
from_parameters(params, norb, interaction_pairs)Initialize the operator from a real-valued parameter vector.
n_params(interaction_pairs)Return the number of parameters of an ansatz with given settings.
Convert the operator to diagonal Coulomb matrices.
Convert the operator to a real-valued parameter vector.
- static from_diag_coulomb_mats(diag_coulomb_mats)[source]¶
Initialize the operator from a diagonal Coulomb matrix.
- static from_parameters(params, norb, interaction_pairs)[source]¶
Initialize the operator from a real-valued parameter vector.
- static n_params(interaction_pairs)[source]¶
Return the number of parameters of an ansatz with given settings.
-
interaction_pairs: