class mentpy.mbqc.flow.Flow

This class deals with the flow of a given graph state

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.

planes : dict

The measurement planes of the graph state. The keys are the nodes and the values are the planes. If None, the algorithm will assume that the measurement planes are all XY.

Constructors

Flow(graph, input_nodes, output_nodes, planes=None)

Initializes the flow of a given graph state. Assumes that graph has nodes labeled with numbers from 0 to n-1, where n is the number of nodes in the graph.

String representation

__repr__()

Return repr(self).

Special methods

__call__(node)

Call self as a function.

Methods

adapt_angle(angle, node, previous_outcomes)
adapt_angles(angles, outcomes)
correction_op(node)

Returns the correction operator for a given node.

generator_op(node)

Returns the generator operator for a given node.

initialize_flow()

Lazily initializes the flow properties when needed.