Rather than raise an exception when the approximations appear to break down, instead choose the maximum edge flip probability to be 1/2.
Summary
Remove an assertion in circuit_matching_decoder.update_edge_weights and instead threshold the edge probabilities at 1/2.
Details and comments
This is a three line change. It allows the circuit_matching_decoder to run (and sometimes succeed) in cases where it would otherwise raise an exception.
Rather than raise an exception when the approximations appear to break down, instead choose the maximum edge flip probability to be 1/2.
Summary
Remove an assertion in circuit_matching_decoder.update_edge_weights and instead threshold the edge probabilities at 1/2.
Details and comments
This is a three line change. It allows the circuit_matching_decoder to run (and sometimes succeed) in cases where it would otherwise raise an exception.