Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsung committed Dec 9, 2023
1 parent a6f0526 commit fcdd6bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/ffsim/variational/hopgate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 2 additions & 2 deletions python/ffsim/variational/ucj.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fcdd6bc

Please sign in to comment.