Skip to content

Commit

Permalink
add populate keys label
Browse files Browse the repository at this point in the history
  • Loading branch information
bartandrews committed Apr 24, 2024
1 parent 7a4463b commit ed5993c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions python/ffsim/operators/fermi_hubbard.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def fermi_hubbard_1d(
coeffs[(cre_a((p + 1) % norb), des_a(p))] = 0
coeffs[(cre_b((p + 1) % norb), des_b(p))] = 0

# populate keys
for p in range(norb - 1 + periodic):
coeffs[(cre_a(p), des_a((p + 1) % norb))] -= tunneling
coeffs[(cre_b(p), des_b((p + 1) % norb))] -= tunneling
Expand Down

0 comments on commit ed5993c

Please sign in to comment.