@@ -33,7 +33,7 @@ function environments(exci::Union{InfiniteQP, MultilineQP}, H; kwargs...)
3333 return environments (exci, H, lenvs; kwargs... )
3434end
3535function environments (exci:: Union{InfiniteQP, MultilineQP} , H, lenvs; kwargs... )
36- renvs = exci. trivial ? lenvs : environments (exci. right_gs, H; kwargs... )
36+ renvs = ! istopological ( exci) ? lenvs : environments (exci. right_gs, H; kwargs... )
3737 return environments (exci, H, lenvs, renvs; kwargs... )
3838end
3939
@@ -62,7 +62,7 @@ function environments(exci::InfiniteQP, H::InfiniteMPOHamiltonian, lenvs, renvs;
6262 lBs[pos + 1 ] += leftenv (lenvs, pos, exci. left_gs) *
6363 TransferMatrix (exci[pos], H[pos], AL[pos]) / cis (exci. momentum)
6464
65- if exci. trivial && ! isempty (ids) # regularization of trivial excitations
65+ if istrivial ( exci) && ! isempty (ids) # regularization of trivial excitations
6666 ρ_left = l_RL (exci. left_gs, pos + 1 )
6767 ρ_right = r_RL (exci. left_gs, pos)
6868 for i in ids
@@ -78,7 +78,7 @@ function environments(exci::InfiniteQP, H::InfiniteMPOHamiltonian, lenvs, renvs;
7878 rBs[pos - 1 ] += TransferMatrix (exci[pos], H[pos], AR[pos]) *
7979 rightenv (renvs, pos, exci. right_gs) * cis (exci. momentum)
8080
81- if exci. trivial && ! isempty (ids)
81+ if istrivial ( exci) && ! isempty (ids)
8282 ρ_left = l_LR (exci. left_gs, pos)
8383 ρ_right = r_LR (exci. left_gs, pos - 1 )
8484 for i in ids
@@ -100,7 +100,7 @@ function environments(exci::InfiniteQP, H::InfiniteMPOHamiltonian, lenvs, renvs;
100100 for i in 1 : (length (exci) - 1 )
101101 lB_cur = lB_cur * TransferMatrix (AR[i], H[i], AL[i]) / cis (exci. momentum)
102102
103- if exci. trivial && ! isempty (ids)
103+ if istrivial ( exci) && ! isempty (ids)
104104 ρ_left = l_RL (exci. left_gs, i + 1 )
105105 ρ_right = r_RL (exci. left_gs, i)
106106 for k in ids
@@ -115,7 +115,7 @@ function environments(exci::InfiniteQP, H::InfiniteMPOHamiltonian, lenvs, renvs;
115115 for i in length (exci): - 1 : 2
116116 rB_cur = TransferMatrix (AL[i], H[i], AR[i]) * rB_cur * cis (exci. momentum)
117117
118- if exci. trivial && ! isempty (ids)
118+ if istrivial ( exci) && ! isempty (ids)
119119 ρ_left = l_LR (exci. left_gs, i)
120120 ρ_right = r_LR (exci. left_gs, i - 1 )
121121 for k in ids
132132function environments (
133133 exci:: FiniteQP , H:: FiniteMPOHamiltonian ,
134134 lenvs = environments (exci. left_gs, H),
135- renvs = exci. trivial ? lenvs : environments (exci. right_gs, H);
135+ renvs = ! istopological ( exci) ? lenvs : environments (exci. right_gs, H);
136136 kwargs...
137137 )
138138 AL = exci. left_gs. AL
@@ -161,7 +161,7 @@ function environments(
161161end
162162
163163function environments (exci:: InfiniteQP , O:: InfiniteMPO , lenvs, renvs; kwargs... )
164- exci. trivial ||
164+ istopological ( exci) &&
165165 @warn " there is a phase ambiguity in topologically nontrivial statmech excitations"
166166 solver = environment_alg (exci, O, exci; kwargs... )
167167
@@ -203,7 +203,7 @@ function environments(exci::InfiniteQP, O::InfiniteMPO, lenvs, renvs; kwargs...)
203203 T_RL = TransferMatrix (right_gs. AR, O, left_gs. AL)
204204 T_LR = TransferMatrix (left_gs. AL, O, right_gs. AR)
205205
206- if exci. trivial
206+ if istrivial ( exci)
207207 @plansor rvec[- 1 - 2 ; - 3 ] := rightenv (lenvs, 0 , left_gs)[- 1 - 2 ; 1 ] *
208208 conj (left_gs. C[0 ][- 3 ; 1 ])
209209 @plansor lvec[- 1 - 2 ; - 3 ] := leftenv (lenvs, 1 , left_gs)[- 1 - 2 ; 1 ] *
0 commit comments