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

Fix flipping amplitude correction sign #716

Merged
merged 3 commits into from
Feb 21, 2024
Merged

Fix flipping amplitude correction sign #716

merged 3 commits into from
Feb 21, 2024

Conversation

Jacfomg
Copy link
Contributor

@Jacfomg Jacfomg commented Feb 16, 2024

@Edoardo-Pedicillo possible issues on the flipping, can you have a look and confirm them ?

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 Feb 16, 2024

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (3b1edda) 97.19% compared to head (7c9c04e) 97.19%.
Report is 2 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #716   +/-   ##
=======================================
  Coverage   97.19%   97.19%           
=======================================
  Files         110      110           
  Lines        7618     7618           
=======================================
  Hits         7404     7404           
  Misses        214      214           
Flag Coverage Δ
unittests 97.19% <25.00%> (ø)

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

Files Coverage Δ
...ocal/protocols/characterization/flipping_signal.py 97.00% <50.00%> (ø)
src/qibocal/protocols/characterization/flipping.py 96.46% <0.00%> (ø)

@andrea-pasquale
Copy link
Contributor

We have just made the release 😞

@Jacfomg
Copy link
Contributor Author

Jacfomg commented Feb 16, 2024

I know, they were located while running in hardware.

@@ -178,7 +178,7 @@ def _fit(data: FlippingSignalData) -> FlippingSignalResults:
popt[3] - x_min * 2 * np.pi * f / (x_max - x_min) * popt[2],
popt[4] * 2 * np.pi * f / (x_max - x_min),
]
if popt[3] > np.pi / 2 and popt[3] < 3 * np.pi / 2:
if translated_popt[3] > np.pi / 2 and translated_popt[3] < 3 * np.pi / 2:
Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with all other changes, I need to check this one, but it seems correct.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this was related to ramsey giving the correction in the wrong direction qiboteam/qibolab_platforms_qrc#119 (comment)

Copy link
Contributor

Choose a reason for hiding this comment

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

Uhm, but this is flipping it is not ramsey...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes sorry,

I think this was related to ramsey flipping giving the correction in the wrong direction.

@Jacfomg Jacfomg marked this pull request as ready for review February 20, 2024 06:06
@Jacfomg Jacfomg requested a review from igres26 February 20, 2024 06:08
Copy link
Contributor

@igres26 igres26 left a comment

Choose a reason for hiding this comment

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

Looks good to me. Let's confirm @andrea-pasquale's comments and we should be able to merge.

@andrea-pasquale
Copy link
Contributor

andrea-pasquale commented Feb 20, 2024

I manage correct the formula for the flipping. I am not sure if I hardcoded something related to the fact that this is a cavity and not a 2D resonator. Here are some reports:
http://login.qrccluster.com:9000/SA81DOUrR4OklXCYpMzLYA==
http://login.qrccluster.com:9000/Nc5uSr19QPyz0deZ9MXW8w==
http://login.qrccluster.com:9000/jMFoxlvsQFmR8vJ2dVqwBg==/
http://login.qrccluster.com:9000/m8vpt5igQJapzsMY0iTbEw==
http://login.qrccluster.com:9000/5jHDWaknTDSDZioFMXsTmQ==

@Jacfomg
Copy link
Contributor Author

Jacfomg commented Feb 21, 2024

I manage correct the formula for the flipping. I am not sure if I hardcoded something related to the fact that this is a cavity and not a 2D resonator. Here are some reports: http://login.qrccluster.com:9000/SA81DOUrR4OklXCYpMzLYA== http://login.qrccluster.com:9000/Nc5uSr19QPyz0deZ9MXW8w== http://login.qrccluster.com:9000/m8vpt5igQJapzsMY0iTbEw== http://login.qrccluster.com:9000/5jHDWaknTDSDZioFMXsTmQ==

I can tell that the fits are fine, but have you checked that the amplitude correction was in the right direction, if so, let's merge it.

@andrea-pasquale
Copy link
Contributor

I believe I checked but in some of the reports the amplitude correction seems to be wrong. It might be because I was just running qq fit and not updating the report. Let me double check.

@andrea-pasquale
Copy link
Contributor

I believe I checked but in some of the reports the amplitude correction seems to be wrong. It might be because I was just running qq fit and not updating the report. Let me double check.

Yes, one of the report was outdated, everything else works. I'll go ahead and merge.
@Jacfomg make sure to pull main when testing #720.

@andrea-pasquale andrea-pasquale added this pull request to the merge queue Feb 21, 2024
Merged via the queue into main with commit b11efdd Feb 21, 2024
20 of 21 checks passed
@andrea-pasquale andrea-pasquale deleted the flipping branch February 21, 2024 07:43
@andrea-pasquale andrea-pasquale changed the title possible issues Fix flipping amplitude correction sign Feb 21, 2024
@Jacfomg
Copy link
Contributor Author

Jacfomg commented Feb 21, 2024

I believe I checked but in some of the reports the amplitude correction seems to be wrong. It might be because I was just running qq fit and not updating the report. Let me double check.

Yes, one of the report was outdated, everything else works. I'll go ahead and merge. @Jacfomg make sure to pull main when testing #720.

I will, but they should not overlap as we only changed the fitting here and acquisition on the other one, feel free to merge #720 as well.

@andrea-pasquale
Copy link
Contributor

Yes, you are right. I just wanted to make sure that we can reproduce the same results with and without unrolling.

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