Skip to content

♻️ Migrate circuit normalization to Core v4 - #977

Draft
simon1hofmann wants to merge 2 commits into
mainfrom
codex/core-v4-circuit-optimizer
Draft

♻️ Migrate circuit normalization to Core v4#977
simon1hofmann wants to merge 2 commits into
mainfrom
codex/core-v4-circuit-optimizer

Conversation

@simon1hofmann

@simon1hofmann simon1hofmann commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Description

Prepare DDSIM for the removal of qc::CircuitOptimizer in MQT Core #2262:

  • call QuantumComputation::flattenOperations() and removeFinalMeasurements() directly;
  • remove the obsolete optimizer header and CMake target; and
  • remove its Linux and Windows wheel-repair exclusions.

This intentionally leaves the MQT Core version requirement and uv.lock unchanged. The PR must remain a draft until Core v4 is released, at which point the dependency pin can be updated and the PR revalidated.

Dependencies and merge order

This PR depends on Core #2262 and should merge only after the Core v4 release. Full validation against the Core v4 branch used a temporary out-of-tree MQT::CoreAlgorithms compatibility shim for that separate Core v4 migration; no shim or unrelated migration is part of this diff.

Companion migration drafts

Validation

  • warning-clean build with WARNINGS_AS_ERRORS=ON
  • 28/28 directly affected Hybrid, Unitary, and Path/TaskBased tests
  • 116/117 full C++ tests; the sole failure is the unrelated stochastic StochNoiseSimTest.CheckQubitOrder threshold miss (943, minimum 950)
  • 116/116 remaining tests when excluding that known stochastic case
  • full uvx nox -s lint
  • git diff --check

AI assistance

Codex materially assisted with implementation, validation, review, and this pull request description. A human must review and understand the changes before marking this pull request ready.

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. (Not applicable: no public DDSIM API 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). (Not needed for DDSIM users.)
  • The changes follow the project's style guidelines and introduce no new warnings.
  • The changes are fully tested and pass the CI checks. Local Core v4 validation passes; CI requires the future Core v4 pin.
  • 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.

Use QuantumComputation member operations and drop the obsolete circuit optimizer link and wheel exclusions.

Assisted-by: GPT-5.6 Sol via Codex
@github-actions

Copy link
Copy Markdown
Contributor

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v20.1.8) reports: 2 concern(s)
  • src/UnitarySimulator.cpp:97:7: error: [clang-diagnostic-error]

    no member named 'removeFinalMeasurements' in 'qc::QuantumComputation'

       97 |   qc->removeFinalMeasurements();
          |   ~~~~^
  • src/UnitarySimulator.cpp:112:7: error: [clang-diagnostic-error]

    no member named 'removeFinalMeasurements' in 'qc::QuantumComputation'

      112 |   qc->removeFinalMeasurements();
          |   ~~~~^

Have any feedback or feature suggestions? Share it here.

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 dependencies Pull requests that update a dependency file refactor Anything related to code refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant