Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bound argument so that all eigenvalues in the bound can be solved for. #93

Open
Zeki-Zhang opened this issue Sep 28, 2024 · 3 comments

Comments

@Zeki-Zhang
Copy link

In certain eigenvalue problems, we wish to solve for all eigenstates whose eigenvalues are under a certain bound, e.g. a quantum system whose energy is less than a upper bound. Since KrylovKit.jl already has which keyarg, so I guess a lower or upper bound can be used to specify a eigenvalue range.

@lkdvos
Copy link
Collaborator

lkdvos commented Sep 29, 2024

The main problem with this feature is that Krylov methods can only be used to target "extremal" values. This means that you can ask for the smallest or largest reals, but if you want to extract something about the middle of the spectrum you have to get a little more creative. There are some ways to do this, I think the relevant term is "shift-and-invert", but this is not something that is currently supported in KrylovKit, which is why that kwarg does not exist.

@Jutho
Copy link
Owner

Jutho commented Sep 29, 2024

@lkdvos , I advised @Zeki-Zhang to open an issue here after a Discourse conversation. The point would be that that you still target extremal eigenvalues, e.g. :SR for a hermitian system, but then rather then specifying howmany, you want all those up to some upper bound. In principle that should be possible, but of course not within the confines of the current interface. There is also a question that you need some guarantee that the number of eigenvalues that satisfy the bound is less than krylovdim, or you need some dynamic krylovdim increase.

So the main issue is how to define a suitable interface that is non-breaking and works well for different choices of which eigenvalues need to be selected.

@lkdvos
Copy link
Collaborator

lkdvos commented Sep 29, 2024

Ah I see, I did indeed misunderstand. That would indeed be a cool addition to have, and sounds reasonable to achieve.

I think, because we are using a positional argument for num, we could just define a BoundedBy(::Number) type, which is only used to dispatch on, and would not be breaking? The dynamic krylov dimension sounds a bit harder, as there really are a lot of options ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants