-
Notifications
You must be signed in to change notification settings - Fork 15
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
Fixing compiler rule #1044
Fixing compiler rule #1044
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1044 +/- ##
=======================================
Coverage 70.24% 70.24%
=======================================
Files 64 64
Lines 6701 6701
=======================================
Hits 4707 4707
Misses 1994 1994
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks @andrea-pasquale. I agree with the explanation, and I trust your experiment. It would be nice to have this fix in both 0.1 and 0.2 (e.g. we could merge this PR in 0.1, and I could repeat the fix in 0.2). But before merging, I'd like to have a test failing in If no one will volunteer before, I'll provide the test myself. |
I have realized it is not ready for review
There is a small typo in the last formula ( it should be Btw, from the Manenti book, sec 14.6.1, we know that a generic sinusoidal pulse and it holds that (sec.14.6.4) Since we can decompose a generic GPI2 as we can see that the sign of the GPI2 phase in qibolab is correct and we have to change the Z rule, in principle leaving the latter as it is and changing the sign of the phase in the |
I didn't take the time yet to check it yet. But if you're using it, I'm open to trust your results. To properly determine the sign, it should be traced in the calculation (as you did), and through the whole usage in the code. Whenever it will be merged, I will apply the same fix to 0.2. |
@stavros11 maybe this is not the final solution to all the (default) compiler problems, but it's well-documented (and arguably well-motivated), and it fixes something. I'd propose to merge this and the companion PR #1057 for 0.2, and then scheduler a deeper review of the transpiler/compiler. |
I believe that this was the issue which was giving us a weird behavior in the single qubit tomography @stavros11 @alecandido.
If we consider the definition of GPI2 provided by Qibo we have that$GPI2(0) = R_X(\pi/2)$ and $GPI2(\pi /2) = R_Y(\pi/2)$ which means that the GPI2 should have the following representation
We now need to compute how$GPI2(\phi)$ changes when we apply an $R_Z(\tilde \phi)$ gate
We can find$\phi^*$ with the following passages
Therefore$\phi^* = \phi - \tilde \phi$ which means that rule for $R_Z(\tilde \phi)$ should be $\phi \rightarrow \phi - \tilde \phi$
@stavros11 feel free to check and let me know if the fix works for you as well.
Currently this PR is pointing to
main
feel free to merge it directly to0.2
or0.1
.Checklist: