-
Notifications
You must be signed in to change notification settings - Fork 2
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
Make Lanczos algorithm more robust #24
Comments
I have done some investigation of a few methods.
In general, all methods that adds some orthogonalization-step to the method will require that we save all the Krylov vectors we generate. This increases the memory footprint of the calculation quite a bit. In my experience, the Greens function does not converge faster when we add orthogonalization. I have not actually looked at the numerical accuracy of the resulting Greens function though. |
Restarting the algorithm after a certain number of iterations seems to be a popular approach, e.g. Thick-Restart Lanczos method: https://zenodo.org/records/1236144 |
Not sure how big this issue is. |
No, I am not sure that this will actually help with calculating the Greens function. The restarted methods work by focusing on certain eigenvalues/eigenvectors. If what you want is just certain eigenvalues/eigenvectors this is great, but for the Greens function to converge quickly, what eigenvalues should we focus on? |
I don't know. Perhaps it's not suitable for calculating Green's functions. |
The way we calculate Greens functions relies on the tridiagonalization of the Hamiltonian. With restarted methods I think we replace the tridiagonal structure with something different, but maybe there is a clever way to calculate the Greens function (we only need one element of the inverse of the Hamiltonian). |
When I quickly read about restarted methods I agree it does seem the matrix is not tridiagonal. So probably the three implementation ideas you outlined above are more promising. |
The Lanczos algorithm may suffer from numerical instability, see discussion in e.g. https://en.wikipedia.org/wiki/Lanczos_algorithm.
The generous unit-test tolerances indicate numerical round-off errors are indeed present (compared the same code on Mac OS X and Ubuntu).
Until now, the errors I have seen have been smaller than the physics of interest.
But it is good to be aware of this numerical instability issue, in particular if very subtle features are of interest.
In https://en.wikipedia.org/wiki/Lanczos_algorithm, a few ideas and references are provided of how to improve the numerical stability of the Lanczos algorithm, that might be relevant for this repository.
The text was updated successfully, but these errors were encountered: