Open MABejan opened 1 year ago
Are you generating the files on one computer, and loading them on the other?
The issue is probably to do with how stim is split into 3 modules with the same type names, and it dynamically picks based on presence of AVX/SSE/etc. If you try to load two it collides, and probably it's trying to load the one from the other machine. Even if the load worked, you'd probably get segfaults soon after.
Hmm....
Oh, also, are you aware of stim.Tableau.iter_all(num_qubits=1, unsigned=False)
? Looks lik ethat's what you're doing.
As a workaround, you can store repr(tableau)
and load it with eval(the_repr, {'stim': stim})
. Also i think just normal pickle should work?
Sorry for the immense delay in answering back.
Indeed the problem was that I was generating the files on one computer and using them on the other. Generating the files on the same computer that I run the code on solves the problem, as you were suggesting. Thank you!
Yes, I was aware that there already existed all the n-qubit Clifford gates in stim, but I needed them in a particular order, which would have probably taken a bit longer to work out if converted from the stim default. Thank you for the pointer though.
I have been using pickle (and also tried dill) to save and load Clifford gates coming from the Stim library. The code is running fine on my laptop but not on a remote computer, where the following error occurs.
A minimal example for producing the issue is
where the file was generated by
Please let me know if there are any details which could help.