Skip to content

🧪 Organize benchmark tests and run simulation in C++ - #2402

Open
denialhaag wants to merge 6 commits into
mainfrom
codex/streamline-benchmark-tests
Open

🧪 Organize benchmark tests and run simulation in C++#2402
denialhaag wants to merge 6 commits into
mainfrom
codex/streamline-benchmark-tests

Conversation

@denialhaag

@denialhaag denialhaag commented Sep 5, 2026

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

Organize C++ generator tests and Python binding tests by benchmark family. Share generation, QCO compilation, sampling, and jeff round-trip checks in the native test utilities.

Run multiplexer, QFT, and QPE sampling checks in C++, using the default compiler pipeline and DD sampler. Include the existing bounded f64 phase-table support needed for direct QPE execution. Python tests cover typed options, JSON round trips, exceptions, and program bindings; dedicated simulator-binding tests already cover the public sampling API.

AI notice

This PR and its contents were created with the assistance of GPT-5.6 Sol and GPT-6 via Codex.

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.

@denialhaag denialhaag added refactor Anything related to code refactoring c++ Anything related to C++ code MLIR Anything related to MLIR skip-changelog Changes that do not need to show up in the changelog labels Sep 5, 2026
@denialhaag denialhaag self-assigned this Sep 5, 2026
@denialhaag denialhaag added this to the v4.0.0 - IEEE Quantum Week milestone Sep 5, 2026
@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.71429% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
mlir/lib/Dialect/QCO/Utils/DDFunctionality.cpp 85.7% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@mergify mergify Bot added the conflict label Sep 6, 2026
@denialhaag denialhaag removed the skip-changelog Changes that do not need to show up in the changelog label Sep 6, 2026
@denialhaag
denialhaag marked this pull request as ready for review September 7, 2026 11:38
@denialhaag
denialhaag force-pushed the codex/streamline-benchmark-tests branch from ba9d92c to 7c2a02b Compare September 7, 2026 11:42
@mergify mergify Bot removed the conflict label Sep 7, 2026

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

This one definitely looks good already! Aiming for merging all four PRs in the stack at once, when possible.

denialhaag and others added 3 commits September 7, 2026 13:31
Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
Use the compiler sampling entry point to handle lowering.

Assisted-by: GPT-6 via Codex
@burgholzer
burgholzer force-pushed the codex/streamline-benchmark-tests branch from 7c2a02b to fcba621 Compare September 7, 2026 13:43
Share native generation and sampling checks. Keep Python tests focused on bindings and organize them by benchmark.

Move the existing DD phase-table support here so QPE sampling runs at the base of the stack.

Assisted-by: GPT-6 via Codex
@burgholzer burgholzer changed the title ♻️ Split benchmark generator tests by family 🧪 Organize benchmark tests and run simulation in C++ Sep 7, 2026
@burgholzer burgholzer self-assigned this Sep 7, 2026
@burgholzer burgholzer added the python Anything related to Python code label Sep 7, 2026

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

Some feedback:

Comment thread mlir/lib/Dialect/QCO/Utils/DDFunctionality.cpp
Comment thread mlir/lib/Dialect/QCO/Utils/DDFunctionality.cpp
Comment thread mlir/unittests/bench/test_benchmark_generate_multiplexer.cpp Outdated
Comment thread test/python/bench/test_ghz.py
Comment thread mlir/unittests/Dialect/QCO/Utils/test_dd_functionality.cpp Outdated
Comment thread mlir/unittests/bench/test_benchmark_generate.cpp Outdated
Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

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.

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 MLIR Anything related to MLIR python Anything related to Python code refactor Anything related to code refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants