qilimanjaro-tech / qililab

Qililab is a generic and scalable quantum control library used for fast characterization and calibration of quantum chips. Qililab also offers the ability to execute high-level quantum algorithms with your quantum hardware.
Apache License 2.0
29 stars 2 forks source link

[QHC-610] Make that `set_parameter` for QM, works without connection aswell #752

Closed GuillermoAbadLopez closed 4 weeks ago

GuillermoAbadLopez commented 1 month ago

We need to be able to set a parameter, without connection:

We need to do the same we did for Qblox (here: https://github.com/qilimanjaro-tech/qililab/pull/647), so that when we set a parameter without connection, it changes the execution-time Runcard locally, so when you connect() and initial_setup(), it gets set up on the actual physical instruments, as the documentation says: Screenshot 2024-07-16 at 12 15 24

This means be able to run and pass this test (set and get a parameter without connection):

Screenshot 2024-07-16 at 19 01 24
linear[bot] commented 1 month ago

QHC-610 [BUG] set_parameter does not work with QM platform (copy)

GuillermoAbadLopez commented 1 month ago

Be aware, that this might be problematic, since we have the self._config dictionary, that duplicate the information of the runtime Runcard/Settings, and we would need to update both 😬: https://qilimanjaro.slack.com/archives/C06R0KWN58W/p1721232248001349

I guess in the set_parameter, you would need to do:

if "_config" not in dir(self):
    self._config = self.settings.to_qua_config()

# Or with just a: `self._config = self.settings.to_qua_config()`, if we decide the setting to rule!

# Then all the code that goes along, changing stuff in _config

# Check that everything that is being changed in runtime `Settings`, changes in `_config`, 
# or do another in the end: self._config = self.settings.to_qua_config()
codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 96.55172% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.96%. Comparing base (c70813e) to head (57f958d).

Files Patch % Lines
src/qililab/system_control/system_control.py 66.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## qhc-588-bug-get_parameter-does-not-work-with-qm-platform #752 +/- ## ============================================================================================ - Coverage 94.97% 94.96% -0.01% ============================================================================================ Files 263 263 Lines 8620 8628 +8 ============================================================================================ + Hits 8187 8194 +7 - Misses 433 434 +1 ``` | [Flag](https://app.codecov.io/gh/qilimanjaro-tech/qililab/pull/752/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qilimanjaro-tech) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/qilimanjaro-tech/qililab/pull/752/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qilimanjaro-tech) | `94.96% <96.55%> (-0.01%)` | :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=qilimanjaro-tech#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.

GuillermoAbadLopez commented 1 month ago

Also, for merging this PR, we still need to check that a posterior initial_setup, will then set the parameters that have been changed locally