pyquil icon indicating copy to clipboard operation
pyquil copied to clipboard

Waveforms cannot be pickled

Open bramathon opened this issue 11 months ago • 0 comments

from pyquil.quiltwaveforms import DragGaussianWaveform
import pickle

waveform = DragGaussianWaveform(duration=100e-9, fwhm=20e-9, t0=50e-9, anh=100e3, alpha=0.5, scale=1.0, phase=0.0, detuning=0.0)
pickle.dumps(waveform)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[30], line 5
      2 import pickle
      4 waveform = DragGaussianWaveform(duration=100e-9, fwhm=20e-9, t0=50e-9, anh=100e3, alpha=0.5, scale=1.0, phase=0.0, detuning=0.0)
----> 5 pickle.dumps(waveform)

TypeError: cannot pickle 'DragGaussianWaveform' object

bramathon avatar Mar 15 '24 09:03 bramathon