Skip to content

⚡️ Use version-aware Clifford+T synthesis - #1081

Merged
simon1hofmann merged 18 commits into
mainfrom
codex/version-aware-clifford-t
Oct 23, 2026
Merged

simon1hofmann merged 18 commits into
mainfrom
codex/version-aware-clifford-t

Conversation

@simon1hofmann

@simon1hofmann simon1hofmann commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

🤖 AI text below 🤖

Description

Use Qiskit's SynthesizeRZRotations (gridsynth) for native Clifford+T compilation on Qiskit 2.4.2 and newer. Keep Solovay–Kitaev on older supported releases, including Qiskit 2.2.3. Select the synthesis pass with packaging.version.Version, lower RX/RY to RZ, and synthesize rotations inside control-flow blocks.

Build on the basis-preserving pipeline merged in #1093. This PR targets main and changes only synthesis selection, its dependency, and release notes. It remains a prerequisite for #930's encoding integration.

Validation

Clifford+T, mirror, and loop tests pass on Qiskit 2.6.0 and 2.2.3 (103 on each). All lint hooks pass, with type checking on Python 3.14.

Codex assisted with implementation, updates, and checks.

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 force-pushed the codex/version-aware-clifford-t branch from 78c27d4 to b496e38 Compare October 21, 2026 11:38
@simon1hofmann simon1hofmann self-assigned this Oct 21, 2026
@simon1hofmann simon1hofmann added the enhancement New feature or request label Oct 21, 2026
@simon1hofmann
simon1hofmann marked this pull request as ready for review October 21, 2026 11:42
@codecov

codecov Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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

Nice! Just one little detail that can be improved. Feel free to get this in afterwards!

Comment thread src/mqt/bench/benchmark_generation.py Outdated

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

One thing feels a bit weird here.

Comment thread src/mqt/bench/benchmark_generation.py Outdated
🤖 *AI text below* 🤖

Reuse native-target preparation and mirror compilation after merging the new target lowering. Cover disconnected native targets and mirrors without measurement capabilities on both synthesis backends.

Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
Assisted-by: GPT-5 via Codex
@simon1hofmann
simon1hofmann changed the base branch from main to codex/clifford-t-post-synthesis October 21, 2026 19:28
simon1hofmann and others added 4 commits October 22, 2026 10:16
Assisted-by: GPT-5 via Codex
Pass the target and equivalence library to high-level synthesis so inverse ISWAP and DCX definitions are lowered before basis translation. Cover both gates at every optimization level and sort the changelog reference.

Assisted-by: GPT-6 via Codex
Run continuous optimization, Solovay-Kitaev synthesis, and discrete cleanup
in one staged pass manager. Disable permutation elision for native circuits
so QASM exports preserve wire ordering without manual permutation repair.
Reuse only discrete cleanup for exact mirrors and share the final run path.

Cover all optimization levels and mirror variants with QASM2/QASM3
permutation round trips. Keep Qiskit 2.2.3 and the synthesis algorithm.

Assisted-by: GPT-6 via Codex
@burgholzer
burgholzer force-pushed the codex/clifford-t-post-synthesis branch from 97f2304 to e0ab894 Compare October 22, 2026 10:17
Assisted-by: GPT-6 via Codex
Keep synthesis selection in the staged pipeline and reuse exact cleanup for mirrors. Preserve the inverse-gate and QASM permutation regressions from the prerequisite branch.

Assisted-by: GPT-6 via Codex
Base automatically changed from codex/clifford-t-post-synthesis to main October 22, 2026 11:49
@simon1hofmann simon1hofmann added mqt.bench Issues that affect mqt.bench python Pull requests that update Python code labels Oct 22, 2026
Signed-off-by: simon1hofmann <119581649+simon1hofmann@users.noreply.github.com>

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

Nice 👍🏼

@simon1hofmann
simon1hofmann merged commit 95df573 into main Oct 23, 2026
15 checks passed
@simon1hofmann
simon1hofmann deleted the codex/version-aware-clifford-t branch October 23, 2026 20:35
@github-project-automation github-project-automation Bot moved this from In Progress to Done in MQT Applications Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request mqt.bench Issues that affect mqt.bench python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants