{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "include(\"../Hamiltonian.jl\")\n", "\n", "println(\"Running with \",Threads.nthreads(),\" thread(s)\")\n", "println(\"Available GPUs:\")\n", "println.(name.(devices()))\n", "\n", "T=Float32\n", "\n", "function V_test(r2)\n", " return -4*exp(-r2/4)\n", "end\n", "\n", "function test(mode)\n", " for (n,N) in [(2,16),(3,8)]\n", " println(\"\\n$n-body system with N=$N\")\n", " n_image=0\n", " for L::T in 5.0:9.0\n", " print(\"L=$L\")\n", " s=system{T}(3,n,N,L,0.5)\n", " H=Hamiltonian{T}(s,V_test,0.0,n_image,mode)\n", " evals,_,_ = eig(H,5)\n", " println(real.(evals))\n", " end\n", " end\n", "end" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "test(cpu_tensor)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "test(gpu_cutensor)" ] } ], "metadata": { "kernelspec": { "display_name": "Julia 1.8.5", "language": "julia", "name": "julia-1.8" }, "language_info": { "file_extension": ".jl", "mimetype": "application/julia", "name": "julia", "version": "1.8.5" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }