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

added flux pulse to the sequence #839

Closed
wants to merge 4 commits into from

Conversation

DavidSarlle
Copy link
Contributor

This PR allows the user to add a flux pulse into the qubit spectroscopy sequence (optional) in order to adjust/check the shift produced in the drive frequency when applying a flux pulse to the qubit.

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 May 13, 2024

Codecov Report

Attention: Patch coverage is 60.00000% with 4 lines in your changes missing coverage. Please review.

Project coverage is 97.21%. Comparing base (aad9f40) to head (24cc606).
Report is 752 commits behind head on main.

Files with missing lines Patch % Lines
...l/protocols/characterization/qubit_spectroscopy.py 60.00% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #839      +/-   ##
==========================================
- Coverage   97.26%   97.21%   -0.05%     
==========================================
  Files         106      106              
  Lines        7855     7865      +10     
==========================================
+ Hits         7640     7646       +6     
- Misses        215      219       +4     
Flag Coverage Δ
unittests 97.21% <60.00%> (-0.05%) ⬇️

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

Files with missing lines Coverage Δ
...l/protocols/characterization/qubit_spectroscopy.py 95.23% <60.00%> (-4.77%) ⬇️

@hay-k
Copy link
Contributor

hay-k commented May 15, 2024

@DavidSarlle can you please explain in a bit more detail the rationale behind this proposal? What is the problem that this change is attempting to address?

@DavidSarlle
Copy link
Contributor Author

DavidSarlle commented May 15, 2024

@hay-k there is not a problem behind. This is an optional feature that allows the users to add a flux pulse to a qubit spectroscopy, showing how a qubit shifts the drive frequency if a flux pulse is applied. Introducing it here, we can check if the guess parameter obtained from a qubit flux dependence that shifts a qubit to the frequency needed for other operations like CZs is correct. Also, this routine is faster and gives the user more precision to fine tune the flux amplitude needed for the shift.

@andrea-pasquale
Copy link
Contributor

I'm also confused because this change is basically injecting what we were doing before in the flux dependence here, since we are playing with a long flux pulse, which we are planning to drop #841.
In order to address the frequency detuning induced by short flux pulses a proper experiment should be implemented.

@DavidSarlle
Copy link
Contributor Author

Sorry @andrea-pasquale @hay-k, I think the latest code was not uploaded to github for some reason. Check the latest version. Here the user have the possibility of defining the duration and amplitude of the flux pulse applied

@andrea-pasquale
Copy link
Contributor

Sorry @andrea-pasquale @hay-k, I think the latest code was not uploaded to github for some reason. Check the latest version. Here the user have the possibility of defining the duration and amplitude of the flux pulse applied

Thanks for the update @DavidSarlle.
I still don't think that those changes should be included in the qubit spectroscopy experiment. We should look in the literature how to measure the detuning generated by short flux pulses.

@DavidSarlle
Copy link
Contributor Author

@andrea-pasquale ok. No worries. I will keep this routine with me, because it has been very useful chracterizing the CZs. No problem

@andrea-pasquale andrea-pasquale added the do not merge Soft warning to avoid merging a PR for reason provided in the PR label May 20, 2024
@andrea-pasquale andrea-pasquale marked this pull request as draft May 20, 2024 11:59
@hay-k
Copy link
Contributor

hay-k commented May 21, 2024

there is not a problem behind. This is an optional feature that allows the users to add a flux pulse to a qubit spectroscopy

Well, I didn't mean "what is the problem with the qubit spectroscopy routine that you are trying to fix". What I mean is "what is the use case; what is the problem/situation that you are trying to handle that is not handled by any existing routine". Are you trying to calibrate something with this? Or are you trying to validate calibration that you did by other means? (If yes, what is the metric of validation?)

From the perspective of autocalibration, we want to have strictly defined small routines that are responsible for calibrating a specific thing, or validating specific aspect of calibration. We need to understand your problem better and come up with an optimal solution that is along the lines of this idea. Perhaps a separate dedicated experiment? But what exactly should that experiment do/calibrate/validate?

Also, this routine is faster and gives the user more precision to fine tune the flux amplitude needed for the shift.

Are you using this experiment to manually sweep the flux pulse amplitude to find a suitable value?

we can check if the guess parameter obtained from a qubit flux dependence that shifts a qubit to the frequency needed for other operations like CZs is correct.

This seems to be the problem that you are trying to solve, but can you please still elaborate a bit more? This PR uses a very long qubit flux pulse that spans the entire experiment. For CZ gates one does not need such pulses, but rather short pulses that are applied during the CZ gate only. How are these two related? At what stage of CZ calibration is this experiment useful? How do you intend to calibrate the actual short pulses that are needed for CZ gate?

@DavidSarlle
Copy link
Contributor Author

@hay-k as I said, when we are calibrating the flux pulse needed for shiting high freq qubits into the low freq qubit, we need to determine the am;kitude and duration of that pulse. For that, we use the qubit flux dependence, that gives use the possibilty to obtain these values. But qubit flux dependence routine is slower and less precise method (3D measurement) than a qubit spec + flux pulse (2D experiment). So, with that we can confirm and play easily with the amplitude and duration, andsee how it sets the high energy qubit at the desired freq. Also, we can automatize the iteration over a range of amps and durations to obtain the best value to shift the high energy qubit. These values must be very accurate in order to caracterize the couplers or the CZ gate in any chip.

But, again, I have been using this method to characterize the couplers and the CZs in iqm an it is very useful, at lest for me.
You can see how I use it in my notion reports:
https://www.notion.so/qcomp/e0c0346bf4d449c2b0c1e0785067e533?v=c5c2aa2c3fa1497faf893043b12cf3f4&p=9a44e3ae18924710905a1407330e1d14&pm=s

But again, is not a problem if you do not consider that should be the way to do it or that it is not useful.

@alecandido
Copy link
Member

alecandido commented Sep 13, 2024

Replaced by #982

@alecandido alecandido closed this Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do not merge Soft warning to avoid merging a PR for reason provided in the PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants