Specify krylovdim

This commit is contained in:
ysyapa 2023-08-10 09:11:00 +00:00
parent 3b7d7c7689
commit 970bbbda4c
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)...)
synchronize()
end
evals, evecs, info = eigsolve(H, x₀, levels, resonances ? :LI : :SR; ishermitian = H.hermitian, tol = tolerance)
evals, evecs, info = eigsolve(H, x₀, levels, resonances ? :LI : :SR; ishermitian = H.hermitian, tol = tolerance, krylovdim = levels * 2)
resonances || info.converged < levels && throw(error("Not enough convergence")) # don't check convergence for resonances
if H.hermitian evals = real.(evals) end
if H.mode == gpu_cutensor # to avoid possible GPU memory leak