iqm.qiskit_iqm.pulse_level_utils.parallelize_and_transpile

iqm.qiskit_iqm.pulse_level_utils.parallelize_and_transpile#

iqm.qiskit_iqm.pulse_level_utils.parallelize_and_transpile(circuits: list[QuantumCircuit], components: ComponentGrouping | None, context: dict[str, Any], perform_move_routing: bool = True, optimize_single_qubits: bool = True, ignore_barriers_in_1qb_optimization: bool = False, remove_final_rzs: bool = True, existing_moves_handling: str | None = None, optimization_level: int = 0, seed_transpiler: int | None = None, num_processes: int | None = None) → list[list[QuantumCircuit]]#

Transpile Qiskit circuits and parallelize them if colour grouped components were inputted.

Parameters:
  • circuits (list[QuantumCircuit]) – Qiskit quantum circuits to transpile and potentially parallelize.

  • components (ComponentGrouping | None) – Physical QPU components on which to transpile (route) the circuits. If a flat list of components is provided, the IQMTarget will be built only on that subset of the full QPU. If colour grouped components are provided, the circuits will be parallelized such that each colour group becomes its own circuit, and the circuit will be broadcasted to parallel groups within a colour group, i.e. executed parallelly. If None, the default target for the full QPU will be used.

  • context (dict[str, Any]) – Compiler context.

  • perform_move_routing (bool) – Whether to perform MOVE gate routing.

  • optimize_single_qubits (bool) – Whether to optimize single qubit gates away.

  • ignore_barriers_in_1qb_optimization (bool) – Whether to ignore barriers when optimizing single qubit gates.

  • remove_final_rzs (bool) – Whether to remove the final z rotations.

  • existing_moves_handling (str | None) – How to handle existing MOVE gates in the circuit, required if the circuit contains MOVE gates.

  • optimization_level (int) – The optimization level of the Qiskit transpiler.

  • seed_transpiler (int | None) – The seed of the Qiskit transpiler.

  • num_processes (int | None) – The number of parallel processes to use.

Returns:

Transpiled and possibly parallelized circuits. The circuit(s) in each inner list are executed in parallel. If there is no parallelization, each inner list has just one item.

Return type:

list[list[QuantumCircuit]]