Skip to content

Commit

Permalink
print
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarhiggott committed Jul 24, 2024
1 parent ee5cd5f commit ff32555
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pymatching/sparse_blossom/driver/mwpm_decoding.cc
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,11 @@ void pm::decode_detection_events(
}

void pm::decode_detection_events_to_match_edges(pm::Mwpm& mwpm, const std::vector<uint64_t>& detection_events) {
if (mwpm.flooder.negative_weight_sum != 0)
if (mwpm.flooder.negative_weight_sum != 0) {
std::cout << "mwpm.flooder.negative_weight_sum = " << mwpm.flooder.negative_weight_sum << " != 0" << std::endl;
throw std::invalid_argument(
"Decoding to matched detection events not supported for graphs containing edges with negative weights.");
}
process_timeline_until_completion(mwpm, detection_events);
mwpm.flooder.match_edges.clear();
shatter_blossoms_for_all_detection_events_and_extract_match_edges(mwpm, detection_events);
Expand Down

0 comments on commit ff32555

Please sign in to comment.