Bug fix in extrapolation

This commit is contained in:
Nuwan Yapa 2025-04-15 15:16:15 -04:00
parent 665016fbb6
commit 29e34d54c6
1 changed files with 2 additions and 2 deletions

View File

@ -62,11 +62,11 @@ end
all_c = vcat(training_c, extrapolating_c)
exact_E = [quick_pole_E(V_system(c)) for c in all_c]
extrapolated_E = ComplexF64[]
for c in all_c
for (c, ref) in zip(all_c, exact_E)
H = H0 + c * H1
evals, evecs = eigen(H)
evals = vcat(evals, conj.(evals)) # include complex conjugates
push!(extrapolated_E, nearest(evals, exact_E[end]))
push!(extrapolated_E, nearest(evals, ref))
end
# plot results