Skip to content

Commit f99504a

Browse files
committed
remove unused code
1 parent fe444ba commit f99504a

File tree

1 file changed

+0
-86
lines changed

1 file changed

+0
-86
lines changed

src/algorithms/excitation/exci_transfer_system.jl

Lines changed: 0 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,3 @@
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
451
function left_excitation_transfer_system(
462
GBL, H::InfiniteMPOHamiltonian, exci;
473
mom = exci.momentum, solver = Defaults.linearsolver
@@ -87,49 +43,7 @@ function left_excitation_transfer_system(
8743
end
8844
return found
8945
end
90-
function right_excitation_transfer_system(
91-
rBs, H, exci; mom = exci.momentum, solver = Defaults.linearsolver
92-
)
93-
len = length(H)
94-
found = zero.(rBs)
95-
odim = length(rBs)
96-
97-
for i in odim:-1:1
98-
# this operation can in principle be even further optimized for larger unit cells
99-
# as we only require the terms that end at level i.
100-
# this would require to check the finite state machine, and discard non-connected
101-
# terms.
102-
H_partial = map(site -> H.data[site, i:odim, i:odim], 1:len)
103-
T = TransferMatrix(exci.left_gs.AL, H_partial, exci.right_gs.AR)
104-
start = scale!(first(T * found[i:odim]), cis(mom * len))
105-
if exci.trivial && isid(H, i)
106-
@plansor start[-1 -2; -3 -4] -= τ[6 2; 3 4] * start[3 4; -3 5] *
107-
l_LR(exci.right_gs)[5; 2] * r_LR(exci.right_gs)[-1; 1] * τ[-2 -4; 1 6]
108-
end
109-
110-
found[i] = add!(start, rBs[i])
111-
112-
if reduce(&, contains.(H.data, i, i))
113-
if isid(H, i)
114-
tm = TransferMatrix(exci.left_gs.AL, exci.right_gs.AR)
115-
if exci.trivial
116-
tm = regularize(tm, l_LR(exci.left_gs), r_LR(exci.right_gs))
117-
end
118-
else
119-
tm = TransferMatrix(
120-
exci.left_gs.AL, getindex.(H.data, i, i), exci.right_gs.AR
121-
)
122-
end
12346

124-
found[i], convhist = linsolve(
125-
tm, found[i], found[i], solver, 1, -cis(mom * len)
126-
)
127-
convhist.converged < 1 &&
128-
@warn "GBR$i failed to converge: normres = $(convhist.normres)"
129-
end
130-
end
131-
return found
132-
end
13347
function right_excitation_transfer_system(
13448
GBR, H::InfiniteMPOHamiltonian, exci;
13549
mom = exci.momentum,

0 commit comments

Comments
 (0)