Skip to content
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

Small fixes for TWPA calibration routines #899

Merged
merged 4 commits into from
Jul 8, 2024
Merged

Small fixes for TWPA calibration routines #899

merged 4 commits into from
Jul 8, 2024

Conversation

stavros11
Copy link
Member

@stavros11 stavros11 commented Jun 24, 2024

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:

  • Reviewers confirm new code works as expected.
  • Tests are passing.
  • Coverage does not decrease.
  • Documentation is updated.
  • Compatibility with Qibo modules (Please edit this section if the current pull request is not compatible with the following branches).
    • Qibo: master
    • Qibolab: main
    • Qibolab_platforms_qrc: main

Copy link

codecov bot commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

@@            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 Coverage Δ
unittests 97.44% <100.00%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...out_optimization/twpa_calibration/frequency_SNR.py 89.28% <ø> (ø)
...t_optimization/twpa_calibration/frequency_power.py 100.00% <100.00%> (ø)
...readout_optimization/twpa_calibration/power_SNR.py 89.28% <ø> (ø)

... and 2 files with indirect coverage changes

Copy link
Contributor

@andrea-pasquale andrea-pasquale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @stavros11, I agree with all the fixes.
Regarding the relaxation I already had a feeling that it was not used correctly in all protocols (#829).

)

for power in power_range:
for qubit in targets:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for qubit in targets:

At this point, I suggest removing this line and leaving the indentation as in main.

Copy link
Member Author

@stavros11 stavros11 Jul 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, both comments are right. I reverted the indentation and removed this in 79cd1cb.

The routine should now work, but we should keep in mind that it is suboptimal and maybe open an issue for this. The acquisition is repeated in multiplexed fashion on all qubits multiple times and in each case we drop the results for all qubits except of one. We should only need one acquisition per TWPA pump, not per qubit. For 5-qubits that share a readout line, which is the case for most of our current chips, we should only need one acquisition, not five.

Copy link
Contributor

@Edoardo-Pedicillo Edoardo-Pedicillo Jul 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have already opened #564 , for sure what we are doing is wrong, but we could collect all the results and find a better way to use them

@andrea-pasquale andrea-pasquale added this pull request to the merge queue Jul 8, 2024
Merged via the queue into main with commit b0dabce Jul 8, 2024
21 checks passed
@andrea-pasquale andrea-pasquale deleted the fixtwpa branch July 8, 2024 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants