fix: To fix DEM canonicalisation#568
Conversation
| // Keep the PCM/topological ordering from get_sorted_pcm_column_indices, but | ||
| // sort equal-syndrome groups by observable signature so merge-compatible DEM | ||
| // columns are adjacent. |
There was a problem hiding this comment.
If this happens (same syndrome but different observable), this points to a problem in the QEC code where the code is essentially providing d<2 protection, and no decoder can help provide corrections in this situation. I think that we throw a warning in this case. I don't think that sorting the columns can help the decoder other than by random luck.
There was a problem hiding this comment.
I have updated the code to remove the extra sorting and show a cudaq::warn when same-H diff-O.
62ca48e to
c374d76
Compare
|
/ok to test c374d76 |
|
Thanks, @kaiqiy-nv. Could you please investigate the errors and warnings in
For the warning, could we please cap it at ~10 messages per function invocation so as to not spam the user's console with a short distance code? |
|
Hi @bmhowe23 , To cap warnings at 10 messages per function invocation -- DONE in the new push Cause of the CI failure above here:
Potential need to update Setting We may need further updates in Do we need to implement this update? Quick fix in the local test cases: We have changed the asserts of the We have also added one more test case |
b53bdce to
d0ca533
Compare
Signed-off-by: Kaiqi Yan <kaiqiy@nvidia.com>
Signed-off-by: Kaiqi Yan <kaiqiy@nvidia.com>
Signed-off-by: Kaiqi Yan <kaiqiy@nvidia.com>
Signed-off-by: Kaiqi Yan <kaiqiy@nvidia.com>
Signed-off-by: Kaiqi Yan <kaiqiy@nvidia.com>
Signed-off-by: Kaiqi Yan <kaiqiy@nvidia.com>
d0ca533 to
c522b94
Compare
|
/ok to test 0e431bb |
This PR tries to fix [B] 6234203 .
It also strengthen the test cases to expose the bug and test further:
merge_strategy='independent'intest_pymatching_decode_to_observable_surface_code_dem, since correct DEMs can contain parallel matching edges.pytest.importorskip("stim")so unsupported platforms get skipped.Thank you for looking at this PR.