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 for TOF routine on QM #898

Merged
merged 1 commit into from
May 23, 2024
Merged

Fix for TOF routine on QM #898

merged 1 commit into from
May 23, 2024

Conversation

stavros11
Copy link
Member

I think this is needed to see the time of flight.

@stavros11 stavros11 added the qm label May 8, 2024
Copy link

codecov bot commented May 8, 2024

Codecov Report

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

Project coverage is 66.60%. Comparing base (49632a5) to head (5d792e2).

Files Patch % Lines
src/qibolab/instruments/qm/acquisition.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #898      +/-   ##
==========================================
- Coverage   66.61%   66.60%   -0.02%     
==========================================
  Files          55       55              
  Lines        5943     5944       +1     
==========================================
  Hits         3959     3959              
- Misses       1984     1985       +1     
Flag Coverage Δ
unittests 66.60% <0.00%> (-0.02%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alecandido alecandido added this to the Qibolab 0.1.7 milestone May 22, 2024
@stavros11 stavros11 requested review from alecandido and Jacfomg May 22, 2024 11:13
@stavros11
Copy link
Member Author

This should be ready, I think it is fixing the time of flight routine. I don't think I can fix the coverage because it is qua code which I am not yet sure how to execute in the CI.

Copy link
Member

@alecandido alecandido left a comment

Choose a reason for hiding this comment

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

Fine by me, it's a minimal internal change.

Just to understand: why do you need an explicit phase reset?

@stavros11
Copy link
Member Author

stavros11 commented May 22, 2024

Just to understand: why do you need an explicit phase reset?

Thanks. I took it from here https://github.com/qua-platform/qua-libs/blob/066d7c7588419f84cf8c3a20a47ac2696ac52257/Quantum-Control-Applications/Superconducting/Single-Fixed-Transmon/02_raw_adc_traces.py#L29 and there is a brief explanation on the comment above. If you search for reset_phase in the same repository, it seems that it appears in all experiments that are averaging raw acquisitions. The explanation is always that without it the signal would average to zero (I am guessing due to averaging random phases?). However, I am not sure why this not needed when integrating (not using the raw signal).

@stavros11
Copy link
Member Author

stavros11 commented May 22, 2024

Just to understand: why do you need an explicit phase reset?

Thanks. I took it from here https://github.com/qua-platform/qua-libs/blob/066d7c7588419f84cf8c3a20a47ac2696ac52257/Quantum-Control-Applications/Superconducting/Single-Fixed-Transmon/02_raw_adc_traces.py#L29 and there is a brief explanation on the comment above. If you search for reset_phase in the same repository, it seems that it appears in all experiments that are averaging raw acquisitions. The explanation is always that without it the signal would average to zero (I am guessing due to averaging random phases?). However, I am not sure why this not needed when integrating (not using the raw signal).

About integration, maybe the phase is cancelled because we are also demodulating?

@alecandido
Copy link
Member

I get that the bare reading would be a two-dimensional array, sample and time. Since you average over sample, you want to establish a common reference, otherwise you would get a random average (possibly zero) for the first entry of each given sample.

However, if the variation is consistent over time, the reset_phase would be just a constant subtraction (constant over time, subtraction because you remove as much as you need to fix the initial value), and the random part related to the initial phase should average to a constant (possibly zero), leaving the time-dependence invariant (up to a constant shift).

I'm reasoning about the acquired value, though the phase being set is the one of the readout pulse. For sure I'm missing something...

@alecandido
Copy link
Member

About integration, maybe the phase is cancelled because we are also demodulating?

Demodulation should subtract a frequency, so only a time-dependent phase, not the initial value (you could consider as if the initial value of the modulating wave has always a 0 phase, which most likely is true...).
I'm definitely missing something...

Copy link
Contributor

@Jacfomg Jacfomg left a comment

Choose a reason for hiding this comment

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

Yeah, I'm still a bit lost about the reset phase. I may look at it later.

@stavros11 stavros11 merged commit 49f370a into main May 23, 2024
34 of 35 checks passed
@stavros11 stavros11 deleted the qmtof branch May 23, 2024 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants