1- function left_excitation_transfer_system (
2- lBs, H, exci; mom = exci. momentum,
3- solver = Defaults. linearsolver
4- )
5- len = length (H)
6- found = zero .(lBs)
7- odim = length (lBs)
8-
9- for i in 1 : odim
10- # this operation can in principle be even further optimized for larger unit cells
11- # as we only require the terms that end at level i.
12- # this would require to check the finite state machine, and discard non-connected
13- # terms.
14- H_partial = map (site -> H. data[site, 1 : i, 1 : i], 1 : len)
15- T = TransferMatrix (exci. right_gs. AR, H_partial, exci. left_gs. AL)
16- start = scale! (last (found[1 : i] * T), cis (- mom * len))
17- if exci. trivial && isid (H, i)
18- @plansor start[- 1 - 2 ; - 3 - 4 ] -= start[1 4 ; - 3 2 ] * r_RL (exci. right_gs)[2 ; 3 ] *
19- τ[3 4 ; 5 1 ] * l_RL (exci. right_gs)[- 1 ; 6 ] * τ[5 6 ; - 4 - 2 ]
20- end
21-
22- found[i] = add! (start, lBs[i])
23-
24- if reduce (& , contains .(H. data, i, i))
25- if isid (H, i)
26- tm = TransferMatrix (exci. right_gs. AR, exci. left_gs. AL)
27- if exci. trivial
28- tm = regularize (tm, l_RL (exci. right_gs), r_RL (exci. right_gs))
29- end
30- else
31- tm = TransferMatrix (
32- exci. right_gs. AR, getindex .(H. data, i, i), exci. left_gs. AL
33- )
34- end
35-
36- found[i], convhist = linsolve (
37- flip (tm), found[i], found[i], solver, 1 , - cis (- mom * len)
38- )
39- convhist. converged == 0 &&
40- @warn " GBL$i failed to converge: normres = $(convhist. normres) "
41- end
42- end
43- return found
44- end
451function left_excitation_transfer_system (
462 GBL, H:: InfiniteMPOHamiltonian , exci;
473 mom = exci. momentum, solver = Defaults. linearsolver
@@ -50,6 +6,11 @@ function left_excitation_transfer_system(
506 found = zerovector (GBL)
517 odim = length (GBL)
528
9+ if istrivial (exci)
10+ ρ_left = l_RL (exci. right_gs)
11+ ρ_right = r_RL (exci. right_gs)
12+ end
13+
5314 for i in 1 : odim
5415 # this operation can in principle be even further optimized for larger unit cells
5516 # as we only require the terms that end at level i.
@@ -58,18 +19,17 @@ function left_excitation_transfer_system(
5819 H_partial = map (h -> getindex (h, 1 : i, 1 , 1 , 1 : i), parent (H))
5920 T = TransferMatrix (exci. right_gs. AR, H_partial, exci. left_gs. AL)
6021 start = scale! (last (found[1 : i] * T), cis (- mom * len))
61- if exci. trivial && isidentitylevel (H, i)
62- @plansor start[- 1 - 2 ; - 3 - 4 ] -= start[1 4 ; - 3 2 ] * r_RL (exci. right_gs)[2 ; 3 ] *
63- τ[3 4 ; 5 1 ] * l_RL (exci. right_gs)[- 1 ; 6 ] * τ[5 6 ; - 4 - 2 ]
22+ if istrivial (exci) && isidentitylevel (H, i)
23+ regularize! (start, ρ_right, ρ_left)
6424 end
6525
6626 found[i] = add! (start, GBL[i])
6727
6828 if ! isemptylevel (H, i)
6929 if isidentitylevel (H, i)
7030 T = TransferMatrix (exci. right_gs. AR, exci. left_gs. AL)
71- if exci. trivial
72- T = regularize (T, l_RL (exci . right_gs), r_RL (exci . right_gs) )
31+ if istrivial ( exci)
32+ T = regularize (T, ρ_left, ρ_right )
7333 end
7434 else
7535 T = TransferMatrix (
@@ -86,49 +46,7 @@ function left_excitation_transfer_system(
8646 end
8747 return found
8848end
89- function right_excitation_transfer_system (
90- rBs, H, exci; mom = exci. momentum, solver = Defaults. linearsolver
91- )
92- len = length (H)
93- found = zero .(rBs)
94- odim = length (rBs)
95-
96- for i in odim: - 1 : 1
97- # this operation can in principle be even further optimized for larger unit cells
98- # as we only require the terms that end at level i.
99- # this would require to check the finite state machine, and discard non-connected
100- # terms.
101- H_partial = map (site -> H. data[site, i: odim, i: odim], 1 : len)
102- T = TransferMatrix (exci. left_gs. AL, H_partial, exci. right_gs. AR)
103- start = scale! (first (T * found[i: odim]), cis (mom * len))
104- if exci. trivial && isid (H, i)
105- @plansor start[- 1 - 2 ; - 3 - 4 ] -= τ[6 2 ; 3 4 ] * start[3 4 ; - 3 5 ] *
106- l_LR (exci. right_gs)[5 ; 2 ] * r_LR (exci. right_gs)[- 1 ; 1 ] * τ[- 2 - 4 ; 1 6 ]
107- end
108-
109- found[i] = add! (start, rBs[i])
11049
111- if reduce (& , contains .(H. data, i, i))
112- if isid (H, i)
113- tm = TransferMatrix (exci. left_gs. AL, exci. right_gs. AR)
114- if exci. trivial
115- tm = regularize (tm, l_LR (exci. left_gs), r_LR (exci. right_gs))
116- end
117- else
118- tm = TransferMatrix (
119- exci. left_gs. AL, getindex .(H. data, i, i), exci. right_gs. AR
120- )
121- end
122-
123- found[i], convhist = linsolve (
124- tm, found[i], found[i], solver, 1 , - cis (mom * len)
125- )
126- convhist. converged < 1 &&
127- @warn " GBR$i failed to converge: normres = $(convhist. normres) "
128- end
129- end
130- return found
131- end
13250function right_excitation_transfer_system (
13351 GBR, H:: InfiniteMPOHamiltonian , exci;
13452 mom = exci. momentum,
@@ -138,6 +56,11 @@ function right_excitation_transfer_system(
13856 found = zerovector (GBR)
13957 odim = length (GBR)
14058
59+ if istrivial (exci)
60+ ρ_left = l_LR (exci. right_gs)
61+ ρ_right = r_LR (exci. right_gs)
62+ end
63+
14164 for i in odim: - 1 : 1
14265 # this operation can in principle be even further optimized for larger unit cells
14366 # as we only require the terms that end at level i.
@@ -146,18 +69,17 @@ function right_excitation_transfer_system(
14669 H_partial = map (h -> h[i: end , 1 , 1 , i: end ], parent (H))
14770 T = TransferMatrix (exci. left_gs. AL, H_partial, exci. right_gs. AR)
14871 start = scale! (first (T * found[i: odim]), cis (mom * len))
149- if exci. trivial && isidentitylevel (H, i)
150- @plansor start[- 1 - 2 ; - 3 - 4 ] -= τ[6 2 ; 3 4 ] * start[3 4 ; - 3 5 ] *
151- l_LR (exci. right_gs)[5 ; 2 ] * r_LR (exci. right_gs)[- 1 ; 1 ] * τ[- 2 - 4 ; 1 6 ]
72+ if istrivial (exci) && isidentitylevel (H, i)
73+ regularize! (start, ρ_left, ρ_right)
15274 end
15375
15476 found[i] = add! (start, GBR[i])
15577
15678 if ! isemptylevel (H, i)
15779 if isidentitylevel (H, i)
15880 tm = TransferMatrix (exci. left_gs. AL, exci. right_gs. AR)
159- if exci. trivial
160- tm = regularize (tm, l_LR (exci . left_gs), r_LR (exci . right_gs) )
81+ if istrivial ( exci)
82+ tm = regularize (tm, ρ_left, ρ_right )
16183 end
16284 else
16385 tm = TransferMatrix (
@@ -166,8 +88,7 @@ function right_excitation_transfer_system(
16688 end
16789
16890 found[i], convhist = linsolve (
169- tm, found[i], found[i], solver, 1 ,
170- - cis (mom * len)
91+ tm, found[i], found[i], solver, 1 , - cis (mom * len)
17192 )
17293 convhist. converged < 1 &&
17394 @warn " GBR$i failed to converge: normres = $(convhist. normres) "
0 commit comments