ffsim.UCCSDOpRestricted¶
- class ffsim.UCCSDOpRestricted(t1, t2, final_orbital_rotation=None, validate=True, rtol=1e-05, atol=1e-08)[source]¶
Bases:
SupportsApplyUnitary,SupportsApproximateEqualityRestricted unitary coupled cluster, singles and doubles operator.
UCCSD operator with complex-valued t-amplitudes.
- Parameters:
validate (
InitVar) – Whether to validate the operator attributes. Setting this to False skips validation, which is useful if you need to create many instances of this class and are confident that the attributes are valid.rtol (
InitVar) – Relative numerical tolerance for validation checks.atol (
InitVar) – Absolute numerical tolerance for validation checks.
Attributes
The optional final orbital rotation, as a Numpy array of shape
(norb, norb).The number of spatial orbitals.
The t1 amplitudes, as a Numpy array of shape
(nocc, nvrt).The t2 amplitudes, as a Numpy array of shape
(nocc, nocc, nvrt, nvrt).-
final_orbital_rotation:
ndarray|None= None¶ The optional final orbital rotation, as a Numpy array of shape
(norb, norb).
- norb¶
The number of spatial orbitals.
Methods
from_parameters(params, *, norb, nocc[, ...])Initialize the UCCSD operator from a real-valued parameter vector.
n_params(norb, nocc, *[, ...])Return the number of parameters of an ansatz with given settings.
Convert the UCCSD operator to a real-valued parameter vector.
- static from_parameters(params, *, norb, nocc, with_final_orbital_rotation=False)[source]¶
Initialize the UCCSD operator from a real-valued parameter vector.
- Parameters:
- Return type:
- Returns:
The UCCSD operator constructed from the given parameters.
- Raises:
ValueError – The number of parameters passed did not match the number expected based on the function inputs.