qiskit.dagcircuit.DAGCircuit.from_networkx¶
- classmethod DAGCircuit.from_networkx(graph)[código fonte]¶
Take a networkx MultiDigraph and create a new DAGCircuit.
- Parâmetros
graph (networkx.MultiDiGraph) – The graph to create a DAGCircuit object from. The format of this MultiDiGraph format must be in the same format as returned by to_networkx.
- Retorno
- The dagcircuit object created from the networkx
MultiDiGraph.
- Tipo de retorno
- Levanta
MissingOptionalLibraryError – If networkx is not installed
DAGCircuitError – If input networkx graph is malformed