iqm.benchmarks.utils.perform_backend_transpilation

iqm.benchmarks.utils.perform_backend_transpilation#

iqm.benchmarks.utils.perform_backend_transpilation(qc_list: list[IQMCircuit], backend: IQMBackendBase, qubits: Sequence[int], coupling_map: list[list[int]], basis_gates: Sequence[str] = ('r', 'cz'), qiskit_optim_level: int = 1, optimize_sqg: bool = False, drop_final_rz: bool = True, routing_method: RoutingMethod | None = RoutingMethod.SABRE, approximation_degree: float = 1.0) list[IQMCircuit]#

Transpile a list of circuits to backend specifications.

Parameters:
  • qc_list (list[IQMCircuit]) – The original (untranspiled) list of quantum circuits.

  • backend (IQMBackendBase) – The backend to execute the benchmark on.

  • qubits (Sequence[int]) – The qubits to target in the transpilation.

  • coupling_map (list[list[int]]) – The target coupling map to transpile to.

  • basis_gates (Sequence[str]) – The basis gates.

  • qiskit_optim_level (int) – Qiskit “optimization_level” value.

  • optimize_sqg (bool) – Whether SQG optimization is performed taking into account virtual Z.

  • drop_final_rz (bool) – Whether the SQG optimizer drops a final RZ gate.

  • routing_method (RoutingMethod | None) – The routing method employed by Qiskit’s transpilation pass.

  • approximation_degree (float) – How much the transpiler is allowed to approximate the original circuit in terms of lower gate counts and depth. 1.0 means no deviation allowed, 0.0 means maximum deviation allowed.

Returns:

A list of transpiled quantum circuits.

Raises:

ValueError – if Star topology and label 0 is in qubit layout.

Return type:

list[IQMCircuit]