pennylane_calculquebec.utility.graph.find_closest_wire#
- pennylane_calculquebec.utility.graph.find_closest_wire(source: int, machine_graph: Graph, machine_name: str, excluding: list[int] = [], prioritized: list[int] = [], use_benchmark=True)#
find node in graph that is closest to given node, while skipping nodes from the excluding list
- Parameters:
source (int) – the node from which we are searching
machine_graph (Graph) – the graph of the machine
excluding (list[int]) – the nodes that we want to skip
machine_name (str) – the quantum machine’s name
prioritized (list[int]) – nodes that should be in the path if possible
use_benchmark (bool) – should we use qubit fidelities?
- Returns:
the wire that has the smallest path from source
- Return type:
int