Added 1D system for testing

This commit is contained in:
ysyapa 2023-04-08 20:01:23 -04:00
parent ac540694d1
commit 8aa89fbf5f
1 changed files with 38 additions and 0 deletions

View File

@ -63,6 +63,44 @@
"print(info.numops,\" operations : \")\n", "print(info.numops,\" operations : \")\n",
"println(evals)" "println(evals)"
] ]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# ./En.run -d 3 -n 3 -e 5 -c pot=v_gauss,v0=-4,r=2 -N 6 -L 14 -c n_imag=0\n",
"# Calculating...\n",
"# -> N = 6\n",
"# -> L = 14\n",
"# -> Spectrum = {-8.49538,-3.35492,-3.34356,-3.32830,-3.07909}...\n",
"# Done.\n",
"# -> Time used = 0.229049s\n",
"\n",
"include(\"Hamiltonian.jl\")\n",
"tolerance=1e-10\n",
"T=Float64\n",
"\n",
"function V_test(r2)\n",
" return -4*exp(-r2/4)\n",
"end\n",
"\n",
"N=4\n",
"L::T=16\n",
"n_imag=0\n",
"\n",
"H=Hamiltonian{T}(V_test,1,3,N,L,convert(T,0),convert(T,0.5),n_imag,cpu_tensor)\n",
"evals,evecs,info=eig(H,16)\n",
"display(evals)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
} }
], ],
"metadata": { "metadata": {