From c704cb11029f3169aebdf2a8622cf6ce8656a257 Mon Sep 17 00:00:00 2001 From: Nuwan Yapa Date: Fri, 30 Jan 2026 19:54:01 -0500 Subject: [PATCH] 3-body XZ in p-space (not working) --- calculations/XZ/3body_p_space.jl | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 calculations/XZ/3body_p_space.jl diff --git a/calculations/XZ/3body_p_space.jl b/calculations/XZ/3body_p_space.jl new file mode 100644 index 0000000..80efe9e --- /dev/null +++ b/calculations/XZ/3body_p_space.jl @@ -0,0 +1,45 @@ +include("../../p_space.jl") +include("../../EC.jl") + +using Arpack + +# target = 4.0766890719636875 - 0.012758927741074495im + +Λ = 0 +m = 1.0 +V_of_r(r) = 2 * exp(-(r-3)^2 / (1.5)^2) + +vertices = [0, 2 - 0.2im, 3, 4] # TODO: real contour instead of Berggren basis +subdivisions = [15, 10, 10] +jmax = 4 + +E_max = 40 +μω_global = 0.5 + +@time "H0" H0, _ = get_3b_H_matrix(jacobi, V_of_r, vertices, subdivisions, jmax, μω_global, E_max, Λ, m, true, true) + +# Vp = perturbation to make the state artificially bound +Vp_of_r(r) = -exp(-(r/3)^2) +@time "Vp" Vp, _ = get_3b_H_matrix(jacobi, Vp_of_r, vertices, subdivisions, jmax, μω_global, E_max, Λ, m, false, true) + +training_ref = 2 + 0.5im + +exact_E = [4.076642792419057-0.012998408352259658im, + 3.6129849325287-0.007397677539402868im, + 3.145212908643357-0.0038660337822150753im, + 2.6729225739451596-0.0021090370393881063im, + 2.196385760253282-0.0010430088245526555im, + 1.7162659936896967-0.0004515351140200029, + 1.2329926791785895-0.00017698044022813525im] + +training_c = [-1.5 - 0.5im] .+ (randn(8) .+ 0.05im * randn(8)) +extrapolating_c = 0.0 : 0.2 : 1.2 + +EC = affine_EC(H0, Vp) +train!(EC, training_c; ref_eval=training_ref, CAEC=false) +extrapolate!(EC, extrapolating_c; precalculated_exact_E=exact_E) + +exportCSV(EC, "temp/3b_p_space_XZ.csv") +plot(EC, "temp/3b_p_space_XZ.pdf") + +# Results: training points are all over the place, and extrapolated values are garbage. \ No newline at end of file