Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't substitute ideal gates in target with Optimize1qGatesDecomposit…
…ion (#11351) (#11359) * Don't substitute ideal gates in target with Optimize1qGatesDecomposition This commit fixes an issue in Optimize1qGatesDecomposition where the pass would defer to synthesized gates if the output from synthesis was ideal even if the input gate was also ideal. This typically comes up in simulators where there are no error rates for any gates and everything is listed as ideal. This would cause the transpiler to translate gates unnecessarily which was unexpected. This commit fixes this by adding an additional check to the subsitution condition to ensure we're only substituting a gate if it's not in the target (when they're all ideal). Fixes #10568 * Update releasenotes/notes/fix-optimize-1q-sim-407b88e45e6062b6.yaml Co-authored-by: Jake Lishman <jake@binhbar.com> * Update qiskit/transpiler/passes/optimization/optimize_1q_decomposition.py * Fix formatting --------- Co-authored-by: Jake Lishman <jake@binhbar.com> (cherry picked from commit f12db3b) Co-authored-by: Matthew Treinish <mtreinish@kortar.org>
- Loading branch information