✨ Add IQM move gate support and star-topology Qiskit compilation via resonator abstraction#1848
✨ Add IQM move gate support and star-topology Qiskit compilation via resonator abstraction#1848marcelwa wants to merge 5 commits into
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
📝 WalkthroughWalkthroughThis PR adds a ChangesMoveGate Feature and Backend Extension Seams
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@python/mqt/core/plugins/qiskit/backend.py`:
- Around line 259-356: _reduce complexity in _add_operation_to_target by
extracting the single- and two-qubit property population logic into a small
helper and restructuring early exits so the method has fewer return statements
and branches. Keep the behavior of _add_operation_to_target,
_get_operation_qargs, and target.add_instruction/update_instruction_properties
unchanged, but move the qargs/property update loops for one- and two-qubit
operations into a separate helper to make the override path readable and satisfy
PLR0911/PLR0912 without suppressing warnings._
In `@python/mqt/core/plugins/qiskit/converters.py`:
- Around line 125-137: The MOVE handling in converters.py duplicates the same
two-qubit locus lookup used by the CZ branch, so extract that shared logic into
a helper such as a two_qubit_locus function used by both the MoveGate and CZ
operation paths. Keep the operation-specific "name" value in each branch, but
reuse the helper for building the locus from circuit, qargs, and sites so future
empty-args two-qubit operations can share the same code path.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 86756e14-6d2e-4844-aeef-d2df2b90655a
⛔ Files ignored due to path filters (2)
docs/fig-qpe-dark.svgis excluded by!**/*.svgdocs/fig-qpe-light.svgis excluded by!**/*.svg
📒 Files selected for processing (6)
CHANGELOG.mdpython/mqt/core/plugins/qiskit/__init__.pypython/mqt/core/plugins/qiskit/backend.pypython/mqt/core/plugins/qiskit/converters.pypython/mqt/core/plugins/qiskit/gates.pytest/python/plugins/qiskit/test_mock_backend.py
…exity, dedupe MOVE/CZ locus construction Assisted-by: Claude Sonnet 5 via Claude Code
Description
This PR finishes off the
movegate support started in #1844:movecircuits were already recognized in the target, but converting them to IQM JSON for job submission wasn't implemented yet, so actually submitting one just raisedUnsupportedOperationError.While at it, I pulled a couple of
_build_targetandruninternals out into small overridable methods so IQM's star-topology backend can customize target construction and circuit preprocessing without having to duplicate the whole pipeline.Part of this PR has been assisted by Claude Sonnet 5 in Claude Code.
Checklist
If PR contains AI-assisted content:
Assisted-by: [Model Name] via [Tool Name]footer.