iqm.pulla.utils.find_circuit_boundary

iqm.pulla.utils.find_circuit_boundary#

iqm.pulla.utils.find_circuit_boundary(mode, circuit_components, circuit_couplers, device)#

Determine the boundary of a circuit executed on the QPU.

See CircuitBoundaryMode for the definitions of the circuit boundaries.

Parameters:
  • mode (CircuitBoundaryMode) – method of determining the circuit border

  • circuit_components (set[str] | frozenset[str]) – all locus components used in the circuit

  • circuit_couplers (set[str]) – all couplers used in the circuit to apply gates

  • device (ChipTopology) – describes the QPU topology

Returns:

boundary locus components, boundary couplers

Raises:

ValueError – unknown mode

Return type:

tuple[set[str], set[str]]