iqm.benchmarks.utils_plots.GraphPositions#

class iqm.benchmarks.utils_plots.GraphPositions#

Bases: object

A class to store and generate graph positions for different chip layouts.

This class contains predefined node positions for various quantum chip topologies and provides methods to generate positions for different layout types.

garnet_positions#

Mapping of node indices to (x,y) positions for Garnet chip.

Type:

Dict[int, Tuple[int, int]]

deneb_positions#

Mapping of node indices to (x,y) positions for Deneb chip.

Type:

Dict[int, Tuple[int, int]]

predefined_stations#

Mapping of chip names to their position dictionaries.

Type:

Dict[str, Dict[int, Tuple[int, int]]]

Attributes

Methods

__eq__(other)

Return self==value.

__repr__()

Return repr(self).

create_positions(graph[, topology])

Generate node positions for a given graph and topology.

static create_positions(graph: PyGraph, topology: Literal['star', 'crystal'] | None = None) Dict[int, Tuple[float, float]]#

Generate node positions for a given graph and topology.

Parameters:
  • graph (PyGraph) – The graph to generate positions for.

  • topology (Optional[Literal["star", "crystal"]]) – The type of layout to generate. Must be either “star” or “crystal”.

Returns:

A dictionary mapping node indices to (x,y) coordinates.

Return type:

Dict[int, Tuple[float, float]]