Skip to content

✨ Add exact payload execution capability metadata - #508

Open
simon1hofmann wants to merge 6 commits into
Munich-Quantum-Software-Stack:developfrom
simon1hofmann:codex/program-format-capabilities
Open

✨ Add exact payload execution capability metadata#508
simon1hofmann wants to merge 6 commits into
Munich-Quantum-Software-Stack:developfrom
simon1hofmann:codex/program-format-capabilities

Conversation

@simon1hofmann

@simon1hofmann simon1hofmann commented Aug 22, 2026

Copy link
Copy Markdown

🤖 AI text below 🤖

Description

Define the QDMI 1.4 contract for exact, payload-specific execution capabilities.

Specifically, this pull request:

  • replaces the legacy program-format enum at the device and job boundaries with a fixed C-compatible descriptor containing the exact format ID, version, profile, and text or binary encoding;
  • adds a descriptor-specific two-call feature query with fixed string feature records, optional numeric values, and typed constraints;
  • defines QDMI_ERROR_NOTSUPPORTED as unknown optional-feature metadata, while a successful query returns the complete optional set, which may be empty;
  • defines exact OpenQASM and QIR descriptors and their normative baseline semantics;
  • treats QPY and IQM JSON as provider-defined formats that require vendor-namespaced descriptor IDs;
  • defines flat payload-declared bit ordering for shots and histogram keys and adds format-native program output for QIR;
  • removes calibration and batch pseudo-formats from the payload vocabulary because they are administration and multi-program job concerns, not program formats; and
  • updates the example device, device template, conformance tests, documentation, changelog, and upgrade guide.

The fixed descriptor and feature records have a direct migration path to QDMI v2. Devices list each exact accepted descriptor; clients do not infer version compatibility.

No additional dependencies are required.

Validation

  • Release build: passed.
  • Release CTest suite: 104/104 passed; read-only result tests are configured skips.
  • Clang 22 lint-preset build and changed-line Clang-Tidy checks: passed; only unchanged baseline warnings remain.
  • Strict C11 and C++20 public-ABI compile checks: passed.
  • Embedded QIR validation with LLVM 22: passed.
  • Doxygen documentation build: passed, with only the existing obsolete DOT_MULTI_TARGETS warning.
  • uvx prek run --all-files: passed.
  • git diff --check: passed.

AI assistance: OpenAI Codex assisted with implementation, review, testing, 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.
  • I have added entries to the changelog for any noteworthy additions, changes, fixes, or removals.
  • I have added migration instructions to the upgrade guide.
  • The changes follow the project's style guidelines and introduce no new warnings.
  • The changes are fully tested locally; GitHub CI will validate the supported configurations.
  • I have reviewed my own code changes.

If PR contains AI-assisted content:

  • I have disclosed the use of AI tools in the PR description as per the AI Usage Guidelines.
  • AI-assisted commits include an Assisted-by: [Model Name] via [Tool Name] footer.
  • I confirm that I have personally reviewed and understood all AI-generated content, and accept full responsibility for it.

@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
examples/device/src/cxx_device.cpp 96.7% 3 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff            @@
##           develop    #508     +/-   ##
=========================================
+ Coverage     90.6%   91.1%   +0.4%     
=========================================
  Files            6       7      +1     
  Lines          749     800     +51     
  Branches       146     164     +18     
=========================================
+ Hits           679     729     +50     
- Misses          70      71      +1     
Flag Coverage Δ
cpp 91.1% <97.2%> (+0.4%) ⬆️
Files with missing lines Coverage Δ
examples/driver/qdmi_example_driver.cpp 93.3% <100.0%> (-0.1%) ⬇️
include/qdmi/constants.h 100.0% <100.0%> (ø)
examples/device/src/cxx_device.cpp 94.6% <96.7%> (+0.3%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@burgholzer burgholzer changed the title ✨ Add program-format execution feature metadata ✨ Add exact payload execution capability metadata Aug 22, 2026
@burgholzer burgholzer self-assigned this Aug 22, 2026
@burgholzer burgholzer added documentation Improvements or additions to documentation feature New feature or feature request minor Changes that warrant a minor version release labels Aug 22, 2026

@burgholzer burgholzer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @simon1hofmann for kickstarting this.
I already pushed a couple of changes here to drive this further.
Furthermore, I collected some feedback in the comments as part of this review. I'll hand these to my Codex session now to iterate on them.

Comment thread examples/driver/qdmi_example_driver.cpp
Comment thread include/qdmi/constants.h Outdated
Comment thread include/qdmi/constants.h Outdated
Comment thread include/qdmi/constants.h Outdated
Comment thread include/qdmi/constants.h Outdated
Comment thread include/qdmi/constants.h Outdated
Comment thread CHANGELOG.md Outdated
Comment thread UPGRADING.md Outdated
Add a public per-format capability profile that distinguishes unknown, incomplete, and known-empty optional feature sets. Document the format baselines and cover the example-device property implementation.

Assisted-by: GPT-5 via Codex
Add the pull request and contributor references required by the QDMI changelog conventions.

Assisted-by: GPT-5 via Codex
@burgholzer
burgholzer force-pushed the codex/program-format-capabilities branch 2 times, most recently from 9d815b3 to 8ffcf50 Compare August 23, 2026 18:52
Replace the legacy format enum with exact descriptors, descriptor-scoped optional features and typed constraints, and format-defined result ordering. Preserve the QIR 1 migration while separating newer QIR and output-schema versions.

Assisted-by: GPT-5.6 Sol via Codex
@burgholzer
burgholzer force-pushed the codex/program-format-capabilities branch from 8ffcf50 to 4356c0f Compare August 23, 2026 18:58
@burgholzer burgholzer mentioned this pull request Aug 23, 2026
11 tasks
Define canonical program-format value semantics, exact text and binary framing, logical output order, custom enum ranges, and translation and retrieval ownership.

Assisted-by: GPT-5.6 Sol via Codex
Add a terminal enumerator to every extensible enum so the complete declared custom range is well-defined in C++.

Assisted-by: GPT-5.6 Sol via Codex
burgholzer added a commit that referenced this pull request Aug 24, 2026
Bring the complete QDMI #508 custom enum range into the multi-program job stack.

Assisted-by: GPT-5.6 Sol via Codex
Suppress Clang enum-membership warnings only at tests that exercise unnamed valid and invalid API enum values.

Assisted-by: GPT-5.6 Sol via Codex

@burgholzer burgholzer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Alright. This is looking pretty good to me already and I see no bigger blockers. Let's see how the downstream integration goes.

Comment thread include/qdmi/constants.h Outdated
Comment thread include/qdmi/constants.h Outdated
Comment thread include/qdmi/constants.h Outdated
Comment thread CHANGELOG.md Outdated
Comment thread include/qdmi/constants.h Outdated
Comment thread include/qdmi/constants.h Outdated
Comment thread UPGRADING.md Outdated
@burgholzer burgholzer added this to the v1.4.0 milestone Aug 24, 2026

@burgholzer burgholzer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Formally approving this for now to unblock the stack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflict documentation Improvements or additions to documentation feature New feature or feature request minor Changes that warrant a minor version release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants