iqm.qrisp_iqm.passes.routing.core.vf2pp.vf2pp_layout_and_route

iqm.qrisp_iqm.passes.routing.core.vf2pp.vf2pp_layout_and_route#

iqm.qrisp_iqm.passes.routing.core.vf2pp.vf2pp_layout_and_route(qc: QuantumCircuit, topology: QPUTopology, max_attempts: int = 1000000000) → QuantumCircuit | None#

Attempt to place qc onto topology via subgraph isomorphism.

Parameters:
  • qc (QuantumCircuit) – The circuit to place.

  • topology (QPUTopology) – Target topology in CSR form.

  • max_attempts (int) – Total budget of feasible candidate assignments the VF2++ search may explore (split across parallel threads) before giving up and returning None. 0 means unlimited. Default is 1 000 000 000. Because the search is parallelised over first-node candidates, wall-clock time scales as max_attempts / n_target_nodes.

Returns:

The placed circuit, or None if no isomorphism was found within the attempt budget.

Return type:

QuantumCircuit | None