Skip to content

⚡ Avoid repeated QDMI result and metadata work - #2481

Merged
burgholzer merged 1 commit into
mainfrom
codex/qdmi-result-frontend-performance
Sep 9, 2026
Merged

burgholzer merged 1 commit into
mainfrom
codex/qdmi-result-frontend-performance

Conversation

@burgholzer

@burgholzer burgholzer commented Sep 9, 2026

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

Concurrent DDSIM probability and statevector readers now share the existing initialization guard. Dense size queries compute the checked byte count from the DD root, without constructing an exponential vector; undersized buffers are rejected before allocation.

PennyLane decodes validated shots through NumPy and uses the known Python operation name to access its per-converter contract cache. Qiskit reads duration units and scale lazily once per target snapshot, preserving validation and floating-point evaluation order.

Regressions cover cold concurrent readers, dense-size overflow, malformed shots and wire order, repeated operation-name queries, and duration metadata reuse across placements and snapshots. The retained audit records the measurements and limits. Open #2373 touches the same DDSIM source; its multi-program changes remain separate.

Validation: 67 DDSIM tests, 241 client tests, and 102 focused Python frontend tests passed. Full Nox lint and C++ lint passed, with all lines of the three changed C++ files checked. The local 22-qubit probe confirms zero dense allocations for size-only requests and sub-microsecond queries. No hosted CI, Windows, ThreadSanitizer, or live cloud validation is claimed.

These changes affect unreleased v4 functionality, so no standalone changelog or migration entry is added. Codex implemented and checked the changes under explicit authorization; human review remains required before merge.

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.

Share dense DDSIM initialization across concurrent readers and answer size queries without materializing results. Reuse frontend metadata and decode PennyLane shots with NumPy while preserving validation.

Assisted-by: Codex
@burgholzer burgholzer added 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 9, 2026
@burgholzer burgholzer self-assigned this Sep 9, 2026
@burgholzer burgholzer added this to the v4.0.0 - IEEE Quantum Week milestone Sep 9, 2026
@burgholzer
burgholzer enabled auto-merge (squash) September 9, 2026 07:03
@codecov

codecov Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Patch % Lines
src/qdmi/devices/dd/Device.cpp 90.9% 2 Missing ⚠️
python/mqt/core/plugins/pennylane/device.py 85.7% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@burgholzer
burgholzer merged commit 46f98ea into main Sep 9, 2026
26 of 27 checks passed
@burgholzer
burgholzer deleted the codex/qdmi-result-frontend-performance branch September 9, 2026 07:11
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 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