diff --git a/src/mps/abstractmps.jl b/src/mps/abstractmps.jl index 57677138a0..ded5259586 100644 --- a/src/mps/abstractmps.jl +++ b/src/mps/abstractmps.jl @@ -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)))") @@ -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) @@ -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