Bug fix in extrapolation

This commit is contained in:
Nuwan Yapa 2025-04-15 15:16:15 -04:00
parent 836390ec72
commit a15d4b8e5c
1 changed files with 2 additions and 2 deletions

View File

@ -58,11 +58,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