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

Implement flux crosstalk matrix #462

Merged
merged 10 commits into from
Sep 5, 2023
Merged

Implement flux crosstalk matrix #462

merged 10 commits into from
Sep 5, 2023

Conversation

stavros11
Copy link
Member

I added the possibility to investigate crosstalk in the fluxlines in the existing qubit_flux routine, because it was needed to explain some of the mysteries in the calibration of qw25qB. It can be used by passing the new flux_qubits parameter, for example:

platform: qw25qB

qubits: ["B1", "B2"]

actions:
  
  - id: qubit flux crosstalk
    priority: 0
    # main: t1
    operation: qubit_flux
    parameters:
      freq_width: 20_000_000
      freq_step: 400_000
      bias_width: 0.8
      bias_step: 0.0075
      drive_amplitude: 0.01
      flux_qubits: ["B1", "B2", "B3", "B4", "B5"]
      nshots: 1000
      relaxation_time: 10000

will perform spectroscopy on qubits B1 and B2 (multiplexed) while sweeping the bias of B1, B2, ..., B5 one at a time. Note that this will result to five (in general len(flux_qubits)) executions, but I think the biases need to be swept one at a time in order to extract meaningful results.

If flux_qubits is not given the behavior of the routine will be the same as before. The only difference is the color of the fit (because I changed the order of the plots), but we could force the old color if we need. Also, the colorbar in the crosstalk case is a bit unreadable but I did not try to fix it yet.

The same routine can be used to create avoided crossings:

Screenshot from 2023-08-15 16-41-13

In this plot we are sweeping the bias of qubit B2 (high frequency) while performing spectroscopy and reading B1 (low frequency).

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

@stavros11 stavros11 added the enhancement New feature or request label Aug 15, 2023
@codecov
Copy link

codecov bot commented Aug 15, 2023

Codecov Report

Merging #462 (030198b) into main (5fb3700) will increase coverage by 0.06%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #462      +/-   ##
==========================================
+ Coverage   95.95%   96.01%   +0.06%     
==========================================
  Files          61       61              
  Lines        4421     4489      +68     
==========================================
+ Hits         4242     4310      +68     
  Misses        179      179              
Flag Coverage Δ
unittests 96.01% <100.00%> (+0.06%) ⬆️

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

Files Changed Coverage
...erization/flux_dependence/qubit_flux_dependence.py 100.00%
...ation/flux_dependence/resonator_flux_dependence.py 100.00%
...rotocols/characterization/flux_dependence/utils.py 100.00%

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, generally it looks good to me.
You can find below a few comments.
Just a tiny remark. The colormaps tend to overlap when you use more than one flux qubit.
image
I think that it should be possible to separate the color maps.

@Edoardo-Pedicillo Edoardo-Pedicillo mentioned this pull request Aug 29, 2023
18 tasks
@andrea-pasquale andrea-pasquale added this to the Qibocal 0.0.4 milestone Aug 31, 2023
@stavros11
Copy link
Member Author

stavros11 commented Sep 4, 2023

Thanks for the review @andrea-pasquale. I fixed your comments and removed the phase from the plots in order to have the matrix structure, as discussed in a previous meetings. I also implemented the crosstalk matrix for the resonator spectroscopy routine since this was also a TODO. Note that I disabled the colorbar from the matrix plots because I was unable to properly align it in the general case (because the columns of the matrix depends on len(flux_qubits)).

Other than that, this should be ready. I am not sure why the tests/coverage are failing in the CI but doesn't seem related to this PR.

@stavros11 stavros11 requested review from andrea-pasquale and Edoardo-Pedicillo and removed request for rodolfocarobene September 4, 2023 13:56
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.
After relaunching the jobs the CI seems to work.
I have a few small suggestions.
I guess that the first step will be to perform also a post-processing in order to compute the cross-talk matrix. We can do it in a separate. I like already the possibility of visualizing the cross-talk in this way.

@stavros11
Copy link
Member Author

I guess that the first step will be to perform also a post-processing in order to compute the cross-talk matrix. We can do it in a separate.

Yes, it would be useful to add fitting to this routine. I didn't do it yet because it is not very trivial: if {qubit} - {flux_qubit} are not interacting then we should get wide parabolas (ideally straight lines if no crosstalk), which I guess can be used to calculate the crosstalk matrix. However, if {qubit} - {flux_qubit} interact, we may get avoided crossings which should be handled differently by the fitting.

@andrea-pasquale
Copy link
Contributor

Yes, it would be useful to add fitting to this routine. I didn't do it yet because it is not very trivial: if {qubit} - {flux_qubit} are not interacting then we should get wide parabolas (ideally straight lines if no crosstalk), which I guess can be used to calculate the crosstalk matrix. However, if {qubit} - {flux_qubit} interact, we may get avoided crossings which should be handled differently by the fitting.

Right... and also the fitting for the standard protocol (one qubit - one flux protocol) is very unstable at the moment, we should also try to improve the fitting before trying to go for something like this.
Thanks for all the updates!

@andrea-pasquale andrea-pasquale added this pull request to the merge queue Sep 5, 2023
Merged via the queue into main with commit 7b11c9c Sep 5, 2023
21 checks passed
@andrea-pasquale andrea-pasquale deleted the fluxcrosstalk branch September 5, 2023 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants