Hi Oscar,
I am trying to parallelise the appication of the matcher.decode method over a very large set of syndrome inputs stored in a pandas dataframe.
Hence, I am using modules such as mapply to distribute this over many cores. This module, like many other parallelisation modules, pickles the objects using the dill module.
Whenever I try to do so, I incur in the error:
TypeError: cannot pickle 'pymatching._cpp_pymatching.MatchingGraph' object
For me it would be enough to be able to pickle the matcher.decode() method, however I believe that in order to do that the whole matcher object must be picklable as well.
Is there a chance to make this work?
Here is an example to reproduce the error:
import stim
import pymatching
import dill
circuit = stim.Circuit.generated("repetition_code:memory", rounds=1, distance=3)
dem = circuit.detector_error_model(decompose_errors=True)
matcher = pymatching.Matching.from_detector_error_model(dem)
with open("./test.pickle", 'wb') as f:
dill.dump(matcher, f)
output: TypeError: cannot pickle 'pymatching._cpp_pymatching.MatchingGraph' object
Hi Oscar,
I am trying to parallelise the appication of the matcher.decode method over a very large set of syndrome inputs stored in a pandas dataframe.
Hence, I am using modules such as mapply to distribute this over many cores. This module, like many other parallelisation modules, pickles the objects using the dill module.
Whenever I try to do so, I incur in the error:
TypeError: cannot pickle 'pymatching._cpp_pymatching.MatchingGraph' objectFor me it would be enough to be able to pickle the matcher.decode() method, however I believe that in order to do that the whole matcher object must be picklable as well.
Is there a chance to make this work?
Here is an example to reproduce the error:
output:
TypeError: cannot pickle 'pymatching._cpp_pymatching.MatchingGraph' object