Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make heuristic score sorting robust in 1q optimization pass
In Qiskit#8197 the Optimize1qGatesDecomposition was updated to be target aware and as part of that a new heuristic scoring was added to determine which decomposition was the best performing and should be used. However, in the case of an error rate of 0.0 the desired behavior was to pick the decomposition which was shortest. In Qiskit#8197 this was accomplished by just doing `-100 + len(decomposition)` which worked in the general case as long as the gate counts are < 100 (which in practice will always be the case). For robustness this changes the return for the scoring function to be `(error_rate, sequence_length)` to give us the sorting without changing the measured error rate.
- Loading branch information