5858
5959
6060# Internal state of the IDMRG algorithm
61- struct IDMRGState{S, O, E, T<: Number }
61+ struct IDMRGState{S, O, E, T <: Number }
6262 mps:: S
6363 operator:: O
6464 envs:: E
@@ -67,7 +67,7 @@ struct IDMRGState{S, O, E, T<:Number}
6767 E_current:: T
6868end
6969
70- function find_groundstate (mps:: AbstractMPS , operator, alg:: alg_type , envs = environments (mps, operator)) where {alg_type<: Union{<:IDMRG, <:IDMRG2} }
70+ function find_groundstate (mps:: AbstractMPS , operator, alg:: alg_type , envs = environments (mps, operator)) where {alg_type <: Union{<:IDMRG, <:IDMRG2} }
7171 isfinite (mps) && throw (ArgumentError (" mps should be an 'InfiniteMPS'" ))
7272 length (mps) ≤ 1 && alg isa IDMRG2 && throw (ArgumentError (" unit cell should be >= w" ))
7373 log = alg isa IDMRG ? IterLog (" IDMRG" ) : IterLog (" IDMRG2" )
@@ -106,7 +106,7 @@ function find_groundstate(mps::AbstractMPS, operator, alg::alg_type, envs = envi
106106 end
107107end
108108
109- function Base. iterate (it:: IterativeSolver{alg_type} , state = it. state) where {alg_type<: Union{<:IDMRG, <:IDMRG2} }
109+ function Base. iterate (it:: IterativeSolver{alg_type} , state = it. state) where {alg_type <: Union{<:IDMRG, <:IDMRG2} }
110110 mps, envs, C_old = localupdate_step! (it, state)
111111
112112 # error criterion
@@ -127,8 +127,8 @@ function Base.iterate(it::IterativeSolver{alg_type}, state = it.state) where {al
127127end
128128
129129function MPSKit. localupdate_step! (
130- it:: IterativeSolver{<:Union{IDMRG, IDMRG2}} , state
131- )
130+ it:: IterativeSolver{<:Union{IDMRG, IDMRG2}} , state
131+ )
132132 alg_eigsolve = updatetol (it. alg_eigsolve, state. iter, state. ϵ)
133133 mps, envs, C_old = _localupdate_sweep_idmrg! (state. mps, state. operator, state. envs, alg_eigsolve, it. alg)
134134
@@ -246,4 +246,4 @@ function _localupdate_sweep_idmrg!(ψ::AbstractMPS, H, envs, alg_eigsolve, alg::
246246 transfer_rightenv! (envs, ψ, H, ψ, 0 )
247247
248248 return ψ, envs, C_old
249- end
249+ end
0 commit comments