Skip to content

✨ Add W-state preparation benchmark - #2542

Open
burgholzer wants to merge 1 commit into
codex/fix-mlir-exception-boundariesfrom
codex/w-state-benchmark
Open

burgholzer wants to merge 1 commit into
codex/fix-mlir-exception-boundariesfrom
codex/w-state-benchmark

Conversation

@burgholzer

@burgholzer burgholzer commented Sep 12, 2026

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

Stacked on #2545.

Add W-state preparation to the existing C++, Python, and CLI benchmark interfaces. The generator keeps its controlled-RY/CX sweep in structured loops with precomputed angles. Evaluation reuses the existing probability and counts APIs: each single-excitation outcome has ideal probability 1/n.

The 4,096-qubit regression checks jeff serialization, reload, and amplitudes through the existing DD simulator without dense extraction. Supporting large preparations raises the shared control-flow budget to 100 million steps and rejects oversized resolved loops before execution. Documentation includes executable 3- and 256-qubit examples.

Validation:

  • Optimized native build; 66 benchmark, 33 generation, and 196 QCO utility tests; benchmark CLI CTest.
  • 199 focused Python tests and regenerated stubs.
  • Full-file C++ lint against the base branch, repository lint, and complete executable documentation with local link checks.

Hosted checks will rerun on this update. Codex assisted implementation, validation, and this description.

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.
  • 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 documentation Improvements or additions to documentation feature New feature or request DD Anything related to the DD package c++ Anything related to C++ code python Anything related to Python code MLIR Anything related to MLIR labels Sep 12, 2026
@burgholzer burgholzer self-assigned this Sep 12, 2026
@burgholzer
burgholzer force-pushed the codex/w-state-benchmark branch from 53fa37d to 78a7fc6 Compare September 12, 2026 10:07
@codecov

codecov Bot commented Sep 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.22034% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
mlir/lib/Dialect/QCO/Utils/DDFunctionality.cpp 33.3% 2 Missing ⚠️
src/bench/JSON.cpp 86.6% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@burgholzer burgholzer added this to the v4.1.0 - QDMI 1.4 / MQSF milestone Sep 12, 2026
@burgholzer
burgholzer force-pushed the codex/w-state-benchmark branch from 78a7fc6 to 3b68921 Compare September 12, 2026 11:10
@burgholzer burgholzer changed the title ✨ Add W-state benchmarks and coherent verification ✨ Add W-state preparation benchmark Sep 12, 2026
@mergify mergify Bot added the conflict label Sep 12, 2026
@burgholzer
burgholzer force-pushed the codex/w-state-benchmark branch from 3b68921 to 40a4d48 Compare September 14, 2026 19:34
@mergify mergify Bot removed the conflict label Sep 14, 2026
@burgholzer burgholzer added the fix Fix for something that isn't working label Sep 14, 2026
Prepare W states in structured loops and evaluate sampled counts against
analytic single-excitation probabilities. Register the family in the
existing C++, Python, and JSON interfaces.

Retain the 4,096-qubit DD regression and the control-flow budget needed
for large structured preparations.

Assisted-by: Codex
@burgholzer
burgholzer changed the base branch from main to codex/fix-mlir-exception-boundaries September 14, 2026 19:53
@burgholzer burgholzer removed the fix Fix for something that isn't working label Sep 14, 2026
@burgholzer
burgholzer force-pushed the codex/w-state-benchmark branch from 40a4d48 to 21d1baa Compare September 14, 2026 19:53
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 DD Anything related to the DD package documentation Improvements or additions to documentation feature New feature or request MLIR Anything related to MLIR python Anything related to Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant