Skip to content

Commit

Permalink
Merge pull request #74 from QuantumKitHub/pb-fix-miniter
Browse files Browse the repository at this point in the history
Fix CTMRG `miniter` and `Accessors.@set`
  • Loading branch information
pbrehmer authored Oct 9, 2024
2 parents c3e9a29 + d9b8af5 commit 1d84977
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/algorithms/ctmrg/ctmrg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ ctmrgscheme(::CTMRG{S}) where {S} = S
const SequentialCTMRG = CTMRG{:sequential}
const SimultaneousCTMRG = CTMRG{:simultaneous}

# supply correct constructor for Accessors.@set
Accessors.constructorof(::Type{CTMRG{S}}) where {S} = CTMRG{S}

"""
MPSKit.leading_boundary([envinit], state, alg::CTMRG)
Expand Down Expand Up @@ -118,7 +121,7 @@ function MPSKit.leading_boundary(envinit, state, alg::CTMRG)
N = norm(state, env)
ctmrg_logiter!(log, iter, η, N)

if η alg.tol
if η alg.tol && iter alg.miniter
ctmrg_logfinish!(log, iter, η, N)
break
end
Expand Down

0 comments on commit 1d84977

Please sign in to comment.