From f75c6e887a60185ea5de5d98f3af5237b5bf0176 Mon Sep 17 00:00:00 2001 From: Ryan Levy Date: Fri, 11 Oct 2024 13:45:18 -0400 Subject: [PATCH] Cleanup --- examples/vumps/vumps_2d_heisenberg.jl | 6 +++--- src/models/models.jl | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/vumps/vumps_2d_heisenberg.jl b/examples/vumps/vumps_2d_heisenberg.jl index 35118d1..b66b94e 100644 --- a/examples/vumps/vumps_2d_heisenberg.jl +++ b/examples/vumps/vumps_2d_heisenberg.jl @@ -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 diff --git a/src/models/models.jl b/src/models/models.jl index ac0b3a2..e159175 100644 --- a/src/models/models.jl +++ b/src/models/models.jl @@ -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