sf.program_utils.list_to_DAG
-
list_to_DAG
(ls)[source]
Transforms a list of Commands to a DAG representation.
In the DAG (directed acyclic graph) each node is a Command
instance,
and edges point from Commands to their immediate dependents/followers.
- Parameters
ls (Iterable[Command]) – quantum circuit
- Returns
same circuit in DAG form
- Return type
networkx.DiGraph[Command]
code/api/strawberryfields.program_utils.list_to_DAG