diff --git a/python/ffsim/variational/hopgate.py b/python/ffsim/variational/hopgate.py index 64be17fcc..a5f012098 100644 --- a/python/ffsim/variational/hopgate.py +++ b/python/ffsim/variational/hopgate.py @@ -74,7 +74,7 @@ def from_parameters( norb: int, interaction_pairs: list[tuple[int, int]], with_final_orbital_rotation: bool = False, - ) -> np.ndarray: + ) -> HopGateAnsatzOperator: final_orbital_rotation = None if with_final_orbital_rotation: final_orbital_rotation = orbital_rotation_from_parameters( diff --git a/python/ffsim/variational/ucj.py b/python/ffsim/variational/ucj.py index 704ef0cd9..db37d9871 100644 --- a/python/ffsim/variational/ucj.py +++ b/python/ffsim/variational/ucj.py @@ -88,7 +88,7 @@ def from_parameters( alpha_alpha_indices: list[tuple[int, int]] | None = None, alpha_beta_indices: list[tuple[int, int]] | None = None, with_final_orbital_rotation: bool = False, - ) -> "UCJOperator": + ) -> UCJOperator: """Initialize the UCJ operator from a real-valued parameter vector.""" return UCJOperator( *_ucj_from_parameters( @@ -124,7 +124,7 @@ def from_t_amplitudes( t1_amplitudes: np.ndarray | None = None, n_reps: int | None = None, tol: float = 1e-8, - ) -> "UCJOperator": + ) -> UCJOperator: """Initialize the UCJ operator from t2 (and optionally t1) amplitudes.""" # TODO maybe allow specifying alpha-alpha and alpha-beta indices nocc, _, nvrt, _ = t2_amplitudes.shape