From c69a96c3d41aa3ae1f445fe19b63d45714d76bce Mon Sep 17 00:00:00 2001 From: Nuwan Yapa Date: Thu, 7 May 2026 17:42:01 -0400 Subject: [PATCH] Simple Gaussian benchmark --- calculations/simple_gaussian.jl | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 calculations/simple_gaussian.jl diff --git a/calculations/simple_gaussian.jl b/calculations/simple_gaussian.jl new file mode 100644 index 0000000..9dce926 --- /dev/null +++ b/calculations/simple_gaussian.jl @@ -0,0 +1,32 @@ +# Simple Gaussian benchmark, with units +# Expected 2-body bound state: E₂ ≈ -1.00 MeV + +include("../Hamiltonian.jl") +mode = cpu_tensor +T = Float32 # single-precision mode + +V_0 = -38.4671 # MeV +r_0 = 2 # fm + +V_benchmark(r2) = V_0 * exp(−r2 / r_0^2) + +m_N = 939.565 # MeV/c² +ħ = 197.327 # MeV·fm/c + +μ = (m_N / 2) / ħ^2 + +ϕ = 0 +d = 3 +n = 2 +N = 80 +L = 40 # fm +n_imag = 1 + +s = system{T}(d, n, N, L, μ) +H = Hamiltonian{T}(s, V_benchmark, ϕ, n_imag, mode) +@time evals, _, info = eig(H, 3, resonances = false) + +sort!(evals) +display(evals[1:3]) + +# Result = -1.001821 MeV \ No newline at end of file