tqec.computation.correlation.find_correlation_surfaces#
- find_correlation_surfaces(zx_graph: ZXGraph) list[CorrelationSurface] [source]#
Find the correlation surfaces in the ZX graph.
The algorithm starts from each leaf node in the graph, and find the correlation surfaces using the flood fill like algorithm.
For Z/X type node, the correlation surface must start from the opposite type node. For the Port, the correlation surface can start from both X/Z type node. For the Y type node, the correlation surface must be the product of the X and Z type.
- Parameters:
zx_graph – The ZX graph to find the correlation surfaces.
- Returns:
A list of CorrelationSurface in the graph.