qiboteam / qibocal

Quantum calibration, characterization and validation module for Qibo.
https://qibo.science
Apache License 2.0
30 stars 7 forks source link

Small fixes for TWPA calibration routines #899

Closed stavros11 closed 2 months ago

stavros11 commented 3 months ago

Some issues I realized while trying to use these routines:

  1. frequency_power was giving some KeyErrors with qubits missing from the initial_twpa_freq and initial_twpa_power dictionaries. I believe these are because the execution part of the routine is nested in the loop that initializates these dictionaries, while I think it should be a separate loop.
  2. It seems that relaxation_time is ignored for both SNR routines as it is not passed in the resonator_spectroscopy call. This ends up using the default relaxation_time from the platform runcard, which is usually much higher than what we need for spectroscopy, thus making execution slower.

Checklist:

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 97.44%. Comparing base (0625d90) to head (79cd1cb). Report is 16 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/qiboteam/qibocal/pull/899/graphs/tree.svg?width=650&height=150&src=pr&token=3EA9ZUNKUY&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam)](https://app.codecov.io/gh/qiboteam/qibocal/pull/899?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) ```diff @@ Coverage Diff @@ ## main #899 +/- ## ========================================== - Coverage 97.48% 97.44% -0.05% ========================================== Files 116 116 Lines 8882 8881 -1 ========================================== - Hits 8659 8654 -5 - Misses 223 227 +4 ``` | [Flag](https://app.codecov.io/gh/qiboteam/qibocal/pull/899/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/qibocal/pull/899/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) | `97.44% <100.00%> (-0.05%)` | :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. | [Files](https://app.codecov.io/gh/qiboteam/qibocal/pull/899?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) | Coverage Δ | | |---|---|---| | [...out\_optimization/twpa\_calibration/frequency\_SNR.py](https://app.codecov.io/gh/qiboteam/qibocal/pull/899?src=pr&el=tree&filepath=src%2Fqibocal%2Fprotocols%2Freadout_optimization%2Ftwpa_calibration%2Ffrequency_SNR.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#diff-c3JjL3FpYm9jYWwvcHJvdG9jb2xzL3JlYWRvdXRfb3B0aW1pemF0aW9uL3R3cGFfY2FsaWJyYXRpb24vZnJlcXVlbmN5X1NOUi5weQ==) | `89.28% <ø> (ø)` | | | [...t\_optimization/twpa\_calibration/frequency\_power.py](https://app.codecov.io/gh/qiboteam/qibocal/pull/899?src=pr&el=tree&filepath=src%2Fqibocal%2Fprotocols%2Freadout_optimization%2Ftwpa_calibration%2Ffrequency_power.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#diff-c3JjL3FpYm9jYWwvcHJvdG9jb2xzL3JlYWRvdXRfb3B0aW1pemF0aW9uL3R3cGFfY2FsaWJyYXRpb24vZnJlcXVlbmN5X3Bvd2VyLnB5) | `100.00% <100.00%> (ø)` | | | [...readout\_optimization/twpa\_calibration/power\_SNR.py](https://app.codecov.io/gh/qiboteam/qibocal/pull/899?src=pr&el=tree&filepath=src%2Fqibocal%2Fprotocols%2Freadout_optimization%2Ftwpa_calibration%2Fpower_SNR.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#diff-c3JjL3FpYm9jYWwvcHJvdG9jb2xzL3JlYWRvdXRfb3B0aW1pemF0aW9uL3R3cGFfY2FsaWJyYXRpb24vcG93ZXJfU05SLnB5) | `89.28% <ø> (ø)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/qiboteam/qibocal/pull/899/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam)