Skip to content

💥 Remove the legacy circuit surface for v4 - #2288

Merged
burgholzer merged 12 commits into
mainfrom
codex/remove-legacy-circuit-v4
Sep 2, 2026
Merged

💥 Remove the legacy circuit surface for v4#2288
burgholzer merged 12 commits into
mainfrom
codex/remove-legacy-circuit-v4

Conversation

@simon1hofmann

@simon1hofmann simon1hofmann commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖

Description

Remove the complete legacy circuit surface for MQT Core v4: qc::QuantumComputation, CoreIR/CoreQASM targets and headers, mqt.core.ir, mqt.core.load, classic Qiskit converters, and circuit-oriented DD adapters. MQT Core v4 deliberately provides no compatibility aliases, legacy circuit constructs, or density-simulation layer.

CoreDD retains only its DD-native gate, control, qubit, and permutation vocabulary. The compiler-backed DDSIM QDMI provider accepts OpenQASM through QC/QCO and QIR. Terminal sampling simulates once and draws every shot from the resulting state; statevector extraction supports programs with only terminal measurements or no measurements. Expected compiler and simulation failures become failed jobs without exception-driven control flow.

When MLIR is disabled, MQT Core does not build the DDSIM device because no execution frontend remains. CoreDD, the QDMI driver, the superconducting device, and their applicable tests remain available.

This PR is the second and final layer of #2079#2288. The stack keeps the small math execution extensions and intentionally does not include density simulation. Symbolic Python execution can follow in a later release.

The local C++ lint wrapper now prints Clang diagnostics as file annotations instead of reporting only their count.

This implementation and PR description were produced with GPT-5.6 via Codex under explicit maintainer authorization. Maintainer review remains required.

Validation

  • uvx nox -s lint
  • uvx nox -s cpp-lint -- 5ebdb6da5da533b40ccdf19a5ab6af4e0a294d49 (Clang 22; zero findings)
  • uvx nox -s tests-3.13 (745 passed, one Python 3.14-only test skipped)
  • cmake --build --preset debug -j2
  • ctest --preset debug --output-on-failure -j2 (3,755 passed)
  • cmake --build --preset debug-no-mlir -j2
  • ctest --preset debug-no-mlir --output-on-failure -j2 (511 passed, one intentional device-specification skip)
  • The no-MLIR Ninja target graph contains no DDSIM device target.
  • git diff --check

Fixes #2097
Fixes #2103

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.

@simon1hofmann
simon1hofmann marked this pull request as draft August 31, 2026 15:14
@mergify mergify Bot added the conflict label Aug 31, 2026
@simon1hofmann
simon1hofmann force-pushed the codex/remove-legacy-circuit-v4 branch from 4d1ce9d to e4c9047 Compare August 31, 2026 18:48
@simon1hofmann
simon1hofmann changed the base branch from main to codex/qco-dd-density-matrix August 31, 2026 18:52
@mergify mergify Bot removed the conflict label Aug 31, 2026
@simon1hofmann simon1hofmann self-assigned this Sep 1, 2026
@simon1hofmann simon1hofmann added refactor Anything related to code refactoring major Major version update Core Anything related to the Core library and IR c++ Anything related to C++ code labels Sep 1, 2026
@simon1hofmann simon1hofmann linked an issue Sep 1, 2026 that may be closed by this pull request
@simon1hofmann
simon1hofmann force-pushed the codex/remove-legacy-circuit-v4 branch from e4c9047 to 4285c37 Compare September 1, 2026 12:07
@simon1hofmann
simon1hofmann changed the base branch from codex/qco-dd-density-matrix to codex/qco-dd-construction-deallocation September 1, 2026 12:08
@mergify mergify Bot added the conflict label Sep 1, 2026
@burgholzer
burgholzer force-pushed the codex/remove-legacy-circuit-v4 branch from 52c9671 to 1d16092 Compare September 1, 2026 18:41
@burgholzer burgholzer self-assigned this Sep 1, 2026
@burgholzer burgholzer added DD Anything related to the DD package MLIR Anything related to MLIR OpenQASM Anything related to OpenQASM python Anything related to Python code QDMI Anything related to QDMI QIR Anything related to QIR tooling Any issue or PR related to project tooling labels Sep 1, 2026
Base automatically changed from codex/qco-dd-construction-deallocation to main September 2, 2026 10:05
Remove CoreIR, CoreQASM, classic bindings, converters, and circuit DD adapters. Keep CoreDD primitives independent and execute DDSIM through QC/QCO and QIR when MLIR is enabled.

Skip the DDSIM target entirely in no-MLIR builds. Provide no compatibility or density layer. Print local C++ lint diagnostics so failures remain actionable.

Assisted-by: GPT-5.6 via Codex
@simon1hofmann
simon1hofmann force-pushed the codex/remove-legacy-circuit-v4 branch from 42937ab to ee49849 Compare September 2, 2026 10:16
@mergify mergify Bot removed the conflict label Sep 2, 2026
Internalize QCO sampling resources behind a shots-and-seed API, update callers and coverage, and remove redundant surface checks. Clarify the migration notes, references, wheel smoke test, and README execution example.

Assisted-by: GPT-5.6 via Codex
@coderabbitai

coderabbitai Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Important

Approval pending

CodeRabbit has no unresolved comments, but it has not reviewed the latest commit.

Use the checkbox below to review the latest commit. CodeRabbit will approve the changes if it finds no blocking issues.

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@burgholzer burgholzer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this now to get it in once CI is green! 🚀
Issues for all kinds of follow-ups have been created.
So let's ship this :shipit:

@simon1hofmann

Copy link
Copy Markdown
Contributor Author

Seems like the maximum diff for linting is 20000 lines 🤔

@burgholzer

Copy link
Copy Markdown
Member

Seems like the maximum diff for linting is 20000 lines 🤔

Yeah. We can simply ignore the failing check here and simply merge if everything else is green.

GitHub omits patch data for the large deleted file when the pull request diff exceeds its 20,000-line limit. Exclude only that removed path so cpp-linter retains changed-file-only coverage for every surviving source file.

Assisted-by: GPT-5.6 via Codex
Restore the standard changed-file lint scope. The known large-PR cpp-linter API failure is acceptable for this pull request.

Assisted-by: GPT-5.6 via Codex
@simon1hofmann

Copy link
Copy Markdown
Contributor Author

Seems like the maximum diff for linting is 20000 lines 🤔

Yeah. We can simply ignore the failing check here and simply merge if everything else is green.

Would be ready to merge now.

@burgholzer

Copy link
Copy Markdown
Member

Let's go 🚀

@burgholzer
burgholzer merged commit ef3239b into main Sep 2, 2026
25 of 27 checks passed
@burgholzer
burgholzer deleted the codex/remove-legacy-circuit-v4 branch September 2, 2026 17:32
@denialhaag denialhaag mentioned this pull request Sep 4, 2026
12 tasks
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 Core Anything related to the Core library and IR DD Anything related to the DD package major Major version update MLIR Anything related to MLIR OpenQASM Anything related to OpenQASM python Anything related to Python code QDMI Anything related to QDMI QIR Anything related to QIR refactor Anything related to code refactoring tooling Any issue or PR related to project tooling

Projects

None yet

2 participants