Skip to content

Commit

Permalink
adding UHFQC spectroscopy mode integrated into the CCL transmon qubit…
Browse files Browse the repository at this point in the history
… object
  • Loading branch information
NielsBultink committed May 4, 2018
1 parent 088ee2d commit 5e5ec3a
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,10 @@ def add_config_parameters(self):
'or a str (channel name) when using an SPI rack.'),
initial_value=1,
parameter_class=ManualParameter)
self.add_parameter('cfg_spec_mode', vals=vals.Bool(),
docstring=('Used to activate spec mode in measurements'),
initial_value=False,
parameter_class=ManualParameter)

def add_generic_qubit_parameters(self):
self.add_parameter('E_c', unit='Hz',
Expand Down Expand Up @@ -1182,9 +1186,13 @@ def calibrate_mixer_offsets_RO(self, update: bool=True) -> bool:

def measure_heterodyne_spectroscopy(self, freqs, MC=None,
analyze=True, close_fig=True):
UHFQC=self.instr_acquisition.get_instr()
self.prepare_for_continuous_wave()
if MC is None:
MC = self.instr_MC.get_instr()
# Starting specmode if set in config
if self.cfg_spec_mode():
UHFQC.spec_mode_on(IF=self.ro_freq_mod(), ro_amp=self.ro_pulse_amp())
# Snippet here to create and upload the CCL instructions
CCL = self.instr_CC.get_instr()
CCL.stop()
Expand All @@ -1201,6 +1209,10 @@ def measure_heterodyne_spectroscopy(self, freqs, MC=None,
self.int_avg_det_single._set_real_imag(False)
MC.set_detector_function(self.int_avg_det_single)
MC.run(name='Resonator_scan'+self.msmt_suffix)
# Stopping specmode
if self.cfg_spec_mode():
UHFQC.spec_mode_off()
self._prep_ro_pulse(upload=True)
if analyze:
ma.Homodyne_Analysis(label=self.msmt_suffix, close_fig=close_fig)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1007,7 +1007,70 @@ def download_transformation_matrix(self, nr_rows=None, nr_cols=None):
for j in range(np.shape(matrix)[1]): # looping over the colums
matrix[i][j] = self.get('quex_trans_{}_col_{}_real'.format(j, i))
return matrix

def spec_mode_on(self, acq_length=1/1500, IF=20e6, ro_amp=0.1):
awg_code = """
const TRIGGER1 = 0x000001;
const WINT_TRIG = 0x000010;
const IAVG_TRIG = 0x000020;
const WINT_EN = 0x1f0000;
setTrigger(WINT_EN);
var loop_cnt = getUserReg(0);
const Fsample = 1.8e9;
const triggerdelay = {}; //seconds
repeat(loop_cnt) {{
setTrigger(WINT_EN + WINT_TRIG + TRIGGER1);
wait(5);
setTrigger(WINT_EN);
wait(triggerdelay*Fsample/8 - 5);
}}
wait(1000);
setTrigger(0);
""".format(acq_length)
#setting the internal oscillator to the IF
self.oscs_0_freq(IF)
#setting the integration path to use the oscillator instead of integration functions
self.quex_wint_mode(1)
#just below the
self.quex_wint_length(int(acq_length*0.99*1.8e9))
#uploading the sequence
self.awg_string(awg_code)
# setting the integration rotation to single sideband
self.quex_rot_0_real(1)
self.quex_rot_0_imag(1)
self.quex_rot_1_real(1)
self.quex_rot_1_imag(-1)
# setting the mixer deskewing to identity
self.quex_deskew_0_col_0(1)
self.quex_deskew_1_col_0(0)
self.quex_deskew_0_col_1(0)
self.quex_deskew_1_col_1(1)

self.sigouts_0_enables_3(1)
self.sigouts_1_enables_7(1)
# setting
self.sigouts_1_amplitudes_7(ro_amp)#magic scale factor
self.sigouts_0_amplitudes_3(ro_amp)

def spec_mode_off(self):
# Resetting To regular Mode
# changing int length
self.quex_wint_mode(0)
# Default settings copied
self.quex_rot_0_imag(0)
self.quex_rot_0_real(1)
self.quex_rot_1_imag(0)
self.quex_rot_1_real(1)
# setting to DSB by default
self.quex_deskew_0_col_0(1)
self.quex_deskew_1_col_0(0)
self.quex_deskew_0_col_1(0)
self.quex_deskew_1_col_1(1)
#switching off the modulation tone
self.sigouts_0_enables_3(0)
self.sigouts_1_enables_7(0)

class ziShellError(Exception):
"""Base class for exceptions in this module."""
Expand Down

0 comments on commit 5e5ec3a

Please sign in to comment.