#16974 fix TwoQubitBasisDecomposer with approximation_degree=1.0 - #16975
#16974 fix TwoQubitBasisDecomposer with approximation_degree=1.0#16975Gavin King (gavinking) wants to merge 1 commit into
Conversation
TwoQubitBasisDecomposer was silently approximating small controlled rotations at optimization levels 2 and 3 with a hardcoded fidelity threshold of 1 - 1e-9, despite approximation_degree=1.0. The fix disables approximate Weyl specialization of the target when `TwoQubitBasisDecomposer` is called with `approximate=False`. Approximate mode retains its previous behavior.
|
Thank you for opening a new pull request. Before your PR can be merged it will first need to pass continuous integration tests and be reviewed. Sometimes the review process can be slow, so please be patient. While you're waiting, please feel free to review other open PRs. While only a subset of people are authorized to approve pull requests for merging, everyone is encouraged to review open pull requests. Doing reviews helps reduce the burden on the core team and helps make the project's code better for everyone. One or more of the following people are relevant to this code:
|
Jake Lishman (jakelishman)
left a comment
There was a problem hiding this comment.
This is proposing to change the default behaviour of one of the most central passes of Qiskit synthesis - it may have potentially significant knock-on effects on how the complete compiler pipeline works. The approximation_degree docs here do say "no approximation", but similar documentation elsewhere says "up to numerical precision" (which is ambiguous - decompositions are complex and the absolute precision we can guarantee isn't reliable), and this default fidelity has been set like this for a long time.
We need to discuss whether the fault is in documentation, expectations, and whether this requires knock-on changes to other parts of the stack. Let me remand that to the ongoing discussion in #16864.
TwoQubitBasisDecomposerwas silently approximating small controlled rotations at optimization levels 2 and 3 with a hardcoded fidelity threshold of 1 - 1e-9, despiteapproximation_degree=1.0.The fix disables approximate Weyl specialization of the target when
TwoQubitBasisDecomposeris called withapproximate=False. Approximate mode retains its previous behavior.Fixes #16974.
AI/LLM disclosure