-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix qpy for controlled UnitaryGate
#10809
Conversation
One or more of the the following people are requested to review this:
|
Pull Request Test Coverage Report for Build 6144717289
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Matthew Treinish <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the quick update.
(oh there is still a merge conflict)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM, thanks for the update, but I'll hold off on the merge queue because something looks weird with the last rebase, it pulled in a bunch of unrelated commits to your branch.
* Add exception for controlled gate * Add reno * Add fix * Adjust test * Update test/python/circuit/test_circuit_load_from_qpy.py Co-authored-by: Matthew Treinish <[email protected]> * Fix bug with ucr*-dg gates * Fix typos in comments * Fix typo again --------- Co-authored-by: Matthew Treinish <[email protected]> (cherry picked from commit 9843fbf) # Conflicts: # qiskit/qpy/binary_io/circuits.py
Summary
Fixes #10802. QPY was failing to deserialize the
NUMPY_OBJ
from the unitary gate definition because it was looking for theclbits
of a circuit that, in that scope, wasNone
.Details and comments
I am not too happy about having to decompose the circuit so many times for the test. I get that after #10758, the uuid is appended to the name of the gate, which makes the circuits not equal:
But I'm not sure why, for example, decomposing once fails: