Skip to content

Commit f75c6e8

Browse files
committed
Cleanup
1 parent bdb140a commit f75c6e8

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

examples/vumps/vumps_2d_heisenberg.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ function ITensorInfiniteMPS.unit_cell_terms(::Model"heisenberg2D"; width)
3434
opsum = OpSum()
3535
for i in 1:width
3636
# Vertical
37-
opsum += -0.5, "S+", i, "S-", mod(i, width) + 1
38-
opsum += -0.5, "S-", i, "S+", mod(i, width) + 1
39-
opsum += "Sz", i, "Sz", mod(i, width) + 1
37+
opsum += -0.5, "S+", i, "S-", i + 1
38+
opsum += -0.5, "S-", i, "S+", i + 1
39+
opsum += "Sz", i, "Sz", i + 1
4040
# Horizontal
4141
opsum += -0.5, "S+", i, "S-", i + width
4242
opsum += -0.5, "S-", i, "S+", i + width

src/models/models.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,9 @@ function infinite_terms(opsum::OpSum; kwargs...)
248248
# check that we don't have terms we will ignore
249249
dropped = filter(x -> x <= 0, keys(opsum_cell_dict))
250250
if length(dropped) > 0
251-
@warn "The input unit cell terms include terms that are being ignored on sites: $([d for d in dropped])"
251+
error(
252+
"The input unit cell terms include terms that are being ignored on sites: $([d for d in dropped])",
253+
)
252254
end
253255

254256
# Assumes each site in the unit cell has a term

0 commit comments

Comments
 (0)