From e4c8c995248bd5f458547b06eea26e2f305638a0 Mon Sep 17 00:00:00 2001 From: bartandrews Date: Wed, 24 Apr 2024 11:03:54 -0700 Subject: [PATCH] add defaultdict(float) --- python/ffsim/operators/fermi_hubbard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ffsim/operators/fermi_hubbard.py b/python/ffsim/operators/fermi_hubbard.py index c55476b49..d185973e2 100644 --- a/python/ffsim/operators/fermi_hubbard.py +++ b/python/ffsim/operators/fermi_hubbard.py @@ -58,7 +58,7 @@ def fermi_hubbard_1d( .. _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 p in range(norb - 1 + periodic): coeffs[(cre_a(p), des_a((p + 1) % norb))] -= tunneling