Skip to content

Add error mitigation benchmark scripts (unitaryHACK bounty #2876)#3033

Open
kim-renaud wants to merge 3 commits into
unitaryfoundation:mainfrom
kim-renaud:benchmark-em-tools-2876
Open

Add error mitigation benchmark scripts (unitaryHACK bounty #2876)#3033
kim-renaud wants to merge 3 commits into
unitaryfoundation:mainfrom
kim-renaud:benchmark-em-tools-2876

Conversation

@kim-renaud
Copy link
Copy Markdown

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/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]

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.py

AI 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.

…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.
Copy link
Copy Markdown
Member

@natestemen natestemen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before I dive into the code can you

  1. get the build passing, and
  2. post the output of the results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Benchmark mitiq against similar error mitigation tools

2 participants