Skip to content

Commit

Permalink
Fix some more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mtfishman committed Oct 31, 2023
1 parent 5e65813 commit 0e288ea
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/mps/abstractmps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1592,7 +1592,7 @@ bond indices is performed. Afterward, tensors
Either modify in-place with `orthogonalize!` or
out-of-place with `orthogonalize`.
"""
function orthogonalize!(M::AbstractMPS, j::Int)
function orthogonalize!(M::AbstractMPS, j::Int; maxdim=nothing)
@debug_check begin
if !(1 <= j <= length(M))
error("Input j=$j to `orthogonalize!` out of range (valid range = 1:$(length(M)))")
Expand All @@ -1608,7 +1608,7 @@ function orthogonalize!(M::AbstractMPS, j::Int)
else
ltags = TagSet("Link,l=$b")
end
L, R = factorize(M[b], linds; tags=ltags)
L, R = factorize(M[b], linds; tags=ltags, maxdim)
M[b] = L
M[b + 1] *= R
setleftlim!(M, b)
Expand All @@ -1629,7 +1629,7 @@ function orthogonalize!(M::AbstractMPS, j::Int)
else
ltags = TagSet("Link,l=$b")
end
L, R = factorize(M[b + 1], rinds; tags=ltags)
L, R = factorize(M[b + 1], rinds; tags=ltags, maxdim)
M[b + 1] = L
M[b] *= R

Expand Down

0 comments on commit 0e288ea

Please sign in to comment.