Skip to content

♻️ Consolidate duplicated DD circuit simulation #2103

Description

@burgholzer

🤖 AI text below 🤖

Goal

Eliminate duplicated circuit-execution logic between Core's dd::Simulation helpers and DDSIM's CircuitSimulator without introducing a cyclic or inverted dependency.

Constraints

  • The DDSIM QDMI reference device remains in MQT Core for v4 and requires circuit execution.
  • Core currently exposes Python sample, simulate, and simulate_statevector helpers.
  • SyReC and QCEC have identified dependencies on parts of the current API.

Work

  • Inventory the exact shared execution kernel: unitary application, virtual swaps, measurement sampling, dynamic shots, reset, classical control, RNG, permutations, and garbage handling.
  • Decide which minimal primitives stay in Core for the QDMI device and which public simulator API belongs in DDSIM.
  • Remove unused virtual-operation helpers where possible.
  • Migrate Python and downstream consumers explicitly.

Acceptance criteria

  • One implementation owns each execution behavior.
  • Core does not depend on DDSIM merely to build its retained QDMI device.
  • DDSIM remains the owner of the public simulator abstraction.
  • Dynamic circuits, repeated jobs, seeding, output permutations, and Python results retain coverage.

Activity

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

Metadata

Metadata

Assignees

Labels

DDAnything related to the DD packageQDMIAnything related to QDMImajorMajor version updaterefactorAnything related to code refactoring

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions