Repository navigation
🐛 Preserve Clifford+T basis after synthesis - #1093
Merged
Merged
Conversation
simon1hofmann
added a commit
that referenced
this pull request
Oct 21, 2026
Assisted-by: GPT-5 via Codex
12 tasks done
Collaborator
Author
|
@burgholzer I tried different fixed to this problem but I'm still not really happy with it. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Assisted-by: GPT-5 via Codex
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
force-pushed
the
codex/clifford-t-post-synthesis
branch
from
October 22, 2026 10:17
97f2304 to
e0ab894
Compare
Assisted-by: GPT-6 via Codex
burgholzer
approved these changes
Oct 22, 2026
burgholzer
left a comment
Member
There was a problem hiding this comment.
Alright. Played around with this a little. I think the solution now is pretty much fine and relatively clean 😌
simon1hofmann
enabled auto-merge (squash)
October 22, 2026 10:56
simon1hofmann
added a commit
that referenced
this pull request
Oct 22, 2026
simon1hofmann
added a commit
that referenced
this pull request
Oct 22, 2026
simon1hofmann
added a commit
that referenced
this pull request
Oct 22, 2026
simon1hofmann
added a commit
that referenced
this pull request
Oct 23, 2026
* Use version-aware Clifford+T synthesis * Use packaging for Qiskit version comparison * Remove prerelease-specific Clifford+T test * Retain Clifford+T optimization after synthesis * 🐛 Preserve Clifford+T basis after synthesis Assisted-by: GPT-5 via Codex * 📝 Link Clifford+T fix to #1093 Assisted-by: GPT-5 via Codex * 🐛 Preserve Clifford+T basis after synthesis Assisted-by: GPT-5 via Codex * 📝 Link Clifford+T fix to #1093 Assisted-by: GPT-5 via Codex * 🐛 Lower inverse Clifford gates in mirrors 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 * ♻️ Simplify Clifford+T compilation orchestration 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 * 📝 Place #1081 changelog entry below #1087 --------- Signed-off-by: simon1hofmann <119581649+simon1hofmann@users.noreply.github.com> Co-authored-by: Lukas Burgholzer <burgholzer@me.com>
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 AI text below 🤖
Description
Compiling
RZZ(0.3)to Clifford+T at optimization levels 2 or 3 can fail because general optimization reintroduces arbitrary gates after synthesis. Run continuous optimization, Solovay–Kitaev synthesis, and discrete cleanup in one staged Qiskit pass manager. Keep Solovay–Kitaev and the Qiskit 2.2.3 minimum unchanged; version-dependent synthesis remains in #1081.Disable permutation elision for native Clifford+T compilation so wire permutations remain in the circuit and survive QASM export without manual layout repair. After synthesis, apply
OptimizeCliffordTrecursively for nonzero optimization levels and translate to the target basis. Preserve native target normalization, structured loops, loop jumps, and classical measurement destinations.Mirrors reuse only the exact cleanup pipeline before terminal measurements. High-level synthesis receives the target and equivalence library to lower inverse gates such as
iswap_dganddcx_dg, without repeating approximate synthesis.Validation after updating to
main: 656 tests passed with four existing expected failures on Qiskit 2.6.0; 103 focused Clifford+T, mirror, and loop tests passed on Qiskit 2.2.3. All lint hooks passed, using Python 3.14 for type checking. Hosted CI is running on the updated branch.Codex assisted with implementation, Ponytail review, regression tests, validation, and this description.
Checklist
If PR contains AI-assisted content: