Skip to content
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

Merged
merged 8 commits into from
Feb 26, 2025

Conversation

dstrain115
Copy link
Collaborator

@dstrain115 dstrain115 commented Feb 25, 2025

  • 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.

- 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.
@CirqBot CirqBot added the size: L 250< lines changed <1000 label Feb 25, 2025
@dstrain115 dstrain115 changed the title Add reset gates Partial support of reset gate in cirq_google protos Feb 25, 2025
Copy link

codecov bot commented Feb 25, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.16%. Comparing base (7a834a0) to head (ff0c75c).
Report is 6 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@dstrain115 dstrain115 marked this pull request as ready for review February 25, 2025 21:52
@dstrain115 dstrain115 requested review from wcourtney, vtomole, verult and a team as code owners February 25, 2025 21:52
Copy link
Collaborator

@pavoljuhas pavoljuhas left a 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(
Copy link
Collaborator

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@dstrain115 dstrain115 added this pull request to the merge queue Feb 26, 2025
Merged via the queue into quantumlib:main with commit 60551b4 Feb 26, 2025
38 checks passed
@dstrain115 dstrain115 deleted the add_reset_gates branch February 26, 2025 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: L 250< lines changed <1000
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants