Merge branch 'master' into calculations

This commit is contained in:
ysyapa 2023-08-25 21:21:32 +00:00
commit 7a74745f7e
1 changed files with 1 additions and 1 deletions

View File

@ -134,7 +134,7 @@ 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) evals, evecs, info = eigsolve(H, x₀, levels, resonances ? :LI : :SR; ishermitian = H.hermitian, tol = tolerance, krylovdim = levels * 8)
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