-
Notifications
You must be signed in to change notification settings - Fork 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
Create a transformer cancels the effect of Z-phases #6837
base: main
Are you sure you want to change the base?
Conversation
*, | ||
context: Optional[transformer_api.TransformerContext] = None, | ||
) -> 'cirq.Circuit': | ||
"""Replace every occurance of a calibrated gate with a proper replacement. |
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.
Maybe a more descriptive docstring?
theta=self.target_as_fsim.theta - delta_theta, | ||
gamma=self.target_as_fsim.gamma - delta_gamma, | ||
phi=self.target_as_fsim.phi - delta_phi, |
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.
theta
and phi
are not z-phases. Can we directly insert the z-rotations that take care of cancelling the phases (just the other three angles)?
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.
theta
andphi
are not z-phases.
yes, but if they were calibrated then it makes sense to change them as well. if they were not calibrated then the delta would be
Can we directly insert the z-rotations that take care of cancelling the phases (just the other three angles)?
we can, I'm okay either way
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.
In order for this to be ready to run on hardware, it would be great if there were at least an option to only cancel the z-phases (not theta and phi) and for this to be implemented as z rotations rather than fSim gates. Thanks, Nour.
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.
ptal
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, thanks, Nour!
Tested in this colab.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6837 +/- ##
=======================================
Coverage 97.86% 97.86%
=======================================
Files 1084 1084
Lines 93954 94034 +80
=======================================
+ Hits 91944 92024 +80
Misses 2010 2010 ☔ View full report in Codecov by Sentry. |
No description provided.