From 0f3ec8af67d031c3e7722b684bd9694bb4c40657 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Fri, 1 Dec 2023 07:26:46 -0500 Subject: [PATCH] Remove Optimize1qGatesDecomposition from init stage In #11354 we added more logical optimization passes to the preset pass managers for level 1, 2, and 3 which included the Optimize1qGatesDecomposition pass. However, this had the the unintended side effect of tending to normalize circuits to use parameterized gates. This becomes an issue for discrete basis targets as the basis translator doesn't always know how to work with those. To avoid issues this commit removes the pass from the init stage and just saves it for the optimization loop. If we want to do 1q gate simplification during init in the future we can develop a different pass that does it in a manner that wouldn't interfere with discrete basis targets like Optimize1qGatesDecomposition. --- qiskit/transpiler/preset_passmanagers/builtin_plugins.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/qiskit/transpiler/preset_passmanagers/builtin_plugins.py b/qiskit/transpiler/preset_passmanagers/builtin_plugins.py index f03dd7880269..9bdcab38a043 100644 --- a/qiskit/transpiler/preset_passmanagers/builtin_plugins.py +++ b/qiskit/transpiler/preset_passmanagers/builtin_plugins.py @@ -106,7 +106,6 @@ def pass_manager(self, pass_manager_config, optimization_level=None) -> PassMana pass_manager_config.unitary_synthesis_plugin_config, pass_manager_config.hls_config, ) - init.append(Optimize1qGatesDecomposition()) init.append( InverseCancellation( [ @@ -137,7 +136,6 @@ def pass_manager(self, pass_manager_config, optimization_level=None) -> PassMana ) init.append(OptimizeSwapBeforeMeasure()) init.append(RemoveDiagonalGatesBeforeMeasure()) - init.append(Optimize1qGatesDecomposition()) init.append( InverseCancellation( [