-
Notifications
You must be signed in to change notification settings - Fork 69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with qiskit version 0.33.0 related to the function measure
#164
Comments
Hi @andreamari, thank you for pointing this out and for suggesting the fix! |
Thanks @andreamari, I'll open a PR for the new version of Qiskit! |
Apologies everyone - this shouldn't have been removed without a deprecation warning, and I'll add it back (with a deprecation warning) in Terra 0.19.1 later this week. The loose See Qiskit/qiskit#7370 for our tracking issue on this. |
Terra 0.19.1 and Qiskit 0.33.1 are live on PyPI now, which re-instated these functions with deprecation warnings. |
Thank you @jakelishman! 🙏 |
Describe the bug
In the last version (
0.33.0
) of qiskit the functionmeasure
has been removed fromqiskit.circuit.measure
.In
pennylane_qiskit.qiskit_device.py
there is however this line that now can create problems:pennylane-qiskit/pennylane_qiskit/qiskit_device.py
Line 27 in 0998b85
To Reproduce
Note sure how to reproduce, but the problem shows up in a Mitiq PR unitaryfund/mitiq#1040.
See this line: https://github.com/unitaryfund/mitiq/runs/4442208499?check_suite_focus=true#step:6:2449
Possible Fix
Removing the import:
pennylane-qiskit/pennylane_qiskit/qiskit_device.py
Line 27 in 0998b85
and replacing
pennylane-qiskit/pennylane_qiskit/qiskit_device.py
Line 232 in 0998b85
with
self._circuit.measure(qr, cr)
may fix the problem. Not tested.The text was updated successfully, but these errors were encountered: