mentpy.mbqc.flow.find_pflow(graph, I, O, planes)

Find a p-flow in a given graph.

graph : mp.GraphState

The graph state to find the flow of.

I : list

The input nodes of the graph state.

O : list

The output nodes of the graph state.

planes : dict

The measurement planes of the graph state. The keys are the nodes and the values are the planes.


  • condition (bool) – True if a p-flow was found, False otherwise.

  • flow (function) – The flow function.

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


Implementation of algorithm in (Special thanks to Will Simmons for useful discussions about this algorithm.)