Skip to content

Commit

Permalink
minor change to NNgate
Browse files Browse the repository at this point in the history
  • Loading branch information
bartandrews committed Nov 6, 2024
1 parent 20c24ce commit 6be63f1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions python/ffsim/tenpy/circuits/gates.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,14 @@ def num_num_interaction(theta: float, spin: Spin) -> np.ndarray:
basis.
"""

# define operators
Nu = shfs_nosym.get_op("Nu").to_ndarray()
Nd = shfs_nosym.get_op("Nd").to_ndarray()

# alpha sector / up spins
if spin in [Spin.ALPHA, Spin.ALPHA_AND_BETA]:
Nu = shfs_nosym.get_op("Nu").to_ndarray()
NNgate_a = sp.linalg.expm(1j * theta * np.kron(Nu, Nu))

# beta sector / down spins
if spin in [Spin.BETA, Spin.ALPHA_AND_BETA]:
Nd = shfs_nosym.get_op("Nd").to_ndarray()
NNgate_b = sp.linalg.expm(1j * theta * np.kron(Nd, Nd))

# define total gate
Expand Down

0 comments on commit 6be63f1

Please sign in to comment.