Skip to content

Commit

Permalink
final changes to use VSM update
Browse files Browse the repository at this point in the history
  • Loading branch information
AdriaanRol committed May 18, 2018
1 parent 80067fc commit 9b68e01
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ htmlcov/
.coverage
.coverage.*
.cache
*.pytest_cache*
nosetests.xml
coverage.xml
*,cover
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,12 @@ def add_mw_parameters(self):

self.add_parameter('mw_vsm_G_amp',
label='VSM amp Gaussian component',
vals=vals.Numbers(0.2, 2.0),
vals=vals.Numbers(0.2, 3.0),
initial_value=1.0,
parameter_class=ManualParameter)
self.add_parameter('mw_vsm_D_amp',
label='VSM amp Derivative component',
vals=vals.Numbers(0.2, 2.0),
vals=vals.Numbers(0.2, 3.0),
initial_value=1.0,
parameter_class=ManualParameter)
self.add_parameter('mw_vsm_G_phase',
Expand All @@ -363,7 +363,7 @@ def _get_mw_vsm_delay(self):
def add_spec_parameters(self):
self.add_parameter('spec_vsm_amp',
label='VSM amplitude for spec pulses',
vals=vals.Numbers(0.2,2.0),
vals=vals.Numbers(0.2,3.0),
initial_value=1.0,
parameter_class=ManualParameter)

Expand Down Expand Up @@ -535,7 +535,7 @@ def add_config_parameters(self):
parameter_class=ManualParameter)
self.add_parameter('cfg_spec_mode', vals=vals.Bool(),
docstring=('Used to activate spec mode in measurements'),
initial_value=False,
initial_value=False,
parameter_class=ManualParameter)

def add_generic_qubit_parameters(self):
Expand Down Expand Up @@ -952,6 +952,8 @@ def _prep_mw_pulses(self):
def _prep_td_configure_VSM(self):
# Configure VSM
VSM = self.instr_VSM.get_instr()
VSM.set('ch{}_frequency'.format(
self.mw_vsm_ch_in()), self.freq_qubit())

VSM.set('mod{}_ch{}_marker_state'.format(
self.mw_vsm_mod_out(), self.mw_vsm_ch_in()), 'on')
Expand Down Expand Up @@ -1084,8 +1086,8 @@ def calibrate_mixer_offsets_drive(self, update: bool =True)-> bool:

# Calibrate Gaussian component mixer
# the use of modula 8 for mixer calibrations is hardcoded.
VSM.set('mod8_ch{}_gaussian_amp'.format(ch_in), 50000)
VSM.set('mod8_ch{}_derivative_amp'.format(ch_in), 0)
VSM.set('mod8_ch{}_gaussian_amp'.format(ch_in), 2.0)
VSM.set('mod8_ch{}_derivative_amp'.format(ch_in), 0.2)
offset_I, offset_Q = mixer_carrier_cancellation(
SH=self.instr_SH.get_instr(),
source=self.instr_LO_mw.get_instr(),
Expand All @@ -1096,8 +1098,8 @@ def calibrate_mixer_offsets_drive(self, update: bool =True)-> bool:
self.mw_mixer_offs_GQ(offset_Q)

# Calibrate Derivative component mixer
VSM.set('mod8_ch{}_gaussian_amp'.format(ch_in), 0)
VSM.set('mod8_ch{}_derivative_amp'.format(ch_in), 50000)
VSM.set('mod8_ch{}_gaussian_amp'.format(ch_in), 0.2)
VSM.set('mod8_ch{}_derivative_amp'.format(ch_in), 2.0)

offset_I, offset_Q = mixer_carrier_cancellation(
SH=self.instr_SH.get_instr(),
Expand Down Expand Up @@ -1228,7 +1230,7 @@ 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
# Stopping specmode
if self.cfg_spec_mode():
UHFQC.spec_mode_off()
self._prep_ro_pulse(upload=True)
Expand Down Expand Up @@ -1658,7 +1660,8 @@ def measure_rabi_vsm(self, MC=None, amps=np.linspace(0.2, 2.0, 31),
mod_out, ch_in)]
D_par = VSM.parameters['mod{}_ch{}_derivative_amp'.format(
mod_out, ch_in)]
s = swf.two_par_joint_sweep(G_par, D_par, preserve_ratio=True)
s = swf.two_par_joint_sweep(G_par, D_par, preserve_ratio=False)

self.instr_CC.get_instr().eqasm_program(p.filename)
MC.set_sweep_function(s)
MC.set_sweep_points(amps)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,8 @@ def add_calibration_parameters(self):

doc_var = 'Attenuation value (in dB) for the {p} ' \
'input of channel {c} ' \
'of module {m}.'.format(p=pulse, c=channel, m=mod)
'of module {m}.\nN.B. Safe range: '\
'0.2<=v<=2.0'.format(p=pulse, c=channel, m=mod)
var_name = '_'+ch_name + '_{p}_att_db'.format(p=pulse)
var_scpi = ch_scpi + ':{p}:ATTENUATION:DB'.format(p=pulse.upper())
scpi_name = 'CALIBRATION' + var_scpi
Expand All @@ -246,7 +247,8 @@ def add_calibration_parameters(self):
get_cmd=scpi_name + '?',
set_cmd=scpi_name + ' {}',
get_parser=float,
vals=validators.Numbers(min_value=0.2, max_value=2.0))
vals=validators.Numbers(min_value=0.2,
max_value=3.0))

doc_var = 'Phase value (in rad) for the {p} ' \
'input of channel {c} ' \
Expand Down

0 comments on commit 9b68e01

Please sign in to comment.