2-body works
This commit is contained in:
parent
39ab43b5ae
commit
bc8b026d4d
|
|
@ -141,7 +141,8 @@ function eig(H::Hamiltonian{T}, levels::Int; resonances = !H.hermitian)::Tuple{V
|
||||||
x₀ = CUDA.rand(Complex{T}, vectorDims(H)...)
|
x₀ = CUDA.rand(Complex{T}, vectorDims(H)...)
|
||||||
synchronize()
|
synchronize()
|
||||||
end
|
end
|
||||||
evals, evecs, info = eigsolve(H, x₀, levels, resonances ? :LI : :SR; ishermitian = H.hermitian, tol = tolerance, krylovdim = levels * 4)
|
KrylovKit_hermitian = H.hermitian && H.s.sym == all
|
||||||
|
evals, evecs, info = eigsolve(H, x₀, levels, resonances ? :LI : :SR; ishermitian = KrylovKit_hermitian, tol = tolerance, krylovdim = levels * 4)
|
||||||
info.converged < levels && throw(error("Not enough convergence"))
|
info.converged < levels && throw(error("Not enough convergence"))
|
||||||
if H.hermitian evals = real.(evals) end
|
if H.hermitian evals = real.(evals) end
|
||||||
if H.mode == gpu_cutensor # to avoid possible GPU memory leak
|
if H.mode == gpu_cutensor # to avoid possible GPU memory leak
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue