Visualization

Graph

The quantum-robot unit processes communicate in between each other via Redis entries. With the qrobot.graph function it is possible to generate a networkx directed graph containing all the running units as connected nodes.

qrobot.graph(status_dict: dict) DiGraph[source]

Given the Redis status dictionary, generate a networkx directed graph containing all the units connected as nodes.

Parameters:

status_dict (dict) – The Redis status dictionary.

Returns:

The networkx directed graph

Return type:

networkx.DiGraph

Draw

With the qrobot.graph function it is possible to generate a networkx directed graph containing all the running units as connected nodes. The qrobot.draw function allows to visualize such graph.

qrobot.draw(graph: Graph, show: bool = True, return_figure: bool = False, static_plot: bool = True) Figure | None[source]

Visualize a directed graph containing all the running units as connected nodes.

Parameters:
  • graph (nx.Graph) – The directed graph.

  • show (bool, optional) – Whether to show the generated plotly Figure. Defaults to True.

  • return_figure (bool, optional) – Whether to return the generated plotly Figure. Defaults to False.

  • static_plot (bool, optional) – Whether to have a static or interactive plotly Figure. Defaults to True.

Returns:

The generated plotly Figure (if return_figure is True).

Return type:

go.Figure

Dashboard

Warning

The Dashboard is still on development and should not be used if not for mere testing purposes.

Dashboard webapp to monitor current qUnits sharing the same redis server.

qrobot.dashboard.app.create_app(config_object_name: str = 'qrobot.dashboard.config.Config') Flask[source]

Factory function for the Dashboard app.

Run the app via FLASK_APP=qrobot.dashboard poetry run flask run