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

geneigsolve not correctly identifying positive definite and hermitian matrices #67

Open
JoeyT1994 opened this issue Jan 24, 2023 · 1 comment

Comments

@JoeyT1994
Copy link

JoeyT1994 commented Jan 24, 2023

I am trying to get geneigsolve working but having no luck.

For instance, the trivial example

using KrylovKit
using LinearAlgebra


A = Matrix(1I, 5,5)
B = Matrix(1I, 5,5)

@show KrylovKit.geneigsolve((A,B))

generates the following error:

image

And more complicated versions seem to generate similar errors (it complains the operators are not Hermitian or Positive Definite even when they are).

Am I missing something? I see the tests for geneigsolve don't seem to have such an issue?

@JoeyT1994
Copy link
Author

JoeyT1994 commented Jan 26, 2023

Following up. It seems to me there is a strange interdependence between A, B and v (the initial guess) when the code is performing the Hermiticity check.

For instance the following runs fine

A = [1.0 0.0; 0.0 1.0]
B = [1.2 0.0; 0.0 0.4]
v = [1.0, 1.0]

@show KrylovKit.geneigsolve((A,B), v; isposdef = true, issymmetric = true)

but the following raises an error

A = [1.0 0.0; 0.0 1.0]
B = [1.2 0.0; 0.0 0.4]
v = [0.0, -1.0]

@show KrylovKit.geneigsolve((A,B), v; isposdef = true, issymmetric = true)

I suppose the check must be happening on some projection of the operators in the Krylov basis but it seems too 'delicate' to make sense?

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

1 participant