deltakit.core.decoding_graphs.NXDecodingMultiGraph.to_parity_check_matrix#

NXDecodingMultiGraph.to_parity_check_matrix() ndarray[tuple[Any, ...], dtype[uint8]]#

Convert the hypergraph to a parity check matrix of size (len(nodes), len(edges)). Each column represents an edge and the non-zero entries in that column represent detectors in the edge.

The nodes in the graph must be contiguous to construct the matrix.