pyquil
pyquil copied to clipboard
Waveforms cannot be pickled
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