munich-quantum-toolkit / munich-quantum-toolkit/core

⚡️ Evaluate JIT-backed execution for dynamic QCO programs

Open
#2,107 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

c++ DD enhancement MLIR QIR
Dominant language
C++
Stars
133
Forks
73
Avg merge
17h 34m
Merged PRs (30d)
261

Description

🤖 AI text below 🤖

Context

The QCO decision-diagram functionality added for #1915 interprets quantum and
classical MLIR operations directly. This gives the implementation control over
DD construction, supplied initial states, static sampling, allocation, and
deallocation, but it also requires explicit handling of operations from
arith, math, cf, scf, func, and memref.

MLIR provides an ExecutionEngine, but it does not execute arbitrary QC or QCO
operations directly. A module must first be lowered to LLVM-compatible
dialects. Quantum operations must become calls to registered runtime functions.
The existing DD-backed QIR runtime already provides a closely related execution
model.

Goal

Investigate whether genuinely dynamic QCO programs should be lowered and
executed through MLIR's JIT infrastructure and the existing QIR runtime instead
of extending the manual classical interpreter.

Proposed prototype

  • Lower a representative dynamic program through QCO, QC, Adaptive QIR, and
    LLVM-compatible dialects.
  • Execute the lowered module with mlir::ExecutionEngine or reuse the existing
    QIR runner infrastructure where practical.
  • Register DD-backed implementations for the required quantum runtime calls.
  • Compare semantics, implementation size, diagnostics, and performance with
    direct QCO interpretation.
  • Determine whether static sampling can remain on the direct DD path while the
    JIT path handles measurement-dependent control flow.

Questions to resolve

  • Can the existing QIR runtime be reused without duplicating execution state or
    runtime-call implementations?
  • Which QCO allocation and deallocation semantics survive the current lowering
    pipeline?
  • Which interfaces are required for caller-supplied initial DDs, symbolic
    argument bindings, and dynamic QTensor extents?
  • Should matrix-DD construction remain exclusively on the direct path?
  • Can density-matrix execution and partial trace be exposed through suitable
    runtime calls, or should they remain direct DD operations?
  • How should the implementation select between static DD execution and dynamic
    JIT execution?

Expected outcome

Produce a small end-to-end prototype and an architecture decision. If the JIT
path is viable, split the required lowering and runtime interfaces into focused
implementation issues. Otherwise, document the blockers and retain the direct
interpreter with a clear supported-operation boundary.

References

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the MLIR ExecutionEngine and the existing DD-backed QIR runner, then trace the QCO-to-LLVM-compatible lowering path through QCO, QC, and Adaptive QIR. Build a small end-to-end prototype for a representative dynamic program and compare it with direct QCO interpretation. Done means an architecture decision documenting viability, required runtime interfaces, or blockers and the supported-operation boundary.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend, compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.