🐛 Preserve symbolic Euler chains in target synthesis - #2559
Open
simon1hofmann wants to merge 4 commits into
Open
simon1hofmann wants to merge 4 commits into
simon1hofmann wants to merge 4 commits into
Conversation
🤖 *AI text below* 🤖 Reuse direct Euler angles and synthesize into the target basis after placement. This avoids inverse trigonometry and cancelling U phase corrections for symbolic circSU2 circuits while retaining classical read sharing and the existing U-target optimizer. Assisted-by: GPT-5 via Codex
🤖 *AI text below* 🤖 Reuse the existing Euler emitters for symbolic XZX and XYX chains in compatible XZX, XYX, and R bases, including shortened chains. Preserve phase and gate-count bounds without inverse trigonometry. Cover controlled matrix equality and late-bound Qiskit export through both target pipelines. Initialize the test fixture in its constructor. Assisted-by: GPT-5 via Codex
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
🤖 *AI text below* 🤖 Use designated fields for the symbolic angle initializer. Exercise the compiler-target basis overload in the existing seven-basis regression, covering the previously missed U and ZXZ switch cases. Assisted-by: GPT-5 via Codex
🤖 *AI text below* 🤖 Add the trailing commas required by clang-tidy. Extend the existing symbolic Euler regression with isolated rotations to exercise the RX-to-R conversion. Assisted-by: GPT-5 via Codex
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
Allow symbolic circSU2 circuits to compile for an SX/X/RZ/CZ target and export
to Qiskit with their original parameters still bindable. Extend direct symbolic
synthesis to compatible X-outer Euler chains as well.
u,zyz,zxz, andzsxxbases, and XZX/XYX chain angles in
xzx,xyx, andr. Either outerrotation may be absent. Reuse the existing emitters without inverse
trigonometry or conditional expressions, preserving global phase and the
existing synthesis gate-count bounds.
classical-read cleanup. This avoids the intermediate U phase corrections.
symbolic chain shapes keep their existing synthesis path; this is not a
general symbolic
atan2export fix.compatible chain/basis combinations, and symbolic compile–export–bind cases.
Check X-outer chains through both target compilation and synthesis-only APIs.
No new dependencies or Python API changes are required.
Results
The two skipped Benchpress Summit circSU2 workloads pass through the MQT
adapter on
fake_torino: circular EfficientSU2, three repetitions, defaultcompilation options. Both runs preserve the input and parameter identities,
export successfully, bind zero/mixed values after export, and pass target
validation.
These measurements were recorded before the XZX/XYX extension:
These are local diagnostic timings, not a cross-tool performance comparison.
The Benchpress skip markers are unchanged pending integration of this fix.
Validation
Based on main
dc78630f9; Release build on macOS ARM64 with LLVM/MLIR 23.1.0,Python 3.14.3 and Qiskit 2.5.2.
Latest validation for
1a9a1da5d, including the XZX/XYX extension:test/python/test_mlir.py: 98 passed, includingthe original small/full-size circSU2 regressions and six new X-outer-chain
compile/synthesize–export–bind cases.
angles, together with basis membership and synthesis gate-count bounds.
git diff --check: passed.Earlier validation, before the XZX/XYX extension:
functional cases). Timing disabled; excludes large circuits and the eight
bwt_n21/factor247_n15topology cases.ConvertsUnknownDeviceFailureToErrorfailsbecause the local QDMI error lacks the expected diagnostic text. This was
also observed before the fix; a separate native main build was not used to
establish baseline status.
Native tests ran directly with local shared-library paths. The latest local
build uses deferred GoogleTest discovery to avoid the post-link discovery
failure; no repository build policy was changed.
OpenAI Codex assisted with implementation, tests, review and this description.
Checklist
If PR contains AI-assisted content:
🤖 *AI text below* 🤖(titles are exempt).