Skip to content

♻️ Use the Core OpenQASM serializer - #436

Draft
simon1hofmann wants to merge 1 commit into
mainfrom
codex/2098-openqasm-serializer
Draft

♻️ Use the Core OpenQASM serializer#436
simon1hofmann wants to merge 1 commit into
mainfrom
codex/2098-openqasm-serializer

Conversation

@simon1hofmann

@simon1hofmann simon1hofmann commented Aug 26, 2026

Copy link
Copy Markdown

🤖 AI text below 🤖

Description

Migrate projective-assertion compilation to the operation-level serializer
introduced by MQT Core #2249.

  • replace the removed Operation::dumpOpenQASM2 calls with
    qc::OpenQASMSerializer;
  • reuse one serializer for the forward and inverse assertion circuits;
  • serialize the inverted clone that the reverse pass already constructed;
  • exercise the non-self-inverse s/sdg path in the compilation test.

Draft status

This PR intentionally remains a draft until MQT Core v4 is released. It does
not pin an intermediate Core commit and does not add temporary MLIR/CI setup.
CI is therefore expected to fail against the currently released Core version.

Dependencies

  • Depends on MQT Core #2249
    and the corresponding MQT Core v4 release.

Validation

Validated against the Core PR branch before removing the temporary pin:

  • focused projective-measurement tests: 6/6
  • full Debugger C++ suite: 149/149
  • full uvx nox -s lint

AI assistance

Codex materially assisted with implementation, tests, integration validation,
and this pull request description. A human must review and understand the
changes before marking this pull request ready.

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. This waits for MQT Core v4.
  • 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.

@simon1hofmann
simon1hofmann force-pushed the codex/2098-openqasm-serializer branch from 0722c5b to 9546f7f Compare August 26, 2026 11:14
@simon1hofmann simon1hofmann self-assigned this Aug 26, 2026
@simon1hofmann simon1hofmann added c++ Anything related to C++ code dependencies Pull requests that update a dependency file labels Aug 26, 2026
@simon1hofmann
simon1hofmann marked this pull request as ready for review August 26, 2026 13:25

@denialhaag denialhaag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for also updating the implementation here, @simon1hofmann! 😎

I just have two comments, both of which depend on the other two reviews:

Comment thread cmake/ExternalDependencies.cmake Outdated
Comment thread src/backend/dd/DDSimDebug.cpp
@simon1hofmann
simon1hofmann marked this pull request as draft August 26, 2026 14:24
@simon1hofmann
simon1hofmann force-pushed the codex/2098-openqasm-serializer branch from 9546f7f to 0a0c8b9 Compare August 26, 2026 14:38
@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Important

Approval pending

CodeRabbit has no unresolved comments, but it has not reviewed the latest commit.

Use the checkbox below to review the latest commit. CodeRabbit will approve the changes if it finds no blocking issues.

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@denialhaag denialhaag left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM! 😎

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 dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants