You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix ConsolidateBlocks pass for collecting non-CX KAK gate (#14417) (#14424)
A bug was introduced into the ConsolidateBlocks pass in #13884 around
how the KAK gate name was passed to rust from the Python pass. The
consolidate blocks internal logic around whether to consolidate a pass
or not is based on the estimate from the selected decomposer of whether
the estimated number of gates used to synthesis the unitary would exceed
the number of basis gates in the block. To do this the pass counts the
gate with the synthesis target name in the block. However, in the case
of the decomposer being the TwoQubitBasisDecomposer the name being
used for this look wasn't the name of the gate, but instead was an
internal sentinel value string "USER_GATE" which is used to handle
arbitrary user gate definitions in the decomposer. This led to the
consolidate blocks pass missing opportunities for consolidation. This
commit fixes the oversight so that the name we use for making this
determination is the actual basis gate name and the pass functions
correctly.
Fixes#14413
(cherry picked from commit 4e9231d)
Co-authored-by: Matthew Treinish <[email protected]>
0 commit comments