Skip to content

🐛 Expose QDMI if/else in Qiskit targets - #2845

Merged
burgholzer merged 1 commit into
mainfrom
fix/qdmi-qiskit-if-else
Oct 25, 2026
Merged

burgholzer merged 1 commit into
mainfrom
fix/qdmi-qiskit-if-else

Conversation

@burgholzer

@burgholzer burgholzer commented Oct 25, 2026 •

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

The Qiskit bridge discarded if_else even when the QDMI device advertised it, so preflight rejected supported feedback circuits. Map it to Qiskit's IfElseOp and keep it out of opaque OpenQASM gate declarations. Existing recursive checks still validate branch operations and their physical operands; devices without advertised support still reject control flow. No new execution engine or dependency is required.

Validation: all 225 Qiskit plugin tests passed independently on Qiskit 2.5.2 and 2.6.1; full repository lint passed. The new advertised-feedback regression fails against the unmodified backend. The regression observes both branches on distinct output wires, and a sampled-estimator test checks the resulting feedback ensemble. Existing target/serializer documentation remains accurate; no migration is needed.

AI assistance: Codex prepared, reviewed and tested this patch. Maintainer review is pending.

Checklist

  • The pull request only contains commits that are focused and relevant to this change.
  • I have added appropriate tests that cover the new/changed functionality.
  • I have updated the documentation to reflect these changes.
  • The changes follow the project's style guidelines and introduce no new warnings.
  • The changes are fully tested and pass the CI checks.
  • I have reviewed my own code changes.

If PR contains AI-assisted content:

  • Any agent that created, edited, or submitted GitHub content was explicitly authorized for that scope, as required by our AI Usage Guidelines.
  • Every agent-authored or agent-edited public text body begins with the visible disclosure 🤖 *AI text below* 🤖 (titles are exempt).
  • I have disclosed AI assistance in the PR description.
  • I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it.

🤖 *AI text below* 🤖

Map device-advertised if_else to Qiskit's structural instruction instead
of discarding it. Keep it out of opaque gate declarations and reuse the
existing recursive operation checks.

Test distinct outputs from both branches and sampled ensemble estimation.

Assisted-by: Codex
@burgholzer burgholzer added fix Fix for something that isn't working python Anything related to Python code QDMI Anything related to QDMI labels Oct 25, 2026
@burgholzer burgholzer self-assigned this Oct 25, 2026
@codecov

codecov Bot commented Oct 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@burgholzer burgholzer added this to the v4.2.0 - SC26 milestone Oct 25, 2026
@burgholzer
burgholzer merged commit 08e0723 into main Oct 25, 2026
22 checks passed
@burgholzer
burgholzer deleted the fix/qdmi-qiskit-if-else branch October 25, 2026 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Fix for something that isn't working python Anything related to Python code QDMI Anything related to QDMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant