Skip to content

🐛 Preserve jeff entry-point results#1934

Merged
burgholzer merged 3 commits into
mainfrom
agent/1910-jeff-results
Jul 24, 2026
Merged

🐛 Preserve jeff entry-point results#1934
burgholzer merged 3 commits into
mainfrom
agent/1910-jeff-results

Conversation

@burgholzer

@burgholzer burgholzer commented Jul 24, 2026

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Summary

  • Preserve observable classical result types and returns when converting a Jeff
    entry point back to QCO.
  • Synthesize the legacy i64 status result only for result-less entry points.
  • Add a measurement-result round-trip regression test.
  • Add this fix to the existing Jeff conversion changelog entry.

Context

This independent Jeff conversion issue was found while exercising programs from
the OpenQASM integration in #1910. Jeff compatibility is not a prerequisite for
accepting an OpenQASM program, but when a supported program is converted through
Jeff, the conversion must not silently replace its observable result.

Validation

  • Jeff round-trip conversion tests: 116 passed
  • uvx prek run --from-ref origin/main --to-ref HEAD
  • git diff --check origin/main...HEAD

@burgholzer burgholzer added fix Fix for something that isn't working c++ Anything related to C++ code MLIR Anything related to MLIR labels Jul 24, 2026
@burgholzer burgholzer added this to the MLIR Support milestone Jul 24, 2026
@burgholzer burgholzer self-assigned this Jul 24, 2026
@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@denialhaag denialhaag changed the title 🐛 Preserve Jeff entry-point results 🐛 Preserve jeff entry-point results Jul 24, 2026
@mergify mergify Bot added the conflict label Jul 24, 2026
Assisted-by: GPT-5.6 via Codex
Assisted-by: GPT-5.6 via Codex
Assisted-by: GPT-5.6 via Codex
@burgholzer
burgholzer force-pushed the agent/1910-jeff-results branch from 566035d to 101317d Compare July 24, 2026 16:07
@mergify mergify Bot removed the conflict label Jul 24, 2026
@burgholzer
burgholzer marked this pull request as ready for review July 24, 2026 16:22
@burgholzer
burgholzer merged commit 359f753 into main Jul 24, 2026
46 of 51 checks passed
@burgholzer
burgholzer deleted the agent/1910-jeff-results branch July 24, 2026 17:56
burgholzer added a commit that referenced this pull request Jul 24, 2026
🤖 *AI text below* 🤖

## Summary

- Insert the synthesized Jeff status return at the original terminator
position.
- Add a regression for result-less Jeff entry points with operations in
the body.
- Treat `mlir/**` changes as Python-relevant so binding-level tests and
lint run on affected pull requests.

## Root cause

The entry-point restoration introduced in #1934 created the replacement
`func.return` at the current rewriter insertion point, which remained
near the start of the block after creating the zero status constant.
Result-less Jeff programs therefore placed operations after the
terminator and failed conversion.

The original pull request did not expose this through Python because the
shared change detector did not classify `mlir/**` changes as
Python-relevant, so all Python jobs were skipped.

## Impact

Serialized result-less Jeff programs can again be compiled through the
Python `compile_program` entry point. Future MLIR changes will exercise
the Python bindings in pull-request CI.

## Validation

- Jeff round-trip suite: 117 passed
- Jeff entry-point regressions: 2 passed
- Exact failing Python test: 1 passed
- Full Python suite: 394 passed, 3 skipped
- Repository lint and GitHub workflow validation: passed
- `git diff --check`: passed
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 fix Fix for something that isn't working MLIR Anything related to MLIR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant