pennylane_calculquebec.utility.graph.shortest_path#
- pennylane_calculquebec.utility.graph.shortest_path(start: int, end: int, graph: Graph, machine_name: str, excluding: list[int] = [], prioritized_nodes: list[int] = [], use_benchmark=True)#
find the shortest path between node start and end
- Args :
start : start node end : end node graph : the graph to find a path in machine_name (str) : the quantum machine’s name excluding : nodes we dont want to use prioritized_nodes : nodes we want to use if possible use_benchmark : should we consider fidelities in choosing the paths? Returns:
list[int] : the shortest path from start to end