-
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
adding copy argument to QFTGate.__array__ #12979
Conversation
One or more of the following people are relevant to this code:
|
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 a lot @alexanderivrii! I added a tiny suggestion but the PR can also be merged as-is, given that this bug is becoming annoying in the merge queue.
"""Return a numpy array for the QFTGate.""" | ||
if copy is False: | ||
raise ValueError("unable to avoid copy while creating an array as requested") |
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.
Tiny tiny suggestion:
raise ValueError("unable to avoid copy while creating an array as requested") | |
raise ValueError("Unable to avoid copy while creating an array as requested") |
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 @ElePT! I agree that the capitalized "U" looks better, but all the other 30+ identical message use lower-case "u".
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.
hah, tunnel vision. Let's keep it consistent then.
The QFT gate was added in 1.2, right? (#11463) In that case we should also backport the fix. |
Pull Request Test Coverage Report for Build 10450381480Details
💛 - Coveralls |
(cherry picked from commit 06392c5)
(cherry picked from commit 06392c5) Co-authored-by: Alexander Ivrii <[email protected]>
Summary
Fixes numpy support for QFTGate: the QFT gate PR was developed in parallel with #11999 and did not get the required upgrade.