deltakit.core.decoding_graphs.NXDecodingMultiGraph.with_multi_edges_merged#

NXDecodingMultiGraph.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>) NXDecodingGraph#

Create an NXDecodingGraph 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 graph with the same properties as this graph but with all multi-edges combined to a single edge.

Return type:

NXDecodingGraph