Skip to content

Commit

Permalink
fix pass_manager function
Browse files Browse the repository at this point in the history
  • Loading branch information
doichanj committed Nov 16, 2023
1 parent 8d14345 commit a463e1d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion qiskit_aer/backends/plugin/aer_backend_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def run(self, dag):
class AerBackendPlugin(PassManagerStagePlugin):
"""custom passmanager to avoid unnecessary gate changes"""

def pass_manager(self, pass_manager_config, optimization_level):
def pass_manager(self, pass_manager_config, optimization_level=None) -> PassManager:
return PassManager(
[
UnitarySynthesis(
Expand Down
1 change: 1 addition & 0 deletions qiskit_aer/backends/statevector_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ class StatevectorSimulator(AerBackend):
"save_state",
"set_statevector",
"reset",
"barrier",
]
),
"gates": [],
Expand Down
4 changes: 3 additions & 1 deletion qiskit_aer/backends/unitary_simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ class UnitarySimulator(AerBackend):
"pauli",
]
),
"custom_instructions": sorted(["save_unitary", "save_state", "set_unitary", "reset"]),
"custom_instructions": sorted(
["save_unitary", "save_state", "set_unitary", "reset", "barrier"]
),
"gates": [],
}

Expand Down

0 comments on commit a463e1d

Please sign in to comment.