Add error mitigation benchmark scripts (unitaryHACK bounty #2876)#3033
Open
kim-renaud wants to merge 3 commits into
Open
Add error mitigation benchmark scripts (unitaryHACK bounty #2876)#3033kim-renaud wants to merge 3 commits into
kim-renaud wants to merge 3 commits into
Conversation
…ndation#2876) - scripts/benchmark_zne.py: mitiq.zne, qermit, Qiskit manual ZNE on GHZ/QV/mirror - scripts/benchmark_meas_mitigation.py: mitiq.rem, TREX, mthree on GHZ - scripts/benchmark_pec.py: mitiq.pec and qermit PEC (monkey-patch fix for random_commuting_clifford qubit-mapping bug in pytket-qiskit 0.77); Qiskit PEC skipped (requires IBM Quantum cloud credentials) - pyproject.toml: dependency groups [meas], [zne], [pec], [dev] AI assistance disclosed: Claude used for scaffolding and boilerplate; all quantum logic, results, and analysis manually verified and executed locally.
natestemen
requested changes
Jun 5, 2026
Member
natestemen
left a comment
There was a problem hiding this comment.
Before I dive into the code can you
- get the build passing, and
- post the output of the results
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Closes #2876
Three standalone benchmark scripts under
scripts/comparing mitiq against equivalent tools on standard quantum circuits:scripts/benchmark_zne.py: mitiq.zne, qermit, Qiskit manual ZNE on GHZ/QV/mirrorscripts/benchmark_meas_mitigation.py: mitiq.rem, TREX, mthree on GHZscripts/benchmark_pec.py: mitiq.pec and qermit PEC (monkey-patch fix forrandom_commuting_cliffordqubit-mapping bug in pytket-qiskit 0.77); Qiskit PEC skipped (requires IBM Quantum cloud credentials)pyproject.toml: dependency groups[meas],[zne],[pec],[dev]How to run
pip install -e ".[meas,zne,pec]" python scripts/benchmark_meas_mitigation.py python scripts/benchmark_zne.py --circuit ghz python scripts/benchmark_zne.py --circuit qv python scripts/benchmark_zne.py --circuit mirror python scripts/benchmark_pec.pyAI assistance disclosed: Claude used for scaffolding and boilerplate; all quantum logic, results, and analysis manually verified and executed locally.
License
I license this contribution under the terms of the GNU GPL, version 3 and grant Unitary Foundation the right to provide additional permissions as described in section 7 of the GNU GPL, version 3.
I added unit tests for new code.
I used type hints in function signatures.
I used Google-style docstrings for functions.
I updated the documentation where relevant.