Add parameter sweep support for Pauli string measurements with readout mitigation
https://github.com/quantumlib/Cirq/pull/7236 and https://github.com/quantumlib/Cirq/pull/7067 builds a tool for measuring expectation values of Pauli strings with readout error mitigation. This pr enhances the tool by providing option for sweep-based execution. The new sweep mode could make it faster for external users since for them sweep operations can be more efficient than run_batch with large circuit lists. The changes include:
- Adding a new function
run_sweep_with_readout_benchmarkingwhich runs the sweep circuits with readout error benchmarking (without shuffling). - Allow user to run measuring_pauli_strings in sweep mode. In this mode, the function uses parameterized circuits and sweeps parameters for both Pauli measurements and readout benchmarking
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 98.68%. Comparing base (
513f309) to head (1c46aae). Report is 1 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #7358 +/- ##
========================================
Coverage 98.68% 98.68%
========================================
Files 1112 1112
Lines 97588 97776 +188
========================================
+ Hits 96307 96495 +188
Misses 1281 1281
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
Hey @eliottrosenberg and @NoureldinYosri, can you take a look when you have time? Thank you!
Thanks, @ddddddanni! I tried testing this through Quantum Engine, and I got the error
ValueError: Unsupported type for serializing const sweep: value=1 and type(value)=<class 'numpy.int64'>. See this colab for details.
this issue is not related to this PR .. https://github.com/quantumlib/Cirq/pull/7398/ will fix it
@ddddddanni I reviewed a couple of files, but this a big PR .. can it be broken down into smaller PRs?
Sure! Just send https://github.com/quantumlib/Cirq/pull/7435 for review. https://github.com/quantumlib/Cirq/pull/7435 only touches the readout benchmarking thing and is a lot smaller than this PR.
This pull request has been automatically labeled as stale because 90 days have passed without comments or other activity. If no further activity occurs and the status/stale label is not removed by a maintainer within 60 days, this pull request will be closed. If you would like to restore its active status, please leave a comment here; doing so will cause the staleness handler to remove the label.
If you have questions or feedback about this process, we welcome your input. You can open a new issue to let us know (please also reference this issue there, for continuity), or reach out to the project maintainers at [email protected].
@ddddddanni Another gentle ping, this time about this other PR.
@ddddddanni Another gentle ping, this time about this other PR.
This is actually done. I made two separate PRs and the sweep function is added. I will abort this one.