Skip to content

✨ Add more inspection methods to QCProgram - #2260

Draft
denialhaag wants to merge 4 commits into
mainfrom
extend-inspection-methods
Draft

✨ Add more inspection methods to QCProgram#2260
denialhaag wants to merge 4 commits into
mainfrom
extend-inspection-methods

Conversation

@denialhaag

@denialhaag denialhaag commented Aug 26, 2026

Copy link
Copy Markdown
Member

Description

🤖 AI text below 🤖

Add gate_counts and static_depth inspection methods to QCProgram in C++ and Python. Gate counts group the existing static-IR gate metric by operation mnemonic.

Static depth follows qubit dependencies, takes the maximum across mutually exclusive SCF branches, visits each loop body once, and conservatively handles dynamic register indices. The methods share the existing modifier and barrier semantics and include C++ tests and Python documentation.

AI notice

This PR and its contents were created with the assistance of GPT-5.6 Sol via Codex.

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.

@denialhaag denialhaag self-assigned this Aug 26, 2026
@denialhaag denialhaag added feature New feature or request MLIR Anything related to MLIR labels Aug 26, 2026
@mergify mergify Bot added the conflict label Aug 26, 2026
Base automatically changed from mlir-count-two-qubit-gates to main August 26, 2026 22:12
Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
Assisted-by: GPT-5.6 Sol via Codex
@denialhaag
denialhaag force-pushed the extend-inspection-methods branch from 4ffb3e3 to 4efc9f4 Compare August 26, 2026 22:20
@mergify mergify Bot removed the conflict label Aug 26, 2026
@codecov

codecov Bot commented Aug 26, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.23301% with 8 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
mlir/lib/Compiler/Programs.cpp 92.2% 8 Missing ⚠️

📢 Thoughts on this report? Let us know!

Assisted-by: GPT-5.6 Sol via Codex
@mergify mergify Bot added the conflict label Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflict feature New feature or request MLIR Anything related to MLIR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant