From 175ca19ef654cc041af2e672bc9582ec2a80c7d7 Mon Sep 17 00:00:00 2001 From: victor Date: Thu, 31 Jul 2025 14:01:30 +0200 Subject: [PATCH 1/3] use user-defined SVD alg in finite `approximate` DMRG2 implementation --- src/algorithms/approximate/fvomps.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/approximate/fvomps.jl b/src/algorithms/approximate/fvomps.jl index a10e2a112..616eb8f04 100644 --- a/src/algorithms/approximate/fvomps.jl +++ b/src/algorithms/approximate/fvomps.jl @@ -8,7 +8,7 @@ function approximate!(ψ::AbstractFiniteMPS, Oϕ, alg::DMRG2, envs = environment ϵ = 0.0 for pos in [1:(length(ψ) - 1); (length(ψ) - 2):-1:1] AC2′ = AC2_projection(pos, ψ, Oϕ, envs) - al, c, ar, = tsvd!(AC2′; trunc = alg.trscheme) + al, c, ar, = tsvd!(AC2′; trunc = alg.trscheme, alg_svd = alg.alg_svd()) AC2 = ψ.AC[pos] * _transpose_tail(ψ.AR[pos + 1]) ϵ = max(ϵ, norm(al * c * ar - AC2) / norm(AC2)) From a15ccd18c0124043087fc21a592d9ec781b41323 Mon Sep 17 00:00:00 2001 From: victor Date: Thu, 31 Jul 2025 14:03:31 +0200 Subject: [PATCH 2/3] typo --- src/algorithms/approximate/fvomps.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/approximate/fvomps.jl b/src/algorithms/approximate/fvomps.jl index 616eb8f04..27fb3c148 100644 --- a/src/algorithms/approximate/fvomps.jl +++ b/src/algorithms/approximate/fvomps.jl @@ -8,7 +8,7 @@ function approximate!(ψ::AbstractFiniteMPS, Oϕ, alg::DMRG2, envs = environment ϵ = 0.0 for pos in [1:(length(ψ) - 1); (length(ψ) - 2):-1:1] AC2′ = AC2_projection(pos, ψ, Oϕ, envs) - al, c, ar, = tsvd!(AC2′; trunc = alg.trscheme, alg_svd = alg.alg_svd()) + al, c, ar, = tsvd!(AC2′; trunc = alg.trscheme, alg_svd = alg.alg_svd) AC2 = ψ.AC[pos] * _transpose_tail(ψ.AR[pos + 1]) ϵ = max(ϵ, norm(al * c * ar - AC2) / norm(AC2)) From 64a80f3d91eb2c7d88bad565834fa1e8cf14b916 Mon Sep 17 00:00:00 2001 From: victor Date: Thu, 31 Jul 2025 14:07:11 +0200 Subject: [PATCH 3/3] another typo --- src/algorithms/approximate/fvomps.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/approximate/fvomps.jl b/src/algorithms/approximate/fvomps.jl index 27fb3c148..7f62c817c 100644 --- a/src/algorithms/approximate/fvomps.jl +++ b/src/algorithms/approximate/fvomps.jl @@ -8,7 +8,7 @@ function approximate!(ψ::AbstractFiniteMPS, Oϕ, alg::DMRG2, envs = environment ϵ = 0.0 for pos in [1:(length(ψ) - 1); (length(ψ) - 2):-1:1] AC2′ = AC2_projection(pos, ψ, Oϕ, envs) - al, c, ar, = tsvd!(AC2′; trunc = alg.trscheme, alg_svd = alg.alg_svd) + al, c, ar, = tsvd!(AC2′; trunc = alg.trscheme, alg = alg.alg_svd) AC2 = ψ.AC[pos] * _transpose_tail(ψ.AR[pos + 1]) ϵ = max(ϵ, norm(al * c * ar - AC2) / norm(AC2))