quantumlib / Cirq

A Python framework for creating, editing, and invoking Noisy Intermediate Scale Quantum (NISQ) circuits.
Apache License 2.0
4.28k stars 1.02k forks source link

Combine 2q parallel XEB into one methods to simplify the XEB workflow #6443

Closed NoureldinYosri closed 9 months ago

NoureldinYosri commented 9 months ago

This way the notebook https://quantumai.google/cirq/noise/qcvv/parallel_xeb becomes

>>> res = cirq.experiments.parallel_two_qubit_xeb(sampler)
>>> res.plot_heatmap()
NoureldinYosri commented 9 months ago

@eliottrosenberg this is now ready for review

codecov[bot] commented 9 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (f2c6f3c) 97.81% compared to head (a91e175) 97.81%. Report is 3 commits behind head on main.

:exclamation: Current head a91e175 differs from pull request most recent head 64effd8. Consider uploading reports for the commit 64effd8 to get more accurate results

Files Patch % Lines
cirq-core/cirq/experiments/two_qubit_xeb.py 98.85% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6443 +/- ## ======================================== Coverage 97.81% 97.81% ======================================== Files 1111 1113 +2 Lines 97198 97326 +128 ======================================== + Hits 95078 95204 +126 - Misses 2120 2122 +2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

NoureldinYosri commented 9 months ago

@eliottrosenberg please try again. I ran it several times and didn't run into this issue , though it can happen because of the random nature of operations. I assumed that qubit pairs are always ordered which turns out not to be true. I added a line to ensure results are accessed correctly.

NoureldinYosri commented 9 months ago

@eliottrosenberg I added the histogram method and removed the print statements.

eliottrosenberg commented 9 months ago

@eliottrosenberg I added the histogram method and removed the print statements.

Thanks, Nour!