Increase krylovdim and check convergence
This commit is contained in:
parent
c38e4c8c0e
commit
7e419aee26
|
|
@ -134,8 +134,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 * 2)
|
evals, evecs, info = eigsolve(H, x₀, levels, resonances ? :LI : :SR; ishermitian = H.hermitian, tol = tolerance, krylovdim = levels * 4)
|
||||||
resonances || info.converged < levels && throw(error("Not enough convergence")) # don't check convergence for resonances
|
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
|
||||||
CUDA.reclaim()
|
CUDA.reclaim()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue