PyQtGraph multiprocessing 'ClosedError'
I get this error sometimes while running a Rabi calibration. I'm not sure what triggers it, as it only happens sometimes, and apparently randomly.
This is the code I run:
from qcodes.instrument.parameter import ManualParameter
from quantify_scheduler.gettables import ScheduleVectorAcqGettable
import numpy as np
amp = ManualParameter(name='amplitude', unit='V', label='Amplitude')
rabi_sched_kwargs = {
'pulse_amp': amp, # When we specify an argument as a parameter, the current value is evaluated every iteration.
# We use this so that we can sweep it and a new schedule is generated and compiled.
'pulse_duration': transmon.mw_pulse_duration(),
'frequency': transmon.freq_01(),
'qubit': 'q0'
}
gettable = ScheduleVectorAcqGettable(None,
schedule_function=rabi_sched,
schedule_kwargs=rabi_sched_kwargs,
device_cfg=transmon.generate_device_config(),
hardware_cfg=hw_config,
instr_coord=IC,
hardware_averages=1000
)
amplitude_setpoints = np.linspace(0, 0.25, 12)
MC.settables(amp)
MC.setpoints(amplitude_setpoints)
MC.gettables(gettable)
dset = MC.run('Rabi')
And this is the result I get:
ClosedError
---------------------------------------------------------------------------
ClosedError Traceback (most recent call last)
<ipython-input-29-d713ae80c1da> in <module>
7 MC.gettables(gettable)
8
----> 9 dset = MC.run('Rabi')
g:\my drive\code\quantify-core\quantify_core\measurement\control.py in run(self, name, soft_avg)
242 if self.verbose():
243 print("Starting iterative measurement...")
--> 244 self._run_iterative()
245 except KeyboardInterrupt:
246 print("\nInterrupt signaled, exiting gracefully...")
g:\my drive\code\quantify-core\quantify_core\measurement\control.py in _run_iterative(self)
346 self._iterative_set_and_get(row, self._curr_setpoint_idx())
347 self._nr_acquired_values += 1
--> 348 self._update()
349 self._check_interrupt()
350 self._loop_count += 1
g:\my drive\code\quantify-core\quantify_core\measurement\control.py in _update(self, print_message)
507
508 if self.instrument_monitor():
--> 509 self.instrument_monitor.get_instr().update()
510
511 self._last_upd = time.time()
g:\my drive\code\quantify-core\quantify_core\visualization\instrument_monitor.py in update(self)
97 snap = snapshot(update=False, clean=True)
98 try:
---> 99 self.widget.setData(snap["instruments"])
100 except AttributeError as e:
101 # This is to catch any potential pickling problems with the snapshot.
~\Anaconda3\envs\quantify\lib\site-packages\pyqtgraph\multiprocess\remoteproxy.py in __getattr__(self, attr, **k 900 else:
901 #opts = self._getProxyOptions()
--> 902 return self._handler.getObjAttr(self, attr, **opts)
903
904 def _deferredAttr(self, attr):
~\Anaconda3\envs\quantify\lib\site-packages\pyqtgraph\multiprocess\remoteproxy.py in getObjAttr(self, obj, attr, **kwds)
531
532 def getObjAttr(self, obj, attr, **kwds):
--> 533 return self.send(request='getObjAttr', opts=dict(obj=obj, attr=attr), **kwds)
534
535 def getObjValue(self, obj, **kwds):
~\Anaconda3\envs\quantify\lib\site-packages\pyqtgraph\multiprocess\remoteproxy.py in send(self, request, opts, reqId, callSync, timeout, returnType, byteData, **kwds)
415 if self.exited:
416 self.debugMsg(' send: exited already; raise ClosedError.')
--> 417 raise ClosedError()
418
419 with self.sendLock:
ClosedError: