From 9a0b8d269d55589e10c1e8d7e508ff729bafb79d Mon Sep 17 00:00:00 2001 From: Lukas Devos Date: Thu, 15 Jan 2026 15:15:54 +0100 Subject: [PATCH] use correct orth algorithms --- src/states/abstractmps.jl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/states/abstractmps.jl b/src/states/abstractmps.jl index 3fa45832d..70b6dd083 100644 --- a/src/states/abstractmps.jl +++ b/src/states/abstractmps.jl @@ -114,16 +114,16 @@ end Make the set of MPS tensors full rank by performing a series of orthogonalizations. """ -function makefullrank!(A::PeriodicVector{<:GenericMPSTensor}; alg = Defaults.alg_qr()) +function makefullrank!(A::PeriodicVector{<:GenericMPSTensor}; alg_leftorth = Defaults.alg_qr(), alg_rightorth = Defaults.alg_lq()) while true i = findfirst(!isfullrank, A) isnothing(i) && break if !isfullrank(A[i]; side = :left) - L, Q = right_orth!(_transpose_tail(A[i]); alg) + L, Q = right_orth!(_transpose_tail(A[i]); alg = alg_rightorth) A[i] = _transpose_front(Q) A[i - 1] = A[i - 1] * L else - A[i], R = left_orth!(A[i]; alg) + A[i], R = left_orth!(A[i]; alg = alg_leftorth) A[i + 1] = _transpose_front(R * _transpose_tail(A[i + 1])) end end