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

Add serialization support to more gates #6479

Merged
merged 4 commits into from
Mar 8, 2024
Merged

Conversation

NoureldinYosri
Copy link
Collaborator

@NoureldinYosri NoureldinYosri commented Feb 26, 2024

This PR adds serializatoin support to

supersedes #6458

cc: @dstrain115 @maffoo

@CirqBot CirqBot added the size: L 250< lines changed <1000 label Feb 26, 2024
@NoureldinYosri NoureldinYosri marked this pull request as ready for review February 26, 2024 22:59
Copy link

codecov bot commented Feb 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.75%. Comparing base (4513892) to head (5b93695).

❗ Current head 5b93695 differs from pull request most recent head 010012f. Consider uploading reports for the commit 010012f to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6479      +/-   ##
==========================================
- Coverage   97.76%   97.75%   -0.02%     
==========================================
  Files        1105     1105              
  Lines       94963    94959       -4     
==========================================
- Hits        92837    92823      -14     
- Misses       2126     2136      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@verult
Copy link
Collaborator

verult commented Feb 28, 2024

You might already thinking about this as a next step, but reminder to add to the device gateset as well. Happy to talk through the required changes if needed.

cirq-google/cirq_google/api/v2/program.proto Show resolved Hide resolved
message CliffordTableau {
optional int32 num_qubits = 1;
optional int32 initial_state = 2;
optional bytes rs = 3;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment as before w.r.t. numpy serialization. In this case, I think it might be okay, but we should at least document it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I changed the serialization to be independent of numpy

@NoureldinYosri
Copy link
Collaborator Author

@verult thanks for pointing that out. that will be a seprate PR if we need it.

@NoureldinYosri NoureldinYosri enabled auto-merge (squash) March 8, 2024 19:37
@NoureldinYosri NoureldinYosri merged commit bc76660 into main Mar 8, 2024
35 checks passed
@NoureldinYosri NoureldinYosri deleted the update_serialization branch March 8, 2024 19:48
harry-phasecraft pushed a commit to PhaseCraft/Cirq that referenced this pull request Oct 31, 2024
This PR adds serializatoin support to
- IdentityGate => fixes quantumlib#4833
- HPowGate => allows sending circuits with cirq.H to backend
- changes the handling of SingleQubitCliffordGate from automatic conversion to PhasedXZGate to have its own proto (originally proposed in quantumlib#6418)
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.

Cannot serialize identity gate on Quantum Engine
4 participants