Skip to content

🐛 Preserve QDMI provider lifetime and target metadata - #2454

Merged
burgholzer merged 2 commits into
mainfrom
codex/qdmi-followup-fixes
Sep 7, 2026
Merged

🐛 Preserve QDMI provider lifetime and target metadata#2454
burgholzer merged 2 commits into
mainfrom
codex/qdmi-followup-fixes

Conversation

@burgholzer

@burgholzer burgholzer commented Sep 7, 2026

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

Fix QDMI metadata and provider ownership defects found in the follow-up audit:

  • Preserve explicit ordered Qiskit placements for fixed-arity gates, including CCX, and convert raw QDMI durations to seconds. For example, duration 20 with unit ns and scale 0.5 now becomes 10 ns rather than 20 seconds.
  • Share providers by loaded module and symbol prefix, retain them across fresh sessions, accept setup warning statuses, and reject null session/child handles with cleanup.
  • Contain configuration exceptions at session allocation, return NOTSUPPORTED for valid custom session enums, reject embedded NULs in SC names, and reuse topology sets during override validation.

Consolidate redundant Python semantic tests while retaining binding coverage, and isolate registration tests so invalid providers cannot contaminate later enumeration.

Includes independent lifetime/session fixes from #2230 and allocation/enum fixes from #2229. The remaining driver redesign stays deferred. No independent extraction from #2231 was justified because its shared-client and staging changes depend on that redesign. This PR has no dependency on those PRs.

Validation: 465 native QDMI tests passed, one existing SC test skipped; 10 staging/configuration checks passed; 468 serial Python QDMI/plugin tests passed. Repository lint passed. Committed-diff C++ lint checked all six changed C++ source files with zero findings. Hosted CI is pending. These changes concern unreleased v4 functionality, so no standalone changelog or upgrade entry is required.

Codex assisted with the audit, implementation, tests, and this description. Human review remains pending.

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.

Keep loaded providers shared across path aliases and fresh sessions. Harden
session setup and C entry-point errors, retain explicit Qiskit placements,
convert durations to seconds, and validate SC names and topology lookups.
Consolidate Python binding tests and isolate registry mutations.

Assisted-by: GPT-6 via Codex
@burgholzer burgholzer added code quality Code quality improvements fix Fix for something that isn't working c++ Anything related to C++ code python Anything related to Python code QDMI Anything related to QDMI labels Sep 7, 2026
@burgholzer burgholzer self-assigned this Sep 7, 2026
@codecov

codecov Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
src/qdmi/driver/Driver.cpp 95.0% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

Move platform-specific lambdas outside EXPECT_EXIT arguments so MSVC does
not encounter preprocessor directives inside a function-like macro.

Assisted-by: GPT-6 via Codex
@burgholzer

Copy link
Copy Markdown
Member Author

Another batch of nice improvements. Some of them pulled out of the 4.1 PR stack already, which should help to trim these down.

@burgholzer
burgholzer merged commit 1bf02dd into main Sep 7, 2026
26 of 27 checks passed
@burgholzer
burgholzer deleted the codex/qdmi-followup-fixes branch September 7, 2026 22:42
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 code quality Code quality improvements fix Fix for something that isn't working python Anything related to Python code QDMI Anything related to QDMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant