Skip to content

✨ Add quantum teleportation benchmark - #2324

Open
denialhaag wants to merge 9 commits into
codex/streamline-benchmark-testsfrom
codex/add-teleportation-benchmark
Open

✨ Add quantum teleportation benchmark#2324
denialhaag wants to merge 9 commits into
codex/streamline-benchmark-testsfrom
codex/add-teleportation-benchmark

Conversation

@denialhaag

@denialhaag denialhaag commented Sep 1, 2026

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

Add a fixed quantum teleportation benchmark with C++ and Python APIs, strict empty-parameter instance specifications and manifests, an analytic reference, command-line support, and structured MLIR generation.

The program teleports the fixed |+> state and returns only Bob's X-basis measurement. Outcome 0 denotes success; Alice's measurements remain internal and drive the X and Z corrections. The benchmark reports the probability of recovering the prepared state. This checks the fixed input, not arbitrary-state channel fidelity.

Native reference, generation, and sampling tests protect the output, correction data flow, and deterministic success outcome. A separate Python test covers the benchmark bindings and JSON round trips. These tests reuse the structure and native helpers from #2402.

This PR is stacked on #2402.

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 feature New feature or request c++ Anything related to C++ code python Anything related to Python code MLIR Anything related to MLIR labels Sep 1, 2026
@denialhaag denialhaag self-assigned this Sep 1, 2026
@denialhaag
denialhaag force-pushed the codex/add-teleportation-benchmark branch from ddd7671 to 35fee73 Compare September 1, 2026 21:06
@codecov

codecov Bot commented Sep 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.61905% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/bench/JSON.cpp 92.3% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@mergify mergify Bot added the conflict label Sep 2, 2026
Base automatically changed from codex/add-multiplexer-benchmark to main September 2, 2026 22:16
@denialhaag
denialhaag force-pushed the codex/add-teleportation-benchmark branch from 1b7cf58 to d47715d Compare September 5, 2026 12:20
@denialhaag
denialhaag changed the base branch from main to codex/streamline-benchmark-tests September 5, 2026 12:20
@mergify mergify Bot added conflict and removed conflict labels Sep 5, 2026
@denialhaag
denialhaag force-pushed the codex/add-teleportation-benchmark branch from d47715d to e5cd2a7 Compare September 5, 2026 12:36

@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 bindings/bench/register_bench.cpp Outdated
Comment thread mlir/bench/programs/Teleportation.cpp Outdated
@denialhaag
denialhaag marked this pull request as ready for review September 7, 2026 11:38
@denialhaag
denialhaag force-pushed the codex/add-teleportation-benchmark branch from 35098fe to b176a80 Compare September 7, 2026 11:42
@burgholzer burgholzer added this to the v4.0.0 - IEEE Quantum Week milestone Sep 7, 2026
@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.

@burgholzer
burgholzer force-pushed the codex/add-teleportation-benchmark branch from 45e44d7 to 1ff0acc Compare September 7, 2026 13:43

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

Tweaked the benchmark here a little bit so that it actually benchmarks how well the state was teleported and added simulation tests.
This LGTM now and should also be ready to merge.

Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
denialhaag and others added 6 commits September 7, 2026 15:20
Assisted-by: GPT-5.6 Sol via Codex
Document the fixed input, measurement order, and limits of the uniform
reference. Check generated output with DD sampling while retaining the
structural feed-forward test.

Assisted-by: GPT-6 via Codex
Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
Keep Alice measurements internal and project Bob onto the fixed input. Report a one-bit success outcome and compact the execution plan.

Assisted-by: GPT-6 via Codex
Reuse native benchmark test helpers and keep the Python test focused on bindings.

Assisted-by: GPT-6 via Codex
@burgholzer
burgholzer force-pushed the codex/add-teleportation-benchmark branch from 1ff0acc to 3b44a62 Compare September 7, 2026 15:26
@burgholzer burgholzer self-assigned this Sep 7, 2026
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 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.

2 participants