From 29e34d54c656b159f4d44647f973640a8cd547e3 Mon Sep 17 00:00:00 2001 From: Nuwan Yapa Date: Tue, 15 Apr 2025 15:16:15 -0400 Subject: [PATCH] Bug fix in extrapolation --- calculations/PMM.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/calculations/PMM.jl b/calculations/PMM.jl index 49b1ba2..155a69c 100644 --- a/calculations/PMM.jl +++ b/calculations/PMM.jl @@ -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