Skip to content

✨ Add QIR export with Base and Adaptive profiles - #1094

Open
simon1hofmann wants to merge 11 commits into
feat/mqt-core-compilerfrom
codex/qir-export
Open

simon1hofmann wants to merge 11 commits into
feat/mqt-core-compilerfrom
codex/qir-export

Conversation

@simon1hofmann

@simon1hofmann simon1hofmann commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

🤖 AI text below 🤖

Description

Add QIR export as LLVM text (qir/llvm) or bitcode (qir-bitcode). Select Base or Adaptive profiles through qir_profile in Python or --qir-profile in the CLI.

Stacked on #1027 and uses its mqt extra: Core 4.1.1 and Qiskit 2.5.x. Merge #1027 first, then retarget this PR to main. The compiler seed and mapping-trial CLI options also work with QIR output.

Export accepts circuits from either compiler, preserves the input and measurement destinations, and writes files atomically so lowering or write failures preserve existing files. QIR lowering can decompose gates and assign new resource identifiers; the runtime must support the emitted QIS calls and profile.

Fixes #437
Fixes #441

Validation

  • Full suite with Core 4.1.1 / Qiskit 2.5.2 on Python 3.13: 904 passed, including execution of exported QIR.
  • Full suite without Core / Qiskit 2.6.0 on Python 3.15: 715 passed.
  • Full suite at the Qiskit 2.2.3 floor on Python 3.11: 715 passed.
  • All three suites report four expected failures for the known Qiskit fixed-width carry bug. The installation without Core skips its test module.
  • All lint hooks passed, including type checking with the optional extra.

The branch includes the updated #1027 and current main. Fresh CI is pending.

QIR runtime checks ran outside the local macOS sandbox. Codex assisted with implementation, updates, and checks.

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.
  • I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals.
  • I have added migration instructions to the upgrade guide (if needed).
  • 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.

Assisted-by: GPT-5 via Codex
@codecov

codecov Bot commented Oct 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@simon1hofmann simon1hofmann added feature New feature or request mqt.bench Issues that affect mqt.bench python Pull requests that update Python code labels Oct 22, 2026
Preserve the export-only scope, include current main through the prerequisite, and keep changelog references ordered.

Assisted-by: GPT-6 via Codex
@simon1hofmann
simon1hofmann added this pull request to stack #1097 October 22, 2026 11:21
@simon1hofmann simon1hofmann self-assigned this Oct 25, 2026

This branch has not been deployed

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

Labels

feature New feature or request mqt.bench Issues that affect mqt.bench python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ QIR support on Native Gates Level ✨ QIR support on mapped level

1 participant