ffsim.GivensAnsatzOp¶
- class ffsim.GivensAnsatzOp(norb, interaction_pairs, thetas, phis, phase_angles)[source]¶
Bases:
SupportsApplyUnitary,SupportsApproximateEqualityA Givens rotation ansatz operator.
The Givens rotation ansatz consists of a sequence of Givens rotations followed by a layer of single-orbital phase gates.
Note that this ansatz does not implement any interactions between spin alpha and spin beta orbitals.
- thetas¶
The angles for the Givens rotations.
- Type:
np.ndarray
- phis¶
The optional phase angles for the Givens rotations.
- Type:
np.ndarray | None
- phase_angles¶
The optional phase angles for the layer of single-orbital phase gates.
- Type:
np.ndarray | None
Methods
from_orbital_rotation(orbital_rotation)Initialize the operator from an orbital rotation.
from_parameters(params, norb, interaction_pairs)Initialize the operator from a real-valued parameter vector.
n_params(norb, interaction_pairs[, ...])Return the number of parameters of an ansatz with given settings.
to_orbital_rotation()Convert the Givens ansatz operator to an orbital rotation.
to_parameters()Convert the operator to a real-valued parameter vector.
Attributes