!feat: GEVP now returns all eigenvectors instead of just the ones for

the specified state.
This commit is contained in:
Fabian Joswig 2022-05-16 11:44:02 +01:00
parent ba054fa11c
commit 92b19cba9f
2 changed files with 10 additions and 15 deletions

View file

@ -231,11 +231,10 @@ def test_matrix_corr():
corr_mat = pe.Corr(np.array([[corr_aa, corr_ab], [corr_ab, corr_aa]]))
corr_mat.item(0, 0)
vec_0 = corr_mat.GEVP(0, 1, sorted_list=None)
vec_1 = corr_mat.GEVP(0, 1, state=1, sorted_list=None)
vecs = corr_mat.GEVP(0, 1, sorted_list=None)
corr_0 = corr_mat.projected(vec_0)
corr_1 = corr_mat.projected(vec_1)
corr_0 = corr_mat.projected(vecs[0])
corr_1 = corr_mat.projected(vecs[0])
assert np.all([o == 0 for o in corr_0 - corr_aa])
assert np.all([o == 0 for o in corr_1 - corr_aa])