Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanlevy committed Oct 11, 2024
1 parent bdb140a commit f75c6e8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions examples/vumps/vumps_2d_heisenberg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ function ITensorInfiniteMPS.unit_cell_terms(::Model"heisenberg2D"; width)
opsum = OpSum()
for i in 1:width
# Vertical
opsum += -0.5, "S+", i, "S-", mod(i, width) + 1
opsum += -0.5, "S-", i, "S+", mod(i, width) + 1
opsum += "Sz", i, "Sz", mod(i, width) + 1
opsum += -0.5, "S+", i, "S-", i + 1
opsum += -0.5, "S-", i, "S+", i + 1
opsum += "Sz", i, "Sz", i + 1
# Horizontal
opsum += -0.5, "S+", i, "S-", i + width
opsum += -0.5, "S-", i, "S+", i + width
Expand Down
4 changes: 3 additions & 1 deletion src/models/models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,9 @@ function infinite_terms(opsum::OpSum; kwargs...)
# check that we don't have terms we will ignore
dropped = filter(x -> x <= 0, keys(opsum_cell_dict))
if length(dropped) > 0
@warn "The input unit cell terms include terms that are being ignored on sites: $([d for d in dropped])"
error(
"The input unit cell terms include terms that are being ignored on sites: $([d for d in dropped])",
)
end

# Assumes each site in the unit cell has a term
Expand Down

0 comments on commit f75c6e8

Please sign in to comment.