# Graph¶

class qctrl.graphs.Graph(operations=None, name=None)

Utility class for representing and building a Q-CTRL data flow graph.

You can call methods to add nodes to the graph, and use the operations attribute to get a dictionary representation of the graph.

Parameters
• operations (dict[str, str], optional) – The initial dictionary of operations for the graph. You can can omit this parameter if this is a new graph (which is expected to be true in almost all cases).

• name (deprecated) – This parameter will be removed in the future.

Methods

See Graphs.