deltakit.core.decoding_graphs.extract_logicals#

deltakit.core.decoding_graphs.extract_logicals(graph: HyperMultiGraph[AnyEdgeT]) list[set[AnyEdgeT]]#

Extract which edges affect which logical observables from a graph by looking through the edge records.

Parameters:

graph (HyperMultiGraph[AnyEdgeT]) – The graph containing edges records annotated with which edges affect which logicals.

Returns:

A list where each index represents a logical and the set of edges in at each index are the edges in the graph which affect that logical.

Return type:

List[Set[AnyEdgeT]]