Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

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

Merged
DanPuzzuoli merged 4 commits into
qiskit-community:mainfrom
DanPuzzuoli:eigh_fix
Dec 19, 2022
Merged

Fixing tests failing due to numpy eigh sign convention changes#172
DanPuzzuoli merged 4 commits into
qiskit-community:mainfrom
DanPuzzuoli:eigh_fix

Conversation

@DanPuzzuoli
Copy link
Copy Markdown
Collaborator

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.

Comment thread test/dynamics/models/test_generator_model.py Outdated
Comment thread test/dynamics/models/test_generator_model.py Outdated
DanPuzzuoli and others added 2 commits December 19, 2022 13:46
Co-authored-by: Ian Hincks <ian.hincks@gmail.com>
Co-authored-by: Ian Hincks <ian.hincks@gmail.com>
@DanPuzzuoli DanPuzzuoli requested a review from ihincks December 19, 2022 18:47
@DanPuzzuoli DanPuzzuoli merged commit 294840f into qiskit-community:main Dec 19, 2022
DanPuzzuoli added a commit to DanPuzzuoli/qiskit-dynamics that referenced this pull request Jan 5, 2023
to24toro pushed a commit to to24toro/qiskit-dynamics that referenced this pull request Feb 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

numpy 1.24 breaks some tests

2 participants