mentpy.mbqc.flow.find_cflow(graph, input_nodes, output_nodes) object

Finds the causal flow a graph.

Parameters:
graph : mp.GraphState

The graph state to find the flow of.

input_nodes : list

The input nodes of the graph state.

output_nodes : list

The output nodes of the graph state.

Returns:

  • flow (function) – The flow function.

  • partial_order (function) – The partial order function.

  • depth (int) – The depth of the flow.

  • layers (dict) – The layers of the flow.

References

Implementation of algorithm in https://arxiv.org/pdf/0709.2670v1.pdf.