From 4cd506ab15c82ca32955eb96dfee6d006798e2ca Mon Sep 17 00:00:00 2001 From: Nuwan Yapa Date: Wed, 21 Feb 2024 13:24:06 -0500 Subject: [PATCH] New basis ordering --- ho_basis.jl | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/ho_basis.jl b/ho_basis.jl index 4a31c96..6a6a320 100644 --- a/ho_basis.jl +++ b/ho_basis.jl @@ -2,19 +2,47 @@ gl(R, l, n) = throw("unimplemented") function get_sp_basis(E_max) + Es = Int[] ns = Int[] ls = Int[] # Heyde p67 with E = N and n = k + 1 - for E in E_max:-1:0 - for l in E:-2:0 - n = 1 + (E - l) / 2 + for E in 0 : E_max + for n in 0 : E ÷ 2 + l = E - 2*n + push!(Es, E) push!(ns, n) push!(ls, l) end end - return (ns, ls) + return (Es, ns, ls) +end + +function get_2p_basis(E_max) + Es = Int[] + n1s = Int[] + l1s = Int[] + n2s = Int[] + l2s = Int[] + + # E = 2*n1 + l1 + 2*n2 + l2 + for E in 0 : 2*E_max + for n1 in 0 : E ÷ 2 + for n2 in 0 : (E - 2*n1) ÷ 2 + for l1 in 0 : (E - 2*n1 - 2*n2) + l2 = E - 2*n1 - 2*n2 - l1 + push!(Es, E) + push!(n1s, n1) + push!(l1s, l1) + push!(n2s, n2) + push!(l2s, l2) + end + end + end + end + + return (Es, n1s, l1s, n2s, l2s) end get_V_matrix(V_l, ls, ns) = throw("unimplemented")