qiskit-community / qiskit-qec

Qiskit quantum error correction framework
https://qiskit-community.github.io/qiskit-qec/
Apache License 2.0
84 stars 35 forks source link

choose edge flip probabilities to saturate at 1/2 #349

Closed awcross1 closed 1 year ago

awcross1 commented 1 year ago

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.