Skip to content

Commit

Permalink
Remove Optimize1qGatesDecomposition from init stage (#11360)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mtreinish authored Dec 1, 2023
1 parent c060638 commit b861e4b
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions qiskit/transpiler/preset_passmanagers/builtin_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
[
Expand Down Expand Up @@ -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(
[
Expand Down

0 comments on commit b861e4b

Please sign in to comment.