qiboteam / qibocal

Quantum calibration, characterization and validation module for Qibo.
https://qibo.science
Apache License 2.0
28 stars 4 forks source link

Add possibility to bias qubit in crosstalk experiments #859

Closed andrea-pasquale closed 1 month ago

andrea-pasquale commented 1 month ago

Closes #846. Now it possible to bias the qubit away in a crosstalk experiments. Here is a possible runcard

- id: qubit crosstalk
  operation: qubit_crosstalk
  parameters:
    bias_step: 0.001
    bias_width: 0.05
    bias_point: {2: 0.25}
    drive_amplitude: 0.002
    drive_duration: 4000
    freq_step: 200_000
    freq_width: 10_000_000
    nshots: 1024
    relaxation_time: 20000

Some improvements where also performed in the fit with help of QPhysics. Some of the modifications include the following:

I run several experiments on hardware I manage to measure some of the crosstalk matrix elements: http://login.qrccluster.com:9000/HYb096zXSx-Fn2K4IlPXBQ==/ (qubit flux q2 q0 platinum) http://login.qrccluster.com:9000/-3mMHcYTRWKi1oe-IudMyw==/ (resonator flux q2 q0 platinum) http://login.qrccluster.com:9000/dFqEuXgsRhy-imL-DuCpTg==/ (qubit crosstalk between q0 and q2) http://login.qrccluster.com:9000/AtxOumFLR5SEyBqSuuSTLg==/ (resonator crosstalk between q0 and q2)

There is now the following function available in the API to convert frequency to biases using the compensation matrix: https://github.com/qiboteam/qibocal/blob/752666e32aecb70ff9fbc767af5d365fe8d5ede6/src/qibocal/protocols/flux_dependence/utils.py#L383-L398

codecov[bot] commented 1 month ago

Codecov Report

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

Project coverage is 97.26%. Comparing base (7a422fc) to head (752666e). Report is 5 commits behind head on main.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/qiboteam/qibocal/pull/859/graphs/tree.svg?width=650&height=150&src=pr&token=3EA9ZUNKUY&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam)](https://app.codecov.io/gh/qiboteam/qibocal/pull/859?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) ```diff @@ Coverage Diff @@ ## main #859 +/- ## ========================================== - Coverage 97.28% 97.26% -0.03% ========================================== Files 109 109 Lines 8043 8050 +7 ========================================== + Hits 7825 7830 +5 - Misses 218 220 +2 ``` | [Flag](https://app.codecov.io/gh/qiboteam/qibocal/pull/859/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/qiboteam/qibocal/pull/859/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) | `97.26% <97.72%> (-0.03%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/qiboteam/qibocal/pull/859?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam) | Coverage Δ | | |---|---|---| | [...protocols/flux\_dependence/qubit\_flux\_dependence.py](https://app.codecov.io/gh/qiboteam/qibocal/pull/859?src=pr&el=tree&filepath=src%2Fqibocal%2Fprotocols%2Fflux_dependence%2Fqubit_flux_dependence.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#diff-c3JjL3FpYm9jYWwvcHJvdG9jb2xzL2ZsdXhfZGVwZW5kZW5jZS9xdWJpdF9mbHV4X2RlcGVuZGVuY2UucHk=) | `97.36% <100.00%> (-0.12%)` | :arrow_down: | | [...l/protocols/flux\_dependence/qubit\_flux\_tracking.py](https://app.codecov.io/gh/qiboteam/qibocal/pull/859?src=pr&el=tree&filepath=src%2Fqibocal%2Fprotocols%2Fflux_dependence%2Fqubit_flux_tracking.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#diff-c3JjL3FpYm9jYWwvcHJvdG9jb2xzL2ZsdXhfZGVwZW5kZW5jZS9xdWJpdF9mbHV4X3RyYWNraW5nLnB5) | `92.18% <100.00%> (+3.12%)` | :arrow_up: | | [...ocols/flux\_dependence/resonator\_flux\_dependence.py](https://app.codecov.io/gh/qiboteam/qibocal/pull/859?src=pr&el=tree&filepath=src%2Fqibocal%2Fprotocols%2Fflux_dependence%2Fresonator_flux_dependence.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#diff-c3JjL3FpYm9jYWwvcHJvdG9jb2xzL2ZsdXhfZGVwZW5kZW5jZS9yZXNvbmF0b3JfZmx1eF9kZXBlbmRlbmNlLnB5) | `98.27% <100.00%> (-0.15%)` | :arrow_down: | | [src/qibocal/protocols/flux\_dependence/utils.py](https://app.codecov.io/gh/qiboteam/qibocal/pull/859?src=pr&el=tree&filepath=src%2Fqibocal%2Fprotocols%2Fflux_dependence%2Futils.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#diff-c3JjL3FpYm9jYWwvcHJvdG9jb2xzL2ZsdXhfZGVwZW5kZW5jZS91dGlscy5weQ==) | `98.95% <100.00%> (+0.34%)` | :arrow_up: | | [src/qibocal/protocols/qubit\_spectroscopy\_ef.py](https://app.codecov.io/gh/qiboteam/qibocal/pull/859?src=pr&el=tree&filepath=src%2Fqibocal%2Fprotocols%2Fqubit_spectroscopy_ef.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#diff-c3JjL3FpYm9jYWwvcHJvdG9jb2xzL3F1Yml0X3NwZWN0cm9zY29weV9lZi5weQ==) | `98.52% <ø> (ø)` | | | [...l/protocols/flux\_dependence/resonator\_crosstalk.py](https://app.codecov.io/gh/qiboteam/qibocal/pull/859?src=pr&el=tree&filepath=src%2Fqibocal%2Fprotocols%2Fflux_dependence%2Fresonator_crosstalk.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#diff-c3JjL3FpYm9jYWwvcHJvdG9jb2xzL2ZsdXhfZGVwZW5kZW5jZS9yZXNvbmF0b3JfY3Jvc3N0YWxrLnB5) | `96.07% <96.00%> (+1.14%)` | :arrow_up: | | [...bocal/protocols/flux\_dependence/qubit\_crosstalk.py](https://app.codecov.io/gh/qiboteam/qibocal/pull/859?src=pr&el=tree&filepath=src%2Fqibocal%2Fprotocols%2Fflux_dependence%2Fqubit_crosstalk.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam#diff-c3JjL3FpYm9jYWwvcHJvdG9jb2xzL2ZsdXhfZGVwZW5kZW5jZS9xdWJpdF9jcm9zc3RhbGsucHk=) | `91.92% <94.11%> (-1.07%)` | :arrow_down: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/qiboteam/qibocal/pull/859/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=qiboteam)
andrea-pasquale commented 1 month ago

The compensation is still not working, because it requires some additional features in qibocal. Nevertheless I think we can merge this since it is an improvement on top of what we already have.