-
Notifications
You must be signed in to change notification settings - Fork 347
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: Gate instructions specified as tuples no longer error when using a list of parameters. #1716
fix: Gate instructions specified as tuples no longer error when using a list of parameters. #1716
Conversation
list of parameters.
☂️ Python Coverage
Overall Coverage
New FilesNo new covered files... Modified Files
|
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.
Agree with deprecating the support for tuples. One comment on making a check a little more robust, but otherwise looks good.
if len(instruction) == 2: | ||
self.measure(instruction[1], None) | ||
else: | ||
self.measure(instruction[1], instruction[2]) |
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.
Shouldn't this else
check for len == 3
and raise an exception if len > 3
?
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.
Agreed, but this is how it was written in pyQuil 3, and since this code exists purely for backwards compatibility, I'm hesitant to add a new error case.
…orks-for-parametric-gates
…orks-for-parametric-gates
…orks-for-parametric-gates
Description
Closes #1700
Checklist
master
branch