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 cast to real for Gram-Schmidt coefficients #62

Closed
wants to merge 1 commit into from

Conversation

Lazersmoke
Copy link

According to this line, in the hermitian case, the actual coefficients are supposed to be real:

H::HType # Gram-Schmidt coefficients (real for Hermitian matrices)

but the matrix type can be complex. eigen! is not implemented for complex-valued
symmetric tridiagonal matrices in LinearAlgebra, so this throws a method
error if the cache is complex hermitian.

This needs verification to ensure this is actually correct, but making this change makes the code work for my application at least.

Closes #61

In the hermitian case, the actual coefficients are supposed to be real, but the matrix
type can be complex. `eigen!` is not implemented for complex-valued
symmetric tridiagonal matrices in LinearAlgebra, so this throws a method
error if the cache is complex hermitian.
@ChrisRackauckas
Copy link
Member

That seems sketch and possibly not true in general. @YingboMa ?

@Lazersmoke
Copy link
Author

Turns out you should not do this. The diagonal Gram-Schmidt coefficients (so, H[i,i] for each i) are real, but not the off-diagonal ones.

@Lazersmoke Lazersmoke closed this Jul 20, 2021
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

Successfully merging this pull request may close these issues.

Complex valued expv! gives MethodError in some cases
2 participants