-
Notifications
You must be signed in to change notification settings - Fork 347
Description
@alexcjohnson , I finally got around to testing the updates to the instruments
Sadly our code does not run with this out of the box, our problems seem to be related to the use of meta-instruments, that is instruments that contain references to other instruments.
AWG = tek.Tektronix_AWG5014(name='AWG', setup_folder=None,
address='TCPIP0::192.168.0.9', server_name=None)
VIP_mon_4_tek = qbt.Tektronix_driven_transmon('VIP_mon_4_tek',
LO=LO,
cw_source=S1, td_source=S2,
IVVI=IVVI,
AWG=AWG,
CBox=CBox, heterodyne_instr=HS,
MC=MC,
server_name=None)I show just the AWG instrument and the qubit object, all the keyword arguments (expect server_name) that are passed to the qubit object are instances of (physical) instruments.
There are 2 scenarios in which this fails.
1. I do not specify server_name for either.
AWG initializes correctly, qubit object initialization fails with Empty (see all he way below)
2. I specify server_name =None for the qubit object but leave server_name unspecified for AWG
Both instruments initialize correctly but when I try to load and run a sequence from the qubit object I get an exception Empty (see all the way below).
3. I specify server_name = None for both the qubit object, the AWG and the CBox (but not for MW-sources)
All runs fine, I find however that it fails if either the CBox (FPGA used for data acquisition) or the AWG is running on the instrument server it fails (scenario 2) .
For now using instrument_server = None is a suitable workaround as I am still using MeasurementControl instead of the Loop, however I do want to switch as soon as possible and this would be a major showstopper.
As I made some dummy instruments for playing around with the Loop I should also be able to come up with a self-contained example of scenario 1, scenario 2 might be a bit more difficult to find out.
Error logs
Error corresponding to scenario 1
---------------------------------------------------------------------------
Empty Traceback (most recent call last)
<ipython-input-7-27150ba935e0> in <module>()
26 AWG=AWG,
27 rf_RO_source=S1,
---> 28 CBox=CBox, heterodyne_instr=HS, MC=MC)#, server_name=None)
29 gen.load_settings_onto_instrument(VIP_mon_4_tek, label='VIP_mon_4_tek')
30 VIP_mon_4_tek.pulse_I_channel.set('ch1')
d:\githubrepos\qcodes\qcodes\instrument\base.py in __new__(cls, server_name, *args, **kwargs)
67 else:
68 return RemoteInstrument(*args, instrument_class=cls,
---> 69 server_name=server_name, **kwargs)
70
71 def __init__(self, name, server_name=None, **kwargs):
d:\githubrepos\qcodes\qcodes\instrument\remote.py in __init__(self, instrument_class, server_name, *args, **kwargs)
25 manager = get_instrument_server(server_name, shared_kwargs)
26 # connect sets self.connection
---> 27 manager.connect(self, instrument_class, args, kwargs)
28
29 # bind all the different categories of actions we need
d:\githubrepos\qcodes\qcodes\instrument\server.py in connect(self, remote_instrument, instrument_class, args, kwargs)
82 conn = InstrumentConnection(
83 manager=self, instrument_class=instrument_class,
---> 84 new_id=new_id, args=args, kwargs=kwargs)
85
86 # save the information to recreate this instrument on the server
d:\githubrepos\qcodes\qcodes\instrument\server.py in __init__(self, manager, instrument_class, new_id, args, kwargs)
126 # (like visa timeout) to get back to us
127 info = manager.ask('new', instrument_class, new_id, args, kwargs,
--> 128 timeout=20)
129 for k, v in info.items():
130 setattr(self, k, v)
d:\githubrepos\qcodes\qcodes\utils\multiprocessing.py in ask(self, timeout, *query)
332 if self._error_queue.empty():
333 # only raise if we're not about to find a deeper error
--> 334 raise e
335 self._check_for_errors(self._expect_error)
336
d:\githubrepos\qcodes\qcodes\utils\multiprocessing.py in ask(self, timeout, *query)
324
325 try:
--> 326 res = self._check_response(timeout)
327
328 while not self._response_queue.empty():
d:\githubrepos\qcodes\qcodes\utils\multiprocessing.py in _check_response(self, timeout)
301
302 def _check_response(self, timeout):
--> 303 res = self._response_queue.get(timeout=timeout)
304 if res == SERVER_ERR:
305 self._expect_error = True
C:\Anaconda3\lib\multiprocessing\queues.py in get(self, block, timeout)
103 timeout = deadline - time.time()
104 if timeout < 0 or not self._poll(timeout):
--> 105 raise Empty
106 elif not self._poll():
107 raise Empty
Empty:
Error corresponding to scenario 2
Starting measurement: Rabi-n1_VIP_mon_4_tek
Sweep function: Rabi
Detector function: CBox_integrated_average_detector
Programming 'Rabi_sequence' (31 element(s))
d:\githubrepos\qcodes\qcodes\utils\multiprocessing.py:304: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
if res == SERVER_ERR:
---------------------------------------------------------------------------
Empty Traceback (most recent call last)
<ipython-input-3-759e4f6c580f> in <module>()
----> 1 VIP_mon_4_tek.measure_rabi(np.linspace(-.5, .5, 31))
D:\GitHubRepos\PycQED_py3\instrument_drivers\meta_instrument\qubit_objects\Tektronix_driven_transmon.py in measure_rabi(self, amps, n, MC, analyze, close_fig, verbose)
267 MC.set_sweep_points(amps)
268 MC.set_detector_function(self.int_avg_det)
--> 269 MC.run('Rabi-n{}'.format(n)+self.msmt_suffix)
270 if analyze:
271 ma.Rabi_Analysis(auto=True, close_fig=close_fig)
D:\GitHubRepos\PycQED_py3\modules\measurement\measurement_control.py in run(self, name, mode, **kw)
55 self.create_experimentaldata_dataset()
56 if self.mode == '1D':
---> 57 self.measure()
58 elif self.mode == '2D':
59 self.measure_2D()
D:\GitHubRepos\PycQED_py3\modules\measurement\measurement_control.py in measure(self, *kw)
76
77 for sweep_function in self.sweep_functions:
---> 78 sweep_function.prepare()
79
80 if self.sweep_functions[0].sweep_control == 'soft':
D:\GitHubRepos\PycQED_py3\modules\measurement\awg_sweep_functions.py in prepare(self, **kw)
26 pulse_pars=self.pulse_pars,
27 RO_pars=self.RO_pars,
---> 28 n=self.n)
29
30
D:\GitHubRepos\PycQED_py3\modules\measurement\pulse_sequences\single_qubit_tek_seq_elts.py in Rabi_seq(amps, pulse_pars, RO_pars, n, verbose)
45 seq.append_element(el, trigger_wait=True)
46 station.instruments['AWG'].stop()
---> 47 station.pulsar.program_awg(seq, *el_list, verbose=verbose)
48 return seq_name
49
D:\GitHubRepos\PycQED_py3\modules\measurement\waveform_control\pulsar.py in program_awg(self, sequence, *elements, **kw)
372 time.sleep(.1)
373 # Waits for AWG to be ready
--> 374 self.AWG.is_awg_ready()
375
376 for channel, offset in offsets.items():
d:\githubrepos\qcodes\qcodes\instrument\remote.py in __call__(self, *args, **kwargs)
106 class RemoteMethod(RemoteComponent):
107 def __call__(self, *args, **kwargs):
--> 108 return self._instrument.connection.ask(self.name, *args, **kwargs)
109
110
d:\githubrepos\qcodes\qcodes\instrument\server.py in ask(self, func_name, *args, **kwargs)
134 Query the server copy of this instrument, expecting a response
135 '''
--> 136 return self.manager.ask('ask', self.id, func_name, args, kwargs)
137
138 def write(self, func_name, *args, **kwargs):
d:\githubrepos\qcodes\qcodes\utils\multiprocessing.py in ask(self, timeout, *query)
332 if self._error_queue.empty():
333 # only raise if we're not about to find a deeper error
--> 334 raise e
335 self._check_for_errors(self._expect_error)
336
d:\githubrepos\qcodes\qcodes\utils\multiprocessing.py in ask(self, timeout, *query)
324
325 try:
--> 326 res = self._check_response(timeout)
327
328 while not self._response_queue.empty():
d:\githubrepos\qcodes\qcodes\utils\multiprocessing.py in _check_response(self, timeout)
301
302 def _check_response(self, timeout):
--> 303 res = self._response_queue.get(timeout=timeout)
304 if res == SERVER_ERR:
305 self._expect_error = True
C:\Anaconda3\lib\multiprocessing\queues.py in get(self, block, timeout)
103 timeout = deadline - time.time()
104 if timeout < 0 or not self._poll(timeout):
--> 105 raise Empty
106 elif not self._poll():
107 raise Empty
Empty: ```