-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Partial support of reset gate in cirq_google protos #7095
Conversation
- We have no need for this parameter and it is pretty much always set to the most permissive parameter. - Removes this parameter to simplify serialization.
- This change adds reset gate to the list of gates and adds a default deserialization to cirq.ResetChannel. - Other internal hardware reset mechanisms are not yet supported, and will be added later using custom deserializers.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7095 +/- ##
==========================================
- Coverage 98.17% 98.16% -0.01%
==========================================
Files 1089 1089
Lines 95177 95192 +15
==========================================
+ Hits 93438 93448 +10
- Misses 1739 1744 +5 ☔ View full report in Codecov by Sentry. |
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.
LGTM with a minor comment.
dimensions = arg_func_langs.arg_from_proto( | ||
operation_proto.resetgate.arguments.get('dimension', 2) | ||
) | ||
assert isinstance( |
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.
nit: prefer not to use assert
in non test 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.
Done.
a default deserialization to cirq.ResetChannel.
and will be added later using custom deserializers.