@@ -62,11 +62,11 @@ 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 # regularization of trivial excitations
65+ if exci. trivial && ! isempty (ids) # regularization of trivial excitations
66+ ρ_left = l_RL (exci. left_gs, pos + 1 )
67+ ρ_right = r_RL (exci. left_gs, pos)
6668 for i in ids
67- @plansor lBs[pos + 1 ][i][- 1 - 2 ; - 3 - 4 ] -= lBs[pos + 1 ][i][1 4 ; - 3 2 ] *
68- r_RL (exci. left_gs, pos)[2 ; 3 ] * τ[3 4 ; 5 1 ] *
69- l_RL (exci. left_gs, pos + 1 )[ - 1 ; 6 ] * τ[5 6 ; - 4 - 2 ]
69+ regularize! (lBs[pos + 1 ][i], ρ_right, ρ_left)
7070 end
7171 end
7272 end
@@ -78,12 +78,11 @@ 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
81+ if exci. trivial && ! isempty (ids)
82+ ρ_left = l_LR (exci. left_gs, pos)
83+ ρ_right = r_LR (exci. left_gs, pos - 1 )
8284 for i in ids
83- ρ_left = l_LR (exci. left_gs, pos)
84- ρ_right = r_LR (exci. left_gs, pos - 1 )
85- @plansor rBs[pos - 1 ][i][- 1 - 2 ; - 3 - 4 ] -= τ[6 4 ; 1 3 ] *
86- rBs[pos - 1 ][i][1 3 ; - 3 2 ] * ρ_left[2 ; 4 ] * ρ_right[- 1 ; 5 ] * τ[- 2 - 4 ; 5 6 ]
85+ regularize! (rBs[pos - 1 ][i], ρ_left, ρ_right)
8786 end
8887 end
8988 end
@@ -101,12 +100,11 @@ function environments(exci::InfiniteQP, H::InfiniteMPOHamiltonian, lenvs, renvs;
101100 for i in 1 : (length (exci) - 1 )
102101 lB_cur = lB_cur * TransferMatrix (AR[i], H[i], AL[i]) / cis (exci. momentum)
103102
104- if exci. trivial
103+ if exci. trivial && ! isempty (ids)
104+ ρ_left = l_RL (exci. left_gs, i + 1 )
105+ ρ_right = r_RL (exci. left_gs, i)
105106 for k in ids
106- ρ_left = l_RL (exci. left_gs, i + 1 )
107- ρ_right = r_RL (exci. left_gs, i)
108- @plansor lB_cur[k][- 1 - 2 ; - 3 - 4 ] -= lB_cur[k][1 4 ; - 3 2 ] *
109- ρ_right[2 ; 3 ] * τ[3 4 ; 5 1 ] * ρ_left[- 1 ; 6 ] * τ[5 6 ; - 4 - 2 ]
107+ regularize! (lB_cur[k], ρ_right, ρ_left)
110108 end
111109 end
112110
@@ -117,12 +115,11 @@ function environments(exci::InfiniteQP, H::InfiniteMPOHamiltonian, lenvs, renvs;
117115 for i in length (exci): - 1 : 2
118116 rB_cur = TransferMatrix (AL[i], H[i], AR[i]) * rB_cur * cis (exci. momentum)
119117
120- if exci. trivial
118+ if exci. trivial && ! isempty (ids)
119+ ρ_left = l_LR (exci. left_gs, i)
120+ ρ_right = r_LR (exci. left_gs, i - 1 )
121121 for k in ids
122- ρ_left = l_LR (exci. left_gs, i)
123- ρ_right = r_LR (exci. left_gs, i - 1 )
124- @plansor rB_cur[k][- 1 - 2 ; - 3 - 4 ] -= τ[6 4 ; 1 3 ] *
125- rB_cur[k][1 3 ; - 3 2 ] * ρ_left[2 ; 4 ] * ρ_right[- 1 ; 5 ] * τ[- 2 - 4 ; 5 6 ]
122+ regularize! (rB_cur[k], ρ_left, ρ_right)
126123 end
127124 end
128125
0 commit comments