Skip to content

✨ Preserve reusable functions across jeff import and export - #2339

Merged
burgholzer merged 1 commit into
mainfrom
codex/jeff-reusable-functions
Sep 6, 2026
Merged

✨ Preserve reusable functions across jeff import and export#2339
burgholzer merged 1 commit into
mainfrom
codex/jeff-reusable-functions

Conversation

@burgholzer

@burgholzer burgholzer commented Sep 3, 2026

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

Preserve reusable functions and calls across QCO ↔ jeff conversion using native func.func and func.call conversion patterns. Ordinary calls remain compact; only calls inside quantum modifiers are expanded by the shared modifier pass. Correct the jeff entry-point mapping to index the function table, not the string table.

This PR is rebased on current main, including the jeff-mlir forward-call fix. Imported helpers are private, source function order is preserved, and the entry-point index identifies the original entry function. Classical-register reference arguments remain unsupported and are rejected explicitly.

Codex implemented and tested the changes with an independent jeff/MLIR specialist. The integration reuses existing MLIR conversion and inlining APIs without a new format schema, custom call graph, or whole-program inliner.

Integrated-stack validation: release build; all 3,916 registered CTest cases with one expected skip; all 294 Qiskit translation tests; whole-file C++ lint and repository lint. Stub generation passed without tracked changes. Hosted CI is separate evidence and has not been claimed as passed.

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

@burgholzer burgholzer added feature New feature or request Core Anything related to the Core library and IR c++ Anything related to C++ code MLIR Anything related to MLIR labels Sep 3, 2026
burgholzer added a commit that referenced this pull request Sep 3, 2026
Fold #2339 into the existing unreleased jeff conversion entry and record the completed local validation in its execution plan.

Assisted-by: GPT-5.6 via Codex
@codecov

codecov Bot commented Sep 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 95.65217% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...lir/lib/Dialect/MQT/Transforms/UnrollModifiers.cpp 94.1% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

burgholzer added a commit that referenced this pull request Sep 3, 2026
Fold #2339 into the existing unreleased jeff conversion entry and record the completed local validation in its execution plan.

Assisted-by: GPT-5.6 via Codex
@burgholzer
burgholzer force-pushed the codex/jeff-reusable-functions branch from c2f0894 to f6c4ccc Compare September 3, 2026 05:07
@burgholzer
burgholzer force-pushed the codex/qco-function-model branch from ad32279 to d2e592b Compare September 3, 2026 11:05
@mergify mergify Bot added the conflict label Sep 3, 2026
@burgholzer
burgholzer force-pushed the codex/qco-function-model branch from d2e592b to 1a68140 Compare September 3, 2026 21:05
Base automatically changed from codex/qco-function-model to main September 3, 2026 22:20
@burgholzer
burgholzer force-pushed the codex/jeff-reusable-functions branch from f6c4ccc to aa96714 Compare September 3, 2026 23:12
@burgholzer burgholzer changed the title ✨ Support reusable QCO functions in jeff output ✨ Preserve reusable functions across jeff import and export Sep 3, 2026
@mergify mergify Bot removed the conflict label Sep 3, 2026
@mergify mergify Bot added the conflict label Sep 4, 2026
@burgholzer
burgholzer force-pushed the codex/jeff-reusable-functions branch from aa96714 to 212d319 Compare September 4, 2026 21:59
@mergify mergify Bot added the conflict label Sep 4, 2026
@mergify mergify Bot added the conflict label Sep 5, 2026
@burgholzer
burgholzer force-pushed the codex/jeff-reusable-functions branch from 212d319 to 29543df Compare September 5, 2026 13:09
@mergify mergify Bot removed the conflict label Sep 5, 2026
Preserve native function tables and calls across QCO/jeff conversion, and expand only calls nested under unsupported quantum modifiers.

Rely on the corrected jeff reader for forward references while keeping mutable classical helper arguments fail-closed.

Assisted-by: Codex
@burgholzer
burgholzer force-pushed the codex/jeff-reusable-functions branch from 29543df to b74fd6a Compare September 5, 2026 15:00
@burgholzer burgholzer self-assigned this Sep 6, 2026

@burgholzer burgholzer left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This feels very clean. I'm merging this for now as I continue through the stack of PRs here.

@burgholzer burgholzer added this to the v4.0.0 - IEEE Quantum Week milestone Sep 6, 2026
@burgholzer
burgholzer merged commit 39538ec into main Sep 6, 2026
26 checks passed
@burgholzer
burgholzer deleted the codex/jeff-reusable-functions branch September 6, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Anything related to C++ code Core Anything related to the Core library and IR feature New feature or request MLIR Anything related to MLIR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant