✨ Support directional compiler-target operation availability - #2285
Conversation
|
@MatthiasReumann Would you mind taking at first look here to see if this goes in the right direction? |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
91f69af to
ddc67f1
Compare
ddc67f1 to
dcddb01
Compare
893d01a to
77eb715
Compare
77eb715 to
a2f71f1
Compare
Replace the intermediate target-cost helper with a focused mapping wrapper, keep target applicability exact, and make native synthesis direction-aware without partial rewrites. Add focused C++, Python, QDMI, and documentation coverage. Assisted-by: OpenAI Codex
a2f71f1 to
33710b4
Compare
|
I started an iteration on this already now. Will look at it in more detail tomorrow. |
Route by adjacency and repair operand direction during native synthesis. Use one checked staged walk for exact static sites, with branch agreement and site-preserving loop backedges. Remove the module clone and duplicate synthesis planning. Validation: 303 focused tests, strict documentation, and repository lint pass. Direct whole-file clang-tidy finds no diagnostics in changed source files. Full C++ lint is blocked by unrelated QIR/QTensor linking; a locationless binding macro warning remains. Assisted-by: OpenAI Codex
|
Still working through this one. Feels too large still, even after the simplifications. |
Use one list of supported ordered placements with optional calibration. Empty site tuples mean general applicability; omit unavailable QDMI operations. Remove duplicate applicability metadata from C++, MLIR, and Python. Rewrite gates in reverse order to retain collected site facts without an action plan or repeated matrix extraction. Keep the shared guard for unsupported controlled-gate matrix shapes. Validation: 305 C++ tests, 49 Python tests, regenerated stubs, strict docs, and repository lint pass. Whole-file C++ lint reports zero findings in all ten changed sources; its full build remains blocked by unrelated QIR/QTensor linking. Assisted-by: OpenAI Codex
Accept plain Python tuples and lists for uncalibrated placements, and print positional sites in MLIR. Keep explicit SiteTuple values for calibration. Use LLVM 23 dense containers and one immutable tuple cache for every arity. Remove redundant factories and lookup helpers. Fuse runs during reverse traversal to avoid snapshots and repeated matrix extraction. Validation: 307 focused C++ tests, 51 Python tests, regenerated stubs, strict docs, and repository lint pass. Whole-file C++ analysis reports zero findings across ten changed sources. The full lint build remains blocked by unrelated QIR/QTensor linking. Assisted-by: OpenAI Codex
|
@simon1hofmann Alright. I think I simplified this as far as I could. Would you mind checking the current implementation and whether it fulfills all goals you had in mind? |
Assisted-by: OpenAI Codex
Thanks a lot for the changes, the skipped benchpress test were successful based on this PR 🚀 |
|
Important Approval pendingCodeRabbit has no unresolved comments, but it has not reviewed the latest commit. Use the checkbox below to review the latest commit. CodeRabbit will approve the changes if it finds no blocking issues.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
I'll merge this now, given how it seems to resolve the underlying issues 🙌🏼 |
🤖 AI text below 🤖
Description
Adds exact ordered operation applicability to
CompilerTargetand uses it to support targets with one-way CX, ECR, and RZX gates.MappingTarget: topology traversal stays bidirectional, while mapping assigns the lower cost to the physical direction supported by the selected entangler.Fixes #2132
Verification
git diff --checkpassed.AI assistance
Codex implemented, reviewed, and tested the change under explicit user authorization. Human review and acceptance remain required before merge.
Checklist
If PR contains AI-assisted content:
🤖 *AI text below* 🤖(titles are exempt).