Skip to main contentIBM Quantum Documentation
Qiskit Transpiler Service is experimental and only available for IBM Quantum Premium Plan members.


class qiskit_transpiler_service.transpiler_service.TranspilerService(optimization_level, ai=True, coupling_map=None, backend_name=None, qiskit_transpile_options=None, ai_layout_mode=None)

Bases: object(opens in a new tab)

Class for using the transpiler service.


  • optimization_level (int(opens in a new tab)) – The optimization level to use during the transpilation. There are 4 optimization levels ranging from 0 to 3, where 0 is intended for not performing any optimizations and 3 spends the most effort to optimize the circuit.
  • ai (bool(opens in a new tab), optional) – Specifyies if the transpilation should use AI or not, defaults to True.
  • coupling_map (list(opens in a new tab)[list(opens in a new tab)[int(opens in a new tab)]], optional) – A list of pairs that represents physical links between qubits.
  • backend_name (str(opens in a new tab), optional) – Name of the backend used for doing the transpilation.
  • qiskit_transpile_options (dict(opens in a new tab), optional) – Other options to transpile with qiskit.
  • ai_layout_mode (str(opens in a new tab), optional) – Specifies how to handle the layout selection. There are 3 layout modes: keep (respects the layout set by the previous transpiler passes), improve (uses the layout set by the previous transpiler passes as a starting point) and optimize (ignores previous layout selections).




Transpile the circuit(s) by calling the service /transpile endpoint.


circuits (List(opens in a new tab)[str(opens in a new tab) |QuantumCircuit] | str(opens in a new tab) |QuantumCircuit) – circuit(s) to transpile.


The transpiled circuit(s)

Was this page helpful?
Report a bug or request content on GitHub.