Skip to content
7 changes: 6 additions & 1 deletion src/algorithms/groundstate/idmrg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,12 @@ 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)
V = _firstspace(it.state.mps.AR[1])
C₀ = isomorphism(storagetype(eltype(it.state.mps.AR)), V, V)
ψ′ = gaugefix!(
copy(it.state.mps), copy(it.state.mps.AR), C₀;
tol = alg_gauge.tol, maxiter = alg_gauge.maxiter
)
envs = recalculate!(it.state.envs, ψ′, it.state.operator, ψ′)
return ψ′, envs, it.state.ϵ
end
Expand Down
6 changes: 5 additions & 1 deletion src/algorithms/groundstate/vumps.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.ϵ)
Expand Down
Loading