mqt.sqr.routing.common¶ Module Contents¶ type Coord = tuple[int, int]¶ type TimedNode = tuple[Coord, int]¶ type Edge = frozenset[Coord]¶ type Cost = tuple[int, int]¶ type QueueEntry = tuple[Cost, TimedNode]¶ MAX_TIME = 300¶ class Qubit[source]¶ id: int¶ pos: Coord¶ class Reservations(graph: networkx.Graph, blocked_edges: set[Edge] | None = None)[source]¶ node_caps: dict[Coord, dict[int, int]]¶ edge_caps: dict[Edge, dict[int, int]]¶ node_type: dict[Coord, str]¶ blocked_edges¶ node_capacity(node: Coord) → int[source]¶ can_occupy(node: Coord, time: int) → bool[source]¶ occupy_node(node: Coord, time: int) → None[source]¶ can_traverse(source: Coord, target: Coord, time: int) → bool[source]¶ traverse_edge(source: Coord, target: Coord, time: int) → None[source]¶ commit(path: list[TimedNode]) → None[source]¶ class AStar[source]¶ static search(graph: networkx.Graph, start: Coord, goal: Coord, reservations: Reservations) → list[TimedNode] | None[source]¶