Ensure SycamoreGate instances are preserved over serialization#7093
Merged
dstrain115 merged 2 commits intoquantumlib:mainfrom Feb 26, 2025
Merged
Ensure SycamoreGate instances are preserved over serialization#7093dstrain115 merged 2 commits intoquantumlib:mainfrom
dstrain115 merged 2 commits intoquantumlib:mainfrom
Conversation
Collaborator
dstrain115
commented
Feb 24, 2025
- Put in a special case for fsimgate deserialization so that sycamore gates are serialized to that representation.
- This will avoid potential floating point errors when deserializing.
- Put in a special case for fsimgate deserialization so that sycamore gates are serialized to that representation. - This will avoid potential floating point errors when deserializing.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7093 +/- ##
==========================================
- Coverage 98.17% 98.17% -0.01%
==========================================
Files 1089 1089
Lines 95217 95202 -15
==========================================
- Hits 93480 93464 -16
- Misses 1737 1738 +1 ☔ View full report in Codecov by Sentry. |
senecameeks
reviewed
Feb 25, 2025
| and np.isclose(theta, np.pi / 2) | ||
| and np.isclose(phi, np.pi / 6) | ||
| ): | ||
| op = SYC(*qubits) |
Collaborator
There was a problem hiding this comment.
What happens if the SYC gate also has the FSimViaModelTag?
Collaborator
Author
There was a problem hiding this comment.
Good call. Added a condition so that it does not convert to SYC if it is tagged.
senecameeks
approved these changes
Feb 26, 2025
BichengYing
pushed a commit
to BichengYing/Cirq
that referenced
this pull request
Jun 20, 2025
…umlib#7093) * Ensure SycamoreGate instances are preserved over serialization - Put in a special case for fsimgate deserialization so that sycamore gates are serialized to that representation. - This will avoid potential floating point errors when deserializing. * Don't convert to SYC if tags on the FSim.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.