Fix Chebyshev filtering instabilities
Description
The norm of the state out of the Chebyshev filtering depends on the polynomial order. As this is automatically updated, we do get states with fast differences in norm (observed up to 26 orders of magnitude).
This causes errors in the subspace diagonalization or not, depending on the numerical error used.
This is fixed by normalizing each state after the Chebyshev filtering, resulting in an overlap matrix with diagonal elements equal to unity, and hence a stable subspace diagonalization.
News snippet
Improve stability for the Chebyshev filtering.
Checklist
-
I have checked that my code follows the Octopus coding standards -
I have added tests for all the new features added in this request.