-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Ensure SycamoreGate instances are preserved over serialization #7093
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
Ensure SycamoreGate instances are preserved over serialization #7093
Conversation
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. |
and np.isclose(theta, np.pi / 2) | ||
and np.isclose(phi, np.pi / 6) | ||
): | ||
op = SYC(*qubits) |
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.
What happens if the SYC gate also has the FSimViaModelTag
?
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.
Good call. Added a condition so that it does not convert to SYC if it is tagged.
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.
Thanks, Doug!
…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.