diff --git a/test/moshinsky.jl b/test/moshinsky.jl new file mode 100644 index 0000000..a89dd33 --- /dev/null +++ b/test/moshinsky.jl @@ -0,0 +1,21 @@ +println("### Test: U' * U == identity") + +using LinearAlgebra + +include("../ho_basis.jl") + +E_max = 15 +Λ = 0 + +println("No of threads = ", Threads.nthreads()) + +@time "Basis" Es, n1s, l1s, n2s, l2s = get_2p_basis(E_max) + +println("Basis size = ", length(Es)) + +@time "Moshinsky brackets" U = Moshinsky_transform(Es, n1s, l1s, n2s, l2s, Λ) + +check = conj(U) * U - I + +println("Maximum = ", maximum(abs.(check))) +println("Norm = ", sum(check .* conj(check)))