-
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
Define public API #1030
Define public API #1030
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 0.2 #1030 +/- ##
==========================================
+ Coverage 51.52% 52.34% +0.81%
==========================================
Files 56 63 +7
Lines 2746 2820 +74
==========================================
+ Hits 1415 1476 +61
- Misses 1331 1344 +13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
95eab21
to
6c74127
Compare
I decided to address also #1031 now (and not later on), because in this way we'll be able to enforce the usage of the public API. Indeed, with the presence of It is taking a little bit more, but it should be the last step for 0.2 (but the README), and I deemed it relevant, since the focus we put on stability. I'm sorry for the huge diff, but it will mostly consist of renamed files and fixed imports, including in tests and docs (which are relevant, since they will showcase the usage of the API). |
As no longer necessary
To enforce the public API usage
And its downstream, i.e. zhinst
Whenever possible...
Since they do not require extra deps
Since they do not require extra deps
Keeping the `._core` path, for the time being
@stavros11 now, many cross-references have |
This is a breaking change for Qibocal, postponed until 0.2 for this reason
@stavros11 a08aaa4 is completing the implementation of #949, but it's also affecting mostly QM. If you can, during your review, confirm that QM is still working as expected. |
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 @alecandido. I wrote a few more comments, but I think the only main issue to be addressed is the one regarding QubitId
and QubitPairId
. This will affect how I will update the qibolab0.2
branch of qibocal, so that I can also test if QM is working with the usual routines (so it is kind of blocking).
from qibolab._core.channel import Channel, ChannelMap | ||
from qibolab._core.instruments.dummy import DummyLocalOscillator as LocalOscillator | ||
from qibolab._core.instruments.qm import Octave, OPXplus, QMController | ||
from qibolab._core.platform import Platform |
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.
These platforms under dummy_qrc
could also serve as template on how to write platforms, so I would prefer to stick to public objects. However, these particular instances are quite outdated and given that we postponed the test refactoring to a later release, instead of doing the effort to update them, I would suggest to just remove these files.
I believe that the tests using them are skipped anyway.
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.
Yes, I applied the same policy of the docs: do not take a decision, apply the minimal update.
But your suggestion makes more sense, and I agree about dropping this (reintroducing at a later stage as a proper example).
ZiAcquisitionConfig, | ||
ZiChannel, | ||
ZiDcConfig, | ||
ZiIqConfig, | ||
Zurich, | ||
) | ||
from qibolab.kernels import Kernels | ||
from qibolab.parameters import Parameters | ||
from qibolab._core.kernels import Kernels |
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.
Following the previous comment, I don't think this path even exists anymore.
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.
No, I just completely ignored Zurich. This was the result of a bulk change, that I just post-controlled to not break anything relevant. I did not check it made sense in all the affected files.
I will apply the same resolution above, and remove the file.
About docs, I just tried to compile locally and I see that the API reference still has some references to internal packages, eg. "qibolab.compilers package", "qibolab.pulses package", etc and related submodules. The pages are empty, but still there. I have not checked but there are probably some leftovers within the sphinx code (.rst files). We should probably remove these. |
Have you tried removing all the gitignored content in your repo? I.e.: git clean -fdx doc/ |
That worked, thanks. |
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.
@stavros11 a08aaa4 is completing the implementation of #949, but it's also affecting mostly QM. If you can, during your review, confirm that QM is still working as expected.
I just updated qibocal and the platform and tested the single shot, Rabi amplitude and length routines and they all work on hardware. I redefined QubitId
and QubitPairId
in qibocal.auto.operation
for that purpose (qiboteam/qibocal@a905fb4).
At these stage I believe the only open discussions are:
ExecutionParameters
(could even be done in a different PR),- expose
PLATFORMS
(environment variable name) to public API or equivalent (trivial), - remove
dummy_qrc
platforms from tests (not fully relevant since tests are not strictly part of the qibolab package, thus internal). Btw, on this, I am already updating the QM platform for tests in Tests for QUA programs #1039, so you could even leave as it is here.
Ok, this I will as it is (including Zurich), but I'll address the others, including the docs, but excluding |
I'm still missing a test for |
@stavros11 this is now ready, I'll merge as soon as the CI will pass |
Closes #790, closes #949, and closes #1031