diff --git a/src/algorithms/groundstate/idmrg.jl b/src/algorithms/groundstate/idmrg.jl index fab2c96da..4b95de042 100644 --- a/src/algorithms/groundstate/idmrg.jl +++ b/src/algorithms/groundstate/idmrg.jl @@ -102,7 +102,7 @@ function find_groundstate(mps, operator, alg::alg_type, envs = environments(mps, end alg_gauge = updatetol(alg.alg_gauge, it.state.iter, it.state.ϵ) - ψ′ = InfiniteMPS(it.state.mps.AR[1:end]; alg_gauge.tol, alg_gauge.maxiter) + ψ′ = InfiniteMPS(it.state.mps.AR; alg_gauge.tol, alg_gauge.maxiter) envs = recalculate!(it.state.envs, ψ′, it.state.operator, ψ′) return ψ′, envs, it.state.ϵ end diff --git a/src/algorithms/groundstate/vumps.jl b/src/algorithms/groundstate/vumps.jl index 99da8234c..0cc6c5ad4 100644 --- a/src/algorithms/groundstate/vumps.jl +++ b/src/algorithms/groundstate/vumps.jl @@ -57,6 +57,7 @@ function dominant_eigsolve( ) log = IterLog("VUMPS") iter = 0 + mps = copy(mps) ϵ = calc_galerkin(mps, operator, mps, envs) alg_environments = updatetol(alg.alg_environments, iter, ϵ) recalculate!(envs, mps, operator, mps; alg_environments.tol) @@ -153,7 +154,10 @@ end function gauge_step!(it::IterativeSolver{<:VUMPS}, state, ACs::AbstractVector) alg_gauge = updatetol(it.alg_gauge, state.iter, state.ϵ) - return InfiniteMPS(ACs, state.mps.C[end]; alg_gauge.tol, alg_gauge.maxiter) + return gaugefix!( + state.mps, ACs, state.mps.C[end]; + alg_gauge.tol, alg_gauge.maxiter + ) end function gauge_step!(it::IterativeSolver{<:VUMPS}, state, ACs::AbstractMatrix) alg_gauge = updatetol(it.alg_gauge, state.iter, state.ϵ)