Skip to content

✨ Use native QDMI multi-program jobs in PennyLane workflows #2364

Description

@burgholzer

🤖 AI text below 🤖

Elevator pitch

PennyLane produces batches through broadcasting, measurement grouping, differentiation, and shot vectors. Native batching should improve these workflows without undoing concurrent single-program execution.

Current state

python/mqt/core/plugins/pennylane/device.py maps preprocessed tapes to jobs. #2349 submits individual jobs before waiting and preserves ordered results and best-effort cleanup.

Work and decisions

  • Build on the latest concurrent execution path, not the older sequential code in ✨ Adopt exact QDMI 1.4 payload contracts across Core #2226.
  • Use native multi-program jobs only for compatible format, shot, and job-option groups.
  • Restore tape, measurement-group, broadcast, and shot-vector order after indexed decoding.
  • Keep concurrent single-program submission as the unsupported-batch fallback.
  • Preserve counters, batch timing, error propagation, interruption handling, and best-effort cancellation without masking the original error.

Dependencies and release boundary

Parent: ✨ Adopt native multi-program QDMI jobs across Core and SDK plugins. Requires ✨ Extract QDMI multi-program Client and bundled-device support. Preserve #2349 and any successor fixes.

Acceptance and validation

  • Tests compare native and fallback results for ordinary tapes, broadcasts, non-commuting groups, parameter-shift batches, and shot vectors.
  • Failure and KeyboardInterrupt cleanup preserves the first error and attempts cancellation of submitted work.
  • Unsupported batching does not regress asynchronous overlap.
  • Run focused PennyLane/DDSIM tests, supported/minimum sessions, and full lint.

Non-goals

Requiring the MQT compiler for batching; payload capability design; changing supported gate decomposition or sampling semantics.

Provider compatibility evidence

Contribute an end-to-end example to #2359 using the matching provider implementation. Verify ordered SDK results and lifecycle behavior for both supported native batches and concurrent single-program fallback. Do not infer aggregate support from a provider SDK's batch convenience API.

Activity

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

Metadata

Metadata

Assignees

Labels

QDMIAnything related to QDMIfeatureNew feature or requestpythonAnything related to Python code

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions