Skip to content

Commit caa5eff

Browse files
author
Luciano Bello
committed
we already have this problem solved in the passmanager
1 parent b11d943 commit caa5eff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

qiskit/compiler/transpile.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ def callback_func(**kwargs):
159159
(isinstance(circuits, list) and all(isinstance(c, Schedule) for c in circuits)):
160160
return circuits
161161

162+
if pass_manager:
163+
return pass_manager.run(circuits, output_name=output_name, callback=callback)
164+
162165
if optimization_level is None:
163166
config = user_config.get_config()
164167
optimization_level = config.get('transpile_optimization_level', None)
@@ -188,7 +191,7 @@ def callback_func(**kwargs):
188191
'in {} '.format(circuit.name) +
189192
'is greater than maximum ({}) '.format(max_qubits) +
190193
'in the coupling_map')
191-
# Transpile circuits in parallel
194+
192195
circuits = parallel_map(_transpile_circuit, list(zip(circuits, transpile_args)))
193196

194197
if len(circuits) == 1:

0 commit comments

Comments
 (0)