-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
When using eigs_lanczos, if I request more eigenvalues than the Hilbert space allows, the error is a bit difficult to understand. The current error message is "ERROR: LoadError: Mat::submat(): indices out of bounds or incorrectly used", when preferably it should tell that the requested number of eigenvalues is too large, or perhaps even better, default neigvals to the largest value allowed. A minimal example follows below:
using XDiag
let
L=10 # systemsize
N = 0 # number of particles
block = Electron(L, N ÷ 2, N ÷ 2)
ops = OpSum()
# Hubbard model as example
for i in 1:L-1
ops += "t" * Op("Hop",[i,i+1])
end
ops += "U" * Op("HubbardU")
ops["t"] = -1.0
ops["U"] = -6.0
res = eigs_lanczos(ops,block,neigvals=2) # ask for two converged eigenvalues
end
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request