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

♻️ Split the MQT dialect implementation

Open
#2,445 0 comments 0 reactions 1 assignee View on GitHub

@denialhaag is already working on this.

Since Sep 15, 2026.

c++ code quality MLIR refactor
Dominant language
C++
Stars
133
Forks
73
Avg merge
17h 34m
Merged PRs (30d)
261

Description

🤖 AI text below 🤖

Problem Statement

mlir/lib/Dialect/MQT/IR/MQTDialect.cpp combines dialect registration, typed attribute implementations, and attached-metadata verification. Separate these responsibilities using the existing QC/QCO source organization as a guide.

This is a follow-up to the review comment in #2219, not a prerequisite for that PR.

Proposed Solution

Start with two files:

  • Keep dialect registration, operation/region attribute hooks, and their metadata helpers in MQTDialect.cpp.
  • Move typed attribute definitions, verifiers, and TargetEnvAttr::query into MQTAttributes.cpp, keeping their private helpers together.

Update the existing MLIRMQTDialect CMake target. Preserve public APIs, attribute assembly, verification behavior, and diagnostics; no new abstraction or public helper API is needed. Keep naming and payload-version policy changes out of scope.

Acceptance: existing MQT IR and compiler tests pass, including attribute round trips and invalid-input cases; repository lint and C++ lint pass.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.