Skip to content

💥 Expose concrete DD operations across compilers - #2718

Merged
burgholzer merged 5 commits into
mainfrom
codex/dd-concrete-operations
Oct 9, 2026
Merged

burgholzer merged 5 commits into
mainfrom
codex/dd-concrete-operations

Conversation

@burgholzer

@burgholzer burgholzer commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

🤖 AI text below 🤖

Description

Replace node-constrained DD member functions with concrete vector and matrix overloads. GCC and Clang disagree on the mangling of constrained members, and GCC LTO drops the compatibility aliases used by older compilers. Concrete operations give the shared library one callable interface across these compilers.

The edge layouts, numerical algorithms, and Python methods stay the same. Private recursive traversal helpers are file-local. All C++ callers and examples use the concrete functions; obsolete CachedEdge class instantiations are removed.

C++ migration examples: edge.getVector() becomes dd::getVector(edge), edge.getMatrix(n) becomes dd::getMatrix(edge, n), and edge.isIdentity() becomes dd::isIdentity(edge). Normalize, indexing, sparse extraction, printing, accumulation, and matrix traversal follow the same pattern. This is a breaking C++ API change for Core v4.

Stacked on #2717. The release-build PR #2715 will qualify the installed libraries with LTO and remove its DD exclusion.

Validation: 3,950 native tests passed with one expected capability skip; all 1,920 Python tests passed. Stub regeneration produced no API diff. Repository lint, whole-file C++ lint, Doxygen, and local GCC 13/Clang 23 consumer probes passed. Independent specialist review checked numerical behavior, callback copies, array ownership, and callers.

AI assistance: Codex implemented, tested, and independently reviewed the change.

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.
  • 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.

Keep cache launchers and project defaults in the source build rather
than applying them during find_package. Load install directories only
when an explicit device helper needs them, and retain the exported
helpers and their targets.

Check consumer settings and a device-helper build against the installed
package.

Assisted-by: GPT-6 via Codex
Replace node-constrained edge members with concrete vector and matrix
function overloads so supported compilers agree on the exported symbols.
Keep edge layouts, numerical behavior, and Python methods unchanged.

Move traversal recursion into the implementation and migrate all C++
callers, including bindings, shared MLIR test helpers, and documentation.

Assisted-by: GPT-6 via Codex
Document the new edge parameters required by Doxygen and record the
completed DD API migration with its validation and remaining scope.

Assisted-by: GPT-6 via Codex
@burgholzer burgholzer added refactor Anything related to code refactoring major Major version update DD Anything related to the DD package c++ Anything related to C++ code labels Oct 8, 2026
@burgholzer burgholzer self-assigned this Oct 8, 2026
@codecov

codecov Bot commented Oct 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.98658% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
include/mqt-core/dd/CachedEdge.hpp 83.3% 1 Missing ⚠️
src/dd/CachedEdge.cpp 94.1% 1 Missing ⚠️
src/dd/Edge.cpp 99.0% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

The DD bindings use complex numbers but no declarations from cmath.
Remove the two includes flagged by hosted clang-tidy 23.1.3.

Assisted-by: GPT-6 via Codex
Base automatically changed from codex/package-policy-isolation to main October 9, 2026 06:28
@burgholzer burgholzer added this to the v4.1.0 - QDMI 1.4 / MQSF milestone Oct 9, 2026
@burgholzer burgholzer removed the major Major version update label Oct 9, 2026
@burgholzer
burgholzer enabled auto-merge (squash) October 9, 2026 06:34
@burgholzer
burgholzer merged commit 6014439 into main Oct 9, 2026
27 checks passed
@burgholzer
burgholzer deleted the codex/dd-concrete-operations branch October 9, 2026 06:51
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 DD Anything related to the DD package refactor Anything related to code refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant