Repo Added
|
Files
868
|
Badge
README BADGES
|
github
Fix ConsolidateBlocks pass for collecting non-CX KAK gate (#14417) 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 4e9231df9)
4 of 5 new or added lines in 1 file covered. (80.0%)
4 existing lines in 2 files now uncovered.72935 of 82761 relevant lines covered (88.13%)
356370.51 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
---|