Add IQPE benchmark#916
Conversation
Assisted-by: GPT-5 Codex via Codex
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
flowerthrower
left a comment
There was a problem hiding this comment.
Dear @kpassito, thanks for the initial draft. Currently this looks like heavily AI generated. Please review our AI guidelines. I left a first quick review that you might want to address personally.
| QuantumCircuit: A dynamic IQPE circuit with mid-circuit measurements, | ||
| reset-by-feedback operations, and classically controlled rotations. | ||
| """ | ||
| if num_qubits != 2: |
There was a problem hiding this comment.
why constrain to 2 qubits only? should be possible for larger sizes too
| if num_qubits != 2: | ||
| msg = "Number of qubits must be exactly 2 for IQPE." | ||
| raise ValueError(msg) | ||
| if num_bits < 1: |
There was a problem hiding this comment.
this should not be the dynamic size of the benchmark (it should be num_qubits)
Assisted-by: GPT-5 Codex via Codex
|
Thanks @flowerthrower, I went through the PR again and addressed the review points. I removed the extra benchmark selection docs section, updated I also reran the local checks listed in the PR description. |
|
Dear @kpassito, thank you for your continued efforts. Please give us some time to review. We are currently internally discussing the best way forward for this Benchmark. |
Description
This PR adds an
iqpebenchmark for Iterative Quantum Phase Estimation.The circuit uses one reusable measurement qubit and
num_qubits - 1target qubits. Thenum_bitsparameter controls the number of measured phase bits.Fixes #797
Tests
I added coverage for the IQPE circuit structure, invalid parameters,
num_bitsscaling,num_qubitsscaling, and invalid qubit counts.Local checks:
python -m pytest -o addopts='' tests/test_bench.py: 203 passedruff check src/mqt/bench/benchmarks/iqpe.py tests/test_bench.py: passedruff format --check src/mqt/bench/benchmarks/iqpe.py tests/test_bench.py: passedgit diff --check: passedAI disclosure
Codex assisted with implementation and local testing. I reviewed the changes and take responsibility for the submitted code.
The commits include the required footer:
Assisted-by: GPT-5 Codex via CodexChecklist
If PR contains AI-assisted content:
Assisted-by: [Model Name] via [Tool Name]footer.