deltakit.core.decoding_graphs.DecodingHyperMultiGraph.with_multi_edges_merged#
- DecodingHyperMultiGraph.with_multi_edges_merged(combine_edge_records: ~collections.abc.Callable[[~collections.abc.Iterable[~deltakit_core.decoding_graphs._data_qubits.EdgeRecord]], ~deltakit_core.decoding_graphs._data_qubits.EdgeRecord] = <function convolve_probabilities>) DecodingHyperGraph#
Create a DecodingHyperGraph instance with the same nodes but with only single edges, merging the multi-edge edge records to a single edge record.
- Parameters:
combine_edge_records (Callable[[Iterable[EdgeRecord]], EdgeRecord], optional) – A function which combines all the edge records for a given edge, by default convolve_probabilities which applies the generalised p * (1 - q) + q * (1 - p).
- Returns:
A hypergraph with the same properties as this graph but with all multi-edges merged to a single edge.
- Return type: