iqm.cpc.compiler.standard_stages.map_components

Contents

iqm.cpc.compiler.standard_stages.map_components#

iqm.cpc.compiler.standard_stages.map_components(circuits, component_mapping, context)#

Maps the logical component names in a sequence of instructions to the corresponding physical component names.

Modifies instructions in place. If no mapping is provided, returns the circuits as they are.

Parameters:
  • circuits (Iterable[Circuit]) – The circuits to compiler.

  • component_mapping (dict[str, str] | None) – Mapping of logical component names to physical component names. None means the identity mapping.

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

Return type:

Iterable[Circuit]