mu defaults to 0.5
This commit is contained in:
parent
e8593d51a3
commit
3b7d7c7689
|
|
@ -27,11 +27,10 @@ end
|
||||||
|
|
||||||
N=10
|
N=10
|
||||||
n_image=1
|
n_image=1
|
||||||
μ=0.5
|
|
||||||
|
|
||||||
for L in 5.0:14.0
|
for L in 5.0:14.0
|
||||||
println("Constructing H operator...")
|
println("Constructing H operator...")
|
||||||
s=system{T}(3,3,N,L,μ)
|
s=system{T}(3,3,N,L)
|
||||||
@time H=Hamiltonian{T}(s,V_test,0,n_image,mode)
|
@time H=Hamiltonian{T}(s,V_test,0,n_image,mode)
|
||||||
println("Applying H 1000 times...")
|
println("Applying H 1000 times...")
|
||||||
if GPU_mode
|
if GPU_mode
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ struct system{T}
|
||||||
L::T
|
L::T
|
||||||
μ::T
|
μ::T
|
||||||
|
|
||||||
system{T}(d::Int, n::Int, N::Int, L::Real, μ::Real) where {T<:Float} = new{T}(d, n, N, convert(T, L), convert(T, μ))
|
system{T}(d::Int, n::Int, N::Int, L::Real, μ::Real=0.5) where {T<:Float} = new{T}(d, n, N, convert(T, L), convert(T, μ))
|
||||||
end
|
end
|
||||||
|
|
||||||
norm_square(x::Array{Int})::Int = sum(x .* x)
|
norm_square(x::Array{Int})::Int = sum(x .* x)
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,9 @@
|
||||||
"N = 6\n",
|
"N = 6\n",
|
||||||
"L = 12\n",
|
"L = 12\n",
|
||||||
"ϕ = 0.0\n",
|
"ϕ = 0.0\n",
|
||||||
"μ = 0.5\n",
|
|
||||||
"n_imag = 1\n",
|
"n_imag = 1\n",
|
||||||
"\n",
|
"\n",
|
||||||
"s = system{T}(d, n, N, L, μ)\n",
|
"s = system{T}(d, n, N, L)\n",
|
||||||
"H = Hamiltonian{T}(s, V_gauss, ϕ, n_imag, mode)\n",
|
"H = Hamiltonian{T}(s, V_gauss, ϕ, n_imag, mode)\n",
|
||||||
"@time evals, evecs, info = eig(H, 5)\n",
|
"@time evals, evecs, info = eig(H, 5)\n",
|
||||||
"print(info.numops, \" operations : \")\n",
|
"print(info.numops, \" operations : \")\n",
|
||||||
|
|
@ -52,10 +51,9 @@
|
||||||
"N = 32\n",
|
"N = 32\n",
|
||||||
"L = 16\n",
|
"L = 16\n",
|
||||||
"ϕ = 0.5\n",
|
"ϕ = 0.5\n",
|
||||||
"μ = 0.5\n",
|
|
||||||
"n_imag = 0\n",
|
"n_imag = 0\n",
|
||||||
"\n",
|
"\n",
|
||||||
"s = system{T}(d, n, N, L, μ)\n",
|
"s = system{T}(d, n, N, L)\n",
|
||||||
"H = Hamiltonian{T}(s, V_gauss, ϕ, n_imag, mode)\n",
|
"H = Hamiltonian{T}(s, V_gauss, ϕ, n_imag, mode)\n",
|
||||||
"@time evals, evecs, info = eig(H, 20)\n",
|
"@time evals, evecs, info = eig(H, 20)\n",
|
||||||
"print(info.numops, \" operations : \")\n",
|
"print(info.numops, \" operations : \")\n",
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
" n_image=0\n",
|
" n_image=0\n",
|
||||||
" for L::T in 5.0:9.0\n",
|
" for L::T in 5.0:9.0\n",
|
||||||
" print(\"L=$L\")\n",
|
" print(\"L=$L\")\n",
|
||||||
" s=system{T}(3,n,N,L,0.5)\n",
|
" s=system{T}(3,n,N,L)\n",
|
||||||
" H=Hamiltonian{T}(s,V_test,0.0,n_image,mode)\n",
|
" H=Hamiltonian{T}(s,V_test,0.0,n_image,mode)\n",
|
||||||
" evals,_,_ = eig(H,5)\n",
|
" evals,_,_ = eig(H,5)\n",
|
||||||
" println(real.(evals))\n",
|
" println(real.(evals))\n",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue