qiskit-community / qiskit-dynamics

Tools for building and solving models of quantum systems in Qiskit
https://qiskit-community.github.io/qiskit-dynamics/
Apache License 2.0
106 stars 60 forks source link

Fixing tests failing due to numpy eigh sign convention changes #172

Closed DanPuzzuoli closed 1 year ago

DanPuzzuoli commented 1 year ago

Summary

Closes #171.

As described in #171, a numpy update cause signs of eigenvectors output by eigh to change in some tests. While the output is mathematically correct in both cases, our tests were dependent on the exact value of the entries of the eigenvectors, leading to errors.

Both tests have been modified to be independent of the sign of the eigenvectors output of eigh, avoiding this issue.