Skip to content
Merged
2 changes: 1 addition & 1 deletion src/algorithms/groundstate/idmrg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 8 additions & 2 deletions 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 @@ -110,7 +111,7 @@ function localupdate_step!(
mps = state.mps
src_Cs = mps isa Multiline ? eachcol(mps.C) : mps.C
src_ACs = mps isa Multiline ? eachcol(mps.AC) : mps.AC
ACs = similar(mps.AC)
ACs = mps.AL
dst_ACs = mps isa Multiline ? eachcol(ACs) : ACs

tforeach(eachsite(mps), src_ACs, src_Cs; scheduler) do site, AC₀, C₀
Expand Down Expand Up @@ -153,7 +154,12 @@ 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)
mps = gaugefix!(
state.mps, ACs, state.mps.C[end];
alg_gauge.tol, alg_gauge.maxiter, order = :R
)
mul!.(mps.AC, mps.AL, mps.C)
return mps
end
function gauge_step!(it::IterativeSolver{<:VUMPS}, state, ACs::AbstractMatrix)
alg_gauge = updatetol(it.alg_gauge, state.iter, state.ϵ)
Expand Down
Loading