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

Readout characterization #435

Merged
merged 8 commits into from
Jul 25, 2023
Merged

Readout characterization #435

merged 8 commits into from
Jul 25, 2023

Conversation

Jacfomg
Copy link
Contributor

@Jacfomg Jacfomg commented Jul 7, 2023

As per https://arxiv.org/abs/2106.06173. Calculate Fidelity and QND-ness of our readout.

Works with qiboteam/qibolab#517

Checklist:

  • Reviewers confirm new code works as expected.
  • Tests are passing.
  • Coverage does not decrease.
  • Documentation is updated.

@Jacfomg Jacfomg mentioned this pull request Jul 10, 2023
4 tasks
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 @Jacfomg. I tested the routine on hardware and it works.
I have some suggestions, mainly moving the computation of the fidelity and QNDness from the plot to the fit and some general improvements.

"""Store output for single qubit."""
ar = np.empty(probability.shape, dtype=ReadoutCharacterizationType)
ar["probability"] = probability
self.data[qubit, state, number_readout] = np.rec.array(ar)
Copy link
Contributor

Choose a reason for hiding this comment

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

As in the other PR maybe we can drop the number_readout considering that the number_readout is just the row of the array.

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 in this case they are separate arrays.

@codecov
Copy link

codecov bot commented Jul 10, 2023

Codecov Report

Merging #435 (002ae46) into main (ec7e5cc) will increase coverage by 0.09%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #435      +/-   ##
==========================================
+ Coverage   97.15%   97.24%   +0.09%     
==========================================
  Files          49       50       +1     
  Lines        3233     3341     +108     
==========================================
+ Hits         3141     3249     +108     
  Misses         92       92              
Flag Coverage Δ
unittests 97.24% <100.00%> (+0.09%) ⬆️

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

Impacted Files Coverage Δ
src/qibocal/protocols/characterization/__init__.py 100.00% <100.00%> (ø)
...ocols/characterization/readout_characterization.py 100.00% <100.00%> (ø)
...otocols/characterization/resonator_spectroscopy.py 100.00% <100.00%> (ø)

@Jacfomg Jacfomg added this pull request to the merge queue Jul 25, 2023
Merged via the queue into main with commit f2d3744 Jul 25, 2023
20 checks passed
@Jacfomg Jacfomg deleted the Readout_characterization branch July 25, 2023 08:47
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