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 RB and XEB to compute inferred errors #6455

Closed NoureldinYosri closed 9 months ago

NoureldinYosri commented 9 months ago

This PR:

NoureldinYosri commented 9 months ago

@eliottrosenberg I added the ability to plot both single and two qubit pauli errors


The issue with a single function that runs both 2Q XEB and 1Q RB is the number of arguments which is not the best thing to have. That method will have 10+ arguments. alternatively I could group them into an RBOptions and XEBOptions classes, what do you think?

codecov[bot] commented 9 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (c3de706) 97.82% compared to head (9f7d628) 97.82%.

:exclamation: Current head 9f7d628 differs from pull request most recent head f14bf7e. Consider uploading reports for the commit f14bf7e to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6455 +/- ## ======================================== Coverage 97.82% 97.82% ======================================== Files 1115 1115 Lines 97337 97448 +111 ======================================== + Hits 95216 95327 +111 Misses 2121 2121 ```

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

eliottrosenberg commented 9 months ago

@eliottrosenberg I added the ability to plot both single and two qubit pauli errors

The issue with a single function that runs both 2Q XEB and 1Q RB is the number of arguments which is not the best thing to have. That method will have 10+ arguments. alternatively I could group them into an RBOptions and XEBOptions classes, what do you think?

I'm thinking that most of the parameters would be shared. It could be something like this:

Shared parameters:

RB:

XEB:

We can get rid of the use_xy_basis option for RB here, since we will always want that to be its default value, I think. So that's 8 parameters, and all of them will have default values except sampler, so it will be easy to use.

NoureldinYosri commented 9 months ago

@eliottrosenberg sg, I will add that method in a followup PR