Skip to content

Commit

Permalink
add defaultdict(float)
Browse files Browse the repository at this point in the history
  • Loading branch information
bartandrews committed Apr 24, 2024
1 parent 7c2a296 commit 0e2b142
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/ffsim/operators/fermi_hubbard.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def fermi_hubbard_2d(
.. _The Hubbard Model: https://doi.org/10.1146/annurev-conmatphys-031620-102024
"""
coeffs: dict[tuple[tuple[bool, bool, int], ...], complex] = defaultdict(lambda: 0)
coeffs: dict[tuple[tuple[bool, bool, int], ...], complex] = defaultdict(float)

for x in range(norb_x):
for y in range(norb_y):
Expand Down

0 comments on commit 0e2b142

Please sign in to comment.