qibocal
qibocal copied to clipboard
Single qubit state tomography
As title says.
TODO:
- [x] improve plotting
Codecov Report
Attention: Patch coverage is 98.44961%
with 2 lines
in your changes are missing coverage. Please review.
Project coverage is 97.26%. Comparing base (
4c23ced
) to head (0afbdb8
).
Additional details and impacted files
@@ Coverage Diff @@
## main #813 +/- ##
==========================================
- Coverage 97.33% 97.26% -0.07%
==========================================
Files 107 108 +1
Lines 7915 8044 +129
==========================================
+ Hits 7704 7824 +120
- Misses 211 220 +9
Flag | Coverage Δ | |
---|---|---|
unittests | 97.26% <98.44%> (-0.07%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Files | Coverage Δ | |
---|---|---|
src/qibocal/protocols/__init__.py | 100.00% <100.00%> (ø) |
|
src/qibocal/protocols/state_tomography.py | 98.42% <98.42%> (ø) |
There are still a few things to be improved but it seems to work: http://login.qrccluster.com:9000/lIw8tz8rT1-ZfWeOKdmn6Q==
@stavros11 https://github.com/qiboteam/qibocal/pull/813/commits/a88257ad923d32c44d76782752597203cc9bc2a7 is a first attempt to pass circuits as json files.
Final report example: http://login.qrccluster.com:9000/XzGRWIMQRDG5sAC4BFMVHQ==/
Thanks @andrea-pasquale, generally looks good to me. I will start working on the two-qubit case on top of this.
The only two issues I currently see as a bit annoying is the multiple jsons for data saving (mentioned in comment below) and the plotting. I would personally prefer bar plots, or at least print the numerical value for each matrix element in the color plot (I am not sure if this is possible with plotly). Currently we can see the values by hovering over the color plot, but it is a bit inconvenient: if I want to compare the experiment with theory I have to hover over 8 boxes. For two-qubit that would be 32 boxes. In the barplot you can overlap theory and experiment and see the difference immediately (even using multiple 2D bar plots, not the fancy 3D one).
For the two-qubit case, I was also plotting bar plots of the shots in each basis, before the matrix reconstruction. This was mainly because the matrix reconstruction is less trivial in that case, so most likely not relevant for the current PR (I might still do it for 2q though).
I would love to have something like this https://community.plotly.com/t/is-it-possible-to-make-this-with-plotly/73696/2 , but seems too tricky honestly
I fixed all the points but the plotting so far, let me see if I can do something quickly.
Final version of the plot: http://login.qrccluster.com:9000/3T67I38gTlizhImJ6AkXbA==/