Skip to content

Commit

Permalink
add fine delay adjustments to device object
Browse files Browse the repository at this point in the history
  • Loading branch information
FKMalino committed Sep 17, 2018
1 parent 0f5d8f8 commit e69a5cf
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion pycqed/instrument_drivers/meta_instrument/device_object_CCL.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,16 +187,33 @@ def prepare_timing(self):
# Substract lowest value to ensure minimal latency is used.
# note that this also supports negative delays (which is useful for
# calibrating)

lowest_value = min(latencies.values())
for key, val in latencies.items():
latencies[key] = val - lowest_value

# ensuring that RO latency is a multiple of 20 ns
ro_latency_modulo_20 = latencies['ro_latency_0']%20e-9
for key, val in latencies.items():
latencies[key] = val + (20e-9 - ro_latency_modulo_20)%20e-9

# Setting the latencies in the CCL
CCL = self.instr_CC.get_instr()
for i, val in enumerate(latencies.values()):
for i, (key, val) in enumerate(latencies.items()):
CCL.set('dio{}_out_delay'.format(i+1), val //
20e-9) # Convert to CCL dio value

for qbt in self.qubits():
# get qubit objects
q = self.find_instrument(qbt)
# set delay AWGs and channels
if key in ('ro_latency_0'):
pass
elif key in ('flux_latency_0'):
q.flux_fine_delay(val%20e-9)
elif key in ('mw_latency_0'):
q.mw_fine_delay(val%20e-9)

def prepare_readout(self):
self._prep_ro_setup_qubits()
self._prep_ro_sources()
Expand Down

0 comments on commit e69a5cf

Please sign in to comment.