-
Notifications
You must be signed in to change notification settings - Fork 6
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
Using custom dummy
platform
#1101
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## kernels #1101 +/- ##
===========================================
+ Coverage 96.05% 97.77% +1.71%
===========================================
Files 107 99 -8
Lines 7432 8088 +656
===========================================
+ Hits 7139 7908 +769
+ Misses 293 180 -113
Flags with carried forward coverage won't be shown. Click here to find out more.
|
5f76a2b
to
86030bc
Compare
7ec7c23
to
8e53f44
Compare
With the latest changes I've defined the |
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 @andrea-pasquale, everything looks good.
I'm only providing minor suggestions.
def create() -> Platform: | ||
"""Create a dummy platform using the dummy instrument.""" | ||
hardware = create_mock_hardware() | ||
return Platform.load(path=FOLDER, **vars(hardware)) |
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.
This is only needed for dummy
, to avoid breaking the API (since we introduced it in Qibolab after v0.2.0). However, you can just drop this function, and rename the former create()
, unless you import this file directly. create_platform()
will detect it and provide the Platform.load()
call on its own.
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.
I tried to do exactly as you said but when running test I'm getting an error RuntimeError: Cannot establish connection to instrument dummy. Error captured: ''dict' object has no attribute 'connect''
.
Given that, if I am not wrong, this feature is only available in qibolab main
and is not available in a release I suggest to open an issue and skip this comment for now.
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.
Given that, if I am not wrong, this feature is only available in qibolab
main
and is not available in a release I suggest to open an issue and skip this comment for now.
Actually, it should be available in v0.2.3, since qiboteam/qibolab#1123 was introduced in that release.
However, I fixed something after that release in qiboteam/qibolab#1151, and I was trying to remember whether it was needed sometimes or always...
Co-authored-by: Edoardo Pedicillo <edoardo.pedicillo@gmail.com>
Co-authored-by: Alessandro Candido <candido.ale@gmail.com>
In this PR I'm attempting to define a custom "dummy" platform in Qibocal (which is currently called
fake
but if there are better proposal I'm happy to change the name). The motivation started from #1099 where I've noticed that the dummy was missing a local oscillator making it impossible to run the integration weights protocol with the dummy available in Qibolab.In general I believe that this could be beneficial to further remove some nested dependencies between Qibolab and Qibocal.
For example currently the calibration parameters for
dummy
where stored in Qibocal while theparameters.json
is currently in Qibolab.The new
fake
platform only has 2 qubits with a coupler, since I don't believe that for testing purposes we need more than that.Currently the new platform is added at import time by adding the corresponding directly to
QIBOLAB_PLAFORMS
.EDIT: after some internal discussions we have decided to rename
fake
tomock