Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-dellabetta committed Jan 3, 2024
1 parent 541b94f commit ac15e48
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/mps/mps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ function replacebond!(
maxdim=nothing,
cutoff=nothing,
eigen_perturbation=nothing,
# svd kwargs
svd_alg=nothing,
use_absolute_cutoff=nothing,
use_relative_cutoff=nothing,
Expand Down
3 changes: 2 additions & 1 deletion test/ITensorLegacyMPS/base/test_mps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ include(joinpath(@__DIR__, "utils", "util.jl"))
replacebond!(psi, 1, phi)
@test tags(linkind(psi, 1)) == bondindtags

# check that replacebond! updates llim and rlim properly
# check that replacebond! updates llim and rlim properly and works with use_absolute_cutoff
orthogonalize!(psi, 5)
phi = psi[5] * psi[6]
replacebond!(psi, 5, phi; ortho="left", which_decomp="svd", use_absolute_cutoff=true)
Expand All @@ -615,6 +615,7 @@ include(joinpath(@__DIR__, "utils", "util.jl"))
@test ITensors.leftlim(psi) == 4
@test ITensors.rightlim(psi) == 6

# check that replacebond! works with use_absolute_cutoff
ITensors.setleftlim!(psi, 3)
ITensors.setrightlim!(psi, 7)
phi = psi[5] * psi[6]
Expand Down

0 comments on commit ac15e48

Please sign in to comment.