iqm.benchmarks.utils.set_coupling_map

iqm.benchmarks.utils.set_coupling_map#

iqm.benchmarks.utils.set_coupling_map(qubits: Sequence[int], backend: IQMBackendBase, physical_layout: PhysicalLayout = PhysicalLayout.FIXED) CouplingMap#

Set a coupling map according to the specified physical layout.

Parameters:
  • qubits (Sequence[int]) – A list of physical qubits to consider.

  • backend (IQMBackendBase) – A backend from IQM.

  • physical_layout (PhysicalLayout) – A physical layout type to consider. “fixed” sets a coupling map restricted to the input qubits; the results will be constrained to measure those qubits. “batching” sets the coupling map of the backend; the results in a benchmark will be “batched” according to final layouts.

Returns:

A coupling map according to the specified physical layout.

Raises:

ValueError – If the physical layout is not “fixed” or “batching”.

Return type:

CouplingMap