-
Notifications
You must be signed in to change notification settings - Fork 60
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
Internal global backend _Global
#1440
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@alecandido I have implemented the items we discussed. There are three additional things to fix.
1Is it ok to set the default transpiler for hardware backends in qibo/src/qibo/backends/__init__.py Lines 142 to 147 in 2419d7d
2Since
All the docstrings follow a similar format, so is it okay to update them to:
3In qibo/src/qibo/models/error_mitigation.py Lines 1099 to 1103 in 2419d7d
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1440 +/- ##
=======================================
Coverage 99.93% 99.93%
=======================================
Files 81 81
Lines 11795 11859 +64
=======================================
+ Hits 11787 11851 +64
Misses 8 8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
for more information, see https://pre-commit.ci
It is definitely acceptable, and the class is needed in any case. But you could do even in |
Yes, definitely. I believe this is just a leftover from when the transpiler was inside Qibolab. |
I believe you should use your solution for the second point even in the first one. I.e. |
Btw, as I stressed in the review, docs is poor (it was even before the PR, but it's worth some effort), and the tests are not yet passing. |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@csookim sorry if I've not been careful before: the tests' breakage has been triggered by the commit fixing Pylint (i.e. 933f08c). However, that commit was not really required, since the error was resulting from a Pylint false positive. You could realize just by running the relevant test locally (which I guess you also did while writing it). Sometimes, locally disabling is just the best option (when you're confident that the error reported is not an error, e.g. by testing it - after understanding its meaning). I will try to transition the workflows to Ruff, also in the hope to solve part of these (which may still introduce other complications, but it's very actively developed - much more than Pylint recently). |
180175d
to
731b8a1
Compare
Regarding 731b8a1 (and the triggering 5d260e3)
In this case, despite being a class, it is an instance in the scope of the metaclass (because it will also be a class, being both, but wrt to the metaclass is an instance). But I see that CPython's standard library is already inconsistent itself... https://github.com/python/cpython/blob/37e533a39716bf7da026eda2b35073ef2eb3d1fb/Lib/enum.py#L778 which may trigger warnings or issues with the type checker (which may complain that the method overridden by the subclass had an argument by a different name, i.e. So better to keep with |
@BrunoLiegiBastonLiegi could you please test this branch on hardware? |
@scarrazza @BrunoLiegiBastonLiegi actually, this can not work on its own, since it's changing the The @csookim should be able to provide the patch for 0.1 very soon (it's just a matter of defining 3 properties to just expose properties of the |
Thanks @alecandido for the information. |
Ok. I will open a PR for the 3 additional properties and the use of |
@alecandido Could you give me permission? or do I need to fork it to make changes? |
Done, please go ahead. |
This breaks Qibocal. We have to change ALL the instances where GlobalBackend was called in the other libraries that rely on Qibo before making this change. |
Yes, Qibocal also makes direct use of the It was ready to be merged from Qibo's point of view. But it should have been tested first... |
@BrunoLiegiBastonLiegi was partially doing it, and there was his review pending. In any case, I should be able to hotfix Qibocal immediately, just replacing direct usage of |
This covers issue #1309.
Checklist:
Todo:
qibo.backends.GlobalBackend
._Global.set_transpiler
inerror_mitigation.py
.