-
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
Implement __array__
for qasm2._DefinedGate
#12119
Conversation
Gates defined from OpenQASM 2 should have a well-defined matrix form (up to global phase) whenever all the constituent parts of the definition do. This manually makes such a matrix available.
One or more of the the following people are requested to review this:
|
Pull Request Test Coverage Report for Build 9098528425Details
💛 - 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.
This LGTM now, but I'm going to hold off on auto merging it to stable/1.1 for 1.1.0. I think it's a bit out of scope for backport at this point. We can discuss it for 1.1.1 (I think we might want to just hold it for 1.2.0)
* Implement `__array__` for `qasm2._DefinedGate` Gates defined from OpenQASM 2 should have a well-defined matrix form (up to global phase) whenever all the constituent parts of the definition do. This manually makes such a matrix available. * Fix signature for Numpy 2.0 (cherry picked from commit 767bd07)
* Implement `__array__` for `qasm2._DefinedGate` Gates defined from OpenQASM 2 should have a well-defined matrix form (up to global phase) whenever all the constituent parts of the definition do. This manually makes such a matrix available. * Fix signature for Numpy 2.0 (cherry picked from commit 767bd07) Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
* Implement `__array__` for `qasm2._DefinedGate` Gates defined from OpenQASM 2 should have a well-defined matrix form (up to global phase) whenever all the constituent parts of the definition do. This manually makes such a matrix available. * Fix signature for Numpy 2.0
Summary
Gates defined from OpenQASM 2 should have a well-defined matrix form (up to global phase) whenever all the constituent parts of the definition do. This manually makes such a matrix available.
Details and comments
Fix #12100.