Organize all XZ calculations
This commit is contained in:
parent
adfa46ff83
commit
59c22cd3bc
|
|
@ -1,10 +1,10 @@
|
||||||
using Plots
|
using Plots
|
||||||
|
|
||||||
include("../EC.jl")
|
include("../../EC.jl")
|
||||||
include("../ho_basis.jl")
|
include("../../ho_basis.jl")
|
||||||
include("../p_space.jl")
|
include("../../p_space.jl")
|
||||||
|
|
||||||
angle = 0.47 * pi
|
angle = 0.47 * pi # DOESN'T WORK WITHOUT ROTATION
|
||||||
μω_gen = 0.5 * exp(-1im * angle)
|
μω_gen = 0.5 * exp(-1im * angle)
|
||||||
μ = 0.5
|
μ = 0.5
|
||||||
l = 0
|
l = 0
|
||||||
|
|
@ -36,4 +36,4 @@ hline!([0], color=:red, label="continuum")
|
||||||
xlabel!("Re(E)")
|
xlabel!("Re(E)")
|
||||||
ylabel!("Im(E)")
|
ylabel!("Im(E)")
|
||||||
plot!(legend=:bottomleft)
|
plot!(legend=:bottomleft)
|
||||||
savefig("temp/XZ.pdf")
|
savefig("temp/2b_HO_XZ.pdf")
|
||||||
|
|
@ -0,0 +1,36 @@
|
||||||
|
include("../../ho_basis.jl")
|
||||||
|
include("../../EC.jl")
|
||||||
|
|
||||||
|
V_of_r(r) = 2 * exp(-(r-3)^2 / (1.5)^2)
|
||||||
|
Λ = 0
|
||||||
|
m = 1.0
|
||||||
|
|
||||||
|
ϕ = 0.1
|
||||||
|
μω_global = 0.5
|
||||||
|
E_max = 40
|
||||||
|
|
||||||
|
H0 = get_3b_H_matrix(jacobi, V_of_r, μω_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, μω_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 = (0.0 : 0.2 : 1.2) .* exp(-0.01im) #[-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_HO_XZ.csv")
|
||||||
|
plot(EC, "temp/3b_HO_XZ.pdf")
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
using Plots
|
using Plots
|
||||||
|
|
||||||
include("../EC.jl")
|
include("../../EC.jl")
|
||||||
include("../ho_basis.jl")
|
include("../../ho_basis.jl")
|
||||||
include("../p_space.jl")
|
include("../../p_space.jl")
|
||||||
|
|
||||||
function solve_E(H0, H1, c_vals, near_E)
|
function solve_E(H0, H1, c_vals, near_E)
|
||||||
out_E = ComplexF64[]
|
out_E = ComplexF64[]
|
||||||
|
|
@ -71,4 +71,4 @@ scatter(real.(HO_Es), imag.(HO_Es), label="HO basis", marker=:circle, color=:blu
|
||||||
scatter!(real.(p_space_Es), imag.(p_space_Es), label="p-space", marker=:circle, color=:red)
|
scatter!(real.(p_space_Es), imag.(p_space_Es), label="p-space", marker=:circle, color=:red)
|
||||||
xlabel!("Re(E)")
|
xlabel!("Re(E)")
|
||||||
ylabel!("Im(E)")
|
ylabel!("Im(E)")
|
||||||
savefig("temp/p_space_vs_HO.pdf")
|
savefig("temp/2b_p_space_vs_HO.pdf")
|
||||||
Loading…
Reference in New Issue