-
Notifications
You must be signed in to change notification settings - Fork 7
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
Fast reset testing routine #399
Conversation
for more information, see https://pre-commit.ci
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #399 +/- ##
==========================================
+ Coverage 97.15% 97.24% +0.09%
==========================================
Files 49 50 +1
Lines 3233 3343 +110
==========================================
+ Hits 3141 3251 +110
Misses 92 92
Flags with carried forward coverage won't be shown. Click here to find out more.
|
I have a problem, I wanted to get plotty to display a heatmap with text on it to plot a matrix with the state counts, but for some reason I can't make it work. Have you ever plotted something similar ? |
src/qibocal/protocols/characterization/fast_reset/fast_reset.py
Outdated
Show resolved
Hide resolved
Perhaps @Edoardo-Pedicillo did something similar with single shot classification, I'm not so sure. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Jacfomg.
You can find below some suggestions.
src/qibocal/protocols/characterization/fast_reset/fast_reset.py
Outdated
Show resolved
Hide resolved
src/qibocal/protocols/characterization/fast_reset/fast_reset.py
Outdated
Show resolved
Hide resolved
def _plot(data: FastResetData, fit: FastResetResults, qubit): | ||
"""Plotting function for FastReset.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this function could be simplified I think. Lets try to fix first the issue related to the plotting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it will be easier for me to put it in loops as the acquisition once it's working
src/qibocal/protocols/characterization/fast_reset/fast_reset.py
Outdated
Show resolved
Hide resolved
Not with plotly, I tried smething like z=[[1, 20, 30],
[20, 1, 60],
[30, 60, 1]]
z_text = [[str(y) for y in x] for x in z]
fig.add_trace(
go.Heatmap(
z=z,
text=z_text,
texttemplate="%{text}",
textfont={"size":20}
),
row=1,
col=1,
) it works locally (in a Jupyter Notebook), but not in the report, maybe you will find the error in the function that generate the reports. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest plotting the confusion matrix with the relative values, in this way you can use only one color legend.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on hardware and it works.
Some other suggestions very similar to #435
src/qibocal/protocols/characterization/fast_reset/fast_reset.py
Outdated
Show resolved
Hide resolved
src/qibocal/protocols/characterization/fast_reset/fast_reset.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @Jacfomg, just a very small suggestion.
Btw, I had to merge main both in qiboteam/qibolab#506 and qiboteam/qibolab_platforms_qrc#28 to make it work.
src/qibocal/protocols/characterization/fast_reset/fast_reset.py
Outdated
Show resolved
Hide resolved
src/qibocal/protocols/characterization/fast_reset/fast_reset.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Andrea Pasquale <[email protected]>
Co-authored-by: Andrea Pasquale <[email protected]>
For now this can be used as a sanity check when playing with the fast reset capability of some devices. I'm still not sure what's the best thing for plotting or if it's needed for a good benchmark to measure both states.
Related to #435 as the results would be bad until we get a big QND-ness but the orutine works as expected.
Edit:
This PR is related to qiboteam/qibolab#506, meaning it only works with that one for Zurich. And qiboteam/qibolab_platforms_qrc#28
Checklist: