github
Fix basis_count checking in ConsolidateBlocks (#13463) The ConsolidateBlocks pass was ported to rust in #13368 and as part of that implementation a small behavior difference between the rust and python interfaces was causing the pass to not work correctly with non-CX gates. The internal 2q decomposer interface stores a sentinel string for the kak gate which is used to tell the python space constructor use the python defined gate object. However in the pass code we weren't factoring this difference in, and for non-CX gates we were evaluating the basis count as the number of gates with that sentinel value name (which is almost always zero) and this was preventing the pass from consolidating many blocks that should have been. This commit fixes this issue by taking the name from python space and passing it through to the rust portion of the code and using that for the comparison. Fixes #13459 (cherry picked from commit c7924262f)
2 of 2 new or added lines in 1 file covered. (100.0%)
8 existing lines in 2 files now uncovered.58168 of 65806 relevant lines covered (88.39%)
482697.81 hits per line