qiboteam / qibolab

Quantum hardware module and drivers for Qibo.
https://qibo.science
Apache License 2.0
40 stars 10 forks source link

QM disconnection issues #839

Closed stavros11 closed 3 months ago

stavros11 commented 3 months ago

Fixes two small issues with QM:

  1. instrument.connect() has a small bug (never sets self.is_connected) which causes instrument.disconnect() to not work properly and thus Quantum Machines are never closed. This causes the offsets (for example in flux) to stay on forever, potentially heating the fridge.
  2. Unrelated to the above: a hot fix on duration sweeps of baked pulses. This is temporary (as you know, I am hoping to simplify these kinds of sweeps in 0.2), but it makes the two-qubit chevron routine run a bit better so it would be good to have for now.
codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 11.11111% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 66.45%. Comparing base (0bd68b0) to head (fc98cf2).

Files Patch % Lines
src/qibolab/instruments/qm/sweepers.py 14.28% 6 Missing :warning:
src/qibolab/instruments/qm/controller.py 0.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #839 +/- ## ========================================== - Coverage 66.57% 66.45% -0.13% ========================================== Files 50 50 Lines 6079 6081 +2 ========================================== - Hits 4047 4041 -6 - Misses 2032 2040 +8 ``` | [Flag](https://app.codecov.io/gh/qiboteam/qibolab/pull/839/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/qiboteam/qibolab/pull/839/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) | `66.45% <11.11%> (-0.13%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

stavros11 commented 3 months ago

Nothing to amend to the code itself. I didn't test it (but I expect you did)

In fact, I discovered the first issue when one of the controllers was connected to an ammeter in the lab, so it is certainly tested.