ffsim.UCJAnglesOpSpinBalanced¶
- class ffsim.UCJAnglesOpSpinBalanced(norb, num_num_ansatz_ops, givens_ansatz_ops, final_givens_ansatz_op=None)[source]¶
Bases:
SupportsApplyUnitary,SupportsApproximateEqualityA spin-balanced UCJ operator parameterized by gate rotation angles.
Methods
from_parameters(params, *, norb, n_reps, ...)Initialize the UCJ operator from a real-valued parameter vector.
from_t_amplitudes(t2, *[, t1, n_reps, ...])Initialize the UCJ operator from t2 (and optionally t1) amplitudes.
from_ucj_op(ucj_op)Initialize the angles-based UCJ operator from a matrix-based UCJ operator.
n_params(norb, n_reps, ...[, ...])Return the number of parameters of an ansatz with given settings.
to_parameters()Convert the UCJ operator to a real-valued parameter vector.
Attributes
final_givens_ansatz_opn_repsThe number of ansatz repetitions.
norbnum_num_ansatz_opsgivens_ansatz_ops