Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions qmb/hubbard.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ModelConfig:
# The coefficient of U
u: typing.Annotated[float, tyro.conf.arg(aliases=["-u"])] = 0

# The electron number
# The electron number, left empty for half-filling
electron_number: typing.Annotated[int | None, tyro.conf.arg(aliases=["-e"])] = None

# The ref energy of the model
Expand All @@ -38,7 +38,6 @@ class ModelConfig:
def __post_init__(self) -> None:
if self.electron_number is None:
self.electron_number = self.m * self.n
logging.info("Electron number is not specified, set to half-filling (one electron per lattice site) %d", self.electron_number)

if self.m <= 0 or self.n <= 0:
raise ValueError("The dimensions of the Hubbard model must be positive integers.")
Expand Down