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

Find a p-flow in a given graph.

Parameters:
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.

Returns:

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

  • flow (function) – The flow function.

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

References

Implementation of algorithm in https://arxiv.org/pdf/2109.05654v1.pdf. (Special thanks to Will Simmons for useful discussions about this algorithm.)