Skip to content

Commit

Permalink
preserve type
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinsung committed Nov 22, 2024
1 parent 60c8aa7 commit db32932
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/ffsim/variational/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def orbital_rotation_from_t1_amplitudes(t1: np.ndarray) -> np.ndarray:
"""
nocc, nvrt = t1.shape
norb = nocc + nvrt
generator = np.zeros((norb, norb), dtype=complex)
generator = np.zeros((norb, norb), dtype=t1.dtype)
generator[:nocc, nocc:] = t1
generator[nocc:, :nocc] = -t1.T
return scipy.linalg.expm(generator)

0 comments on commit db32932

Please sign in to comment.