0
$\begingroup$

I am trying to parallelise the function: matching.decode_to_edges_array() to somewhat batch decode, but I am consistently running into the same problem:

TypeError: cannot pickle 'pymatching._cpp_pymatching.MatchingGraph' object .

Any help will be much appreciated! I also want to ask if anyone knows why the batch decode equivalent is not available for this function, it would have been very useful for any sort of correlated decoder. What is the technical reason for not being able to batch decode to edges?

Thanks!

$\endgroup$

1 Answer 1

0
$\begingroup$

You'll either have to make the pymatching.Matching after creating the child processes, or add pickling support to pymatching. We'd certainly take that as a contribution.

I also want to ask if anyone knows why the batch decode equivalent is not available for decode_to_edges_array

There's no technical reason that prevents it, it just isn't implemented. Probably the biggest reason is just the expectation of less benefits. Predicting bit packed observable-flips produces results that can easily be worked with efficiently via numpy. It's not so obvious how to work efficiently on the edges; even just iterating over them with a normal python for-loop will probably already be more expensive than producing them. And batching would still end with iterating the results for analysis.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.