Update test imports for qiskit-aer 0.11#913
Conversation
|
Reading #1526 more closely, I see that Qiskit/qiskit#5089 added some importing magic to redirect Maybe we could have satisfied pylint in a different way without updating the imports yet, but we only use aer in the tests, so it doesn't seem like there is a need to keep compatibility with qiskit-aer<0.11. |
We probably could have configured pylint to see it, but I feel like that would have been far more work than is necessary. As you said, we only use Aer in tests. My understanding of Qiskit/qiskit#5089 and Qiskit/qiskit-aer#1526 is that Qiskit Aer has officially moved to |
Right. If aer were an actual dependency of qiskit-experiments, I think maybe we should have figured out how to get pylint to ignore it since it seems unnecessary to force users to update to keep pylint happy, but since this is just the version that gets used in tests it seems okay to require the new version. |
|
Yeah, the new path is |
|
Since aer is only used in tests, I think it is okay to increase the minimum version. It is probably uncommon for someone to want to run the tests and not be able to update aer (in the worst case, they can make a separate environment for running qiskit-experiments tests). We could ignore the package in pylint, but then we have the small downside of pylint not checking aer function signatures. Maybe doing try/except with both import paths could support 0.10 or 0.11 and still get pylint to check the aer signatures. I don't feel too strongly. The main thing is that we pinned aer in #911 to get tests working again and should try to get it unpinned. I defer to @coruscating on which way is best. |
|
+1 to increase the minimum version (in |
* Backend timing helper for experiments (#860) Added `BackendTiming` class with methods for helping round delay and pulse durations to match backend timing constraints. Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com> * Update test imports for qiskit-aer 0.11 (#913) Update test imports for qiskit-aer 0.11 See Qiskit/qiskit-aer#1526 Co-authored-by: Will Shanks <willshanks@us.ibm.com> Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com>
Update test imports for qiskit-aer 0.11 See Qiskit/qiskit-aer#1526
Update test imports for qiskit-aer 0.11 See Qiskit/qiskit-aer#1526
Summary
qiskit-aer moved from a namespace package at
qiskit.providers.aerto its own packageqiskit_aerwith version 0.11. Tests in qiskit-experiments importing from the old path fail with qiskit-aer 0.11. This PR updates those imports.Closes #912
Details and comments
This is a follow up to #911.
For the aer change, see See Qiskit/qiskit-aer#1526.
@conradhaupt and I were running into this, but I can't add him as a reviewer.