Open matthewweippert opened 3 years ago
This may be related to #206 and #214 .
Hi @matthewweippert! The issue with pickle
here is that the FiniteMPS
class has a bunch members which are inline-defined functions, and svd
is one of them. The reason for this is indeed related to jit
ing. Let me see if I can fix this.
I'd love to see some methods for serialization and storage of matrix product operators and states. In the short term, I was hoping to use pickle and/or dill, but both are giving me problem:
I expected to see True and True and the same name for the numpy (default) backend twice. Python's pickle gets hung up on svd (maybe the first jitted function?):
AttributeError: Can't pickle local object 'BaseMPS.__init__.<locals>.svd'
With dill (uncomment line 2 and comment line 3) I get
In the long run, I'd prefer more efficient and stable storage to disk using h5py. However, we may also want to use something like dask for distributed processing which uses pickle for communication.