-
Notifications
You must be signed in to change notification settings - Fork 17
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
Remove pulse creation helpers #793
Conversation
@andrea-pasquale here your opinion would be for sure relevant. |
Quick note that may affect this: in #789 I simplified a lot native.py, which also slightly affects how these methods look d279ba6. I didn't have time to summarize the changes in the other PR, I will do so tomorrow. Other than that, personally I am not 100% sure what we should do with the platform.qubits[qubit].native_gates.RX is very user-friendly. |
My idea is that in Qibocal, the qubit are serialized by name, but loaded as objects as soon as the platform is available (so not inside the routine, but before). Thus, the user should do: qubit.native_gates.RX which is not unreasonable (to me). |
From the user point of view using directly |
I think in this case defining the pulse directly using the pulse API (as |
Consider that the |
Great, if this is the case then I think that we can drop them. Btw, should we have also a corresponding development branch in qibocal to be synchronized with |
At some point, definitely. However, right now we're very much work-in-progress, and it's not planned to be merged before a couple of months. |
Ok, then just let me know when I should start updating Qibocal :) |
c99f014
to
56fd7ab
Compare
@stavros11 @andrea-pasquale is there enough consensus for this? Should I keep going and fix tests? |
From my side we can proceed. |
Fine for me too. Note that these methods will even lose one argument in #789 since we are dropping the |
Since this is such a simple change, but fixing the test will require quite a bunch of work (I guess), I'm actually tempted to wait for #789 before fixing. |
0725bc1
to
7993aec
Compare
0d34a83
to
93c05f2
Compare
56fd7ab
to
17b4bcf
Compare
Ok, since #789 has been merged, I started fixing the tests in this PR. However, I immediately realized that there will be quite a "huge" overhead due to channel setting (every time you create a pulse, you should also reset the channel, since the default one could be the wrong one). One option could have been to ensure that the channel was properly set during the native deserialization and updates. So, this PR is again on hold, waiting for #792 (after that, the replacement should be simple enough, as it was planned before). |
8d74b7f
to
6f4c84b
Compare
9c9da81
to
7f412cf
Compare
7f412cf
to
4af3634
Compare
for more information, see https://pre-commit.ci
Just noting that this is also being done in #885, I am guessing independently from here. A different representation of natives is also introduced there. |
Thanks @stavros11. As soon as we'll start the review of #885, I will consider closing this. Here there is just one trivial commit, but I do not bother to open a dedicated issue now. I'd be happy to close this if it's done somewhere else (this commit is here since the January 30, but waiting for the channels to fix the tests). |
Ok, better the issue at this point. |
Most of the pulse creation boilerplate is just a different way to access the native
pulses (in a single call, with more arguments, just saving some accessors).
The best approach for this would be to pass around Qibolab objects in Qibocal, instead
of working with bare strings and integers all the way down, and then have to repeat the
qubit object-retrieval procedure in each and every routine.
We could further simplify the access to native gates. But this is not strictly related
to the creation methods themselves (but rather to the overall reorganization of
natives).
create_
methods