From 3201aba42e27a50dd1659577a48432fe4e1c2ebc Mon Sep 17 00:00:00 2001 From: elrama- Date: Wed, 11 Apr 2018 14:55:53 +0200 Subject: [PATCH] Testing undoing the command --- .../qubit_objects/CCL_Transmon.py | 92 +++++++------------ 1 file changed, 35 insertions(+), 57 deletions(-) diff --git a/pycqed/instrument_drivers/meta_instrument/qubit_objects/CCL_Transmon.py b/pycqed/instrument_drivers/meta_instrument/qubit_objects/CCL_Transmon.py index f48a71c90b..2ce855b81f 100644 --- a/pycqed/instrument_drivers/meta_instrument/qubit_objects/CCL_Transmon.py +++ b/pycqed/instrument_drivers/meta_instrument/qubit_objects/CCL_Transmon.py @@ -847,74 +847,52 @@ def _prep_td_sources(self): self.instr_LO_mw.get_instr().power.set(self.mw_pow_td_source.get()) def _prep_mw_pulses(self): - # 1. Gets instruments and prepares cases MW_LutMan = self.instr_LutMan_MW.get_instr() - AWG = MW_LutMan.AWG.get_instr() - do_prepare = self.cfg_prepare_mw_awg() - using_QWG = (AWG.__class__.__name__ == 'QuTech_AWG_Module') - using_VSM = self.cfg_with_vsm() - # 2. Prepares map and parameters for waveforms - # (except pi-pulse amp, which depends on VSM usage) + # QWG lutman has hardcoded channels. + if hasattr(MW_LutMan, 'channel_GI'): + # 4-channels are used for VSM based AWG's. + MW_LutMan.channel_GI(0+self.mw_awg_ch()) + MW_LutMan.channel_GQ(1+self.mw_awg_ch()) + MW_LutMan.channel_DI(2+self.mw_awg_ch()) + MW_LutMan.channel_DQ(3+self.mw_awg_ch()) + # updating the lutmap is required to make sure channels are correct MW_LutMan.set_default_lutmap() + + # Pulse pars + MW_LutMan.mw_amp180(self.mw_amp180()) MW_LutMan.mw_amp90_scale(self.mw_amp90_scale()) MW_LutMan.mw_gauss_width(self.mw_gauss_width()) MW_LutMan.mw_motzoi(self.mw_motzoi()) MW_LutMan.mw_modulation(self.mw_freq_mod()) + MW_LutMan.spec_amp(self.spec_amp()) - # 3. Does case-dependent things: - # mixers offset+skewness - # pi-pulse amplitude - if using_VSM: - # case with VSM (both QWG and AWG8) - MW_LutMan.mw_amp180(self.mw_amp180()) - MW_LutMan.G_mixer_phi(self.mw_G_mixer_phi()) - MW_LutMan.G_mixer_alpha(self.mw_G_mixer_alpha()) - MW_LutMan.D_mixer_phi(self.mw_D_mixer_phi()) - MW_LutMan.D_mixer_alpha(self.mw_D_mixer_alpha()) - - if using_QWG: - # N.B. This part is QWG specific - MW_LutMan.channel_GI(0+self.mw_awg_ch()) - MW_LutMan.channel_GQ(1+self.mw_awg_ch()) - MW_LutMan.channel_DI(2+self.mw_awg_ch()) - MW_LutMan.channel_DQ(3+self.mw_awg_ch()) - - if hasattr(MW_LutMan, 'channel_GI'): - # 4-channels are used for VSM based AWG's. - AWG.ch1_offset(self.mw_mixer_offs_GI()) - AWG.ch2_offset(self.mw_mixer_offs_GQ()) - AWG.ch3_offset(self.mw_mixer_offs_DI()) - AWG.ch4_offset(self.mw_mixer_offs_DQ()) - else: - # N.B. This part is AWG8 specific - AWG.set('sigouts_{}_offset'.format(self.mw_awg_ch()-1), - self.mw_mixer_offs_GI()) - AWG.set('sigouts_{}_offset'.format(self.mw_awg_ch()+0), - self.mw_mixer_offs_GQ()) - AWG.set('sigouts_{}_offset'.format(self.mw_awg_ch()+1), - self.mw_mixer_offs_DI()) - AWG.set('sigouts_{}_offset'.format(self.mw_awg_ch()+2), - self.mw_mixer_offs_DQ()) - elif using_QWG: - MW_LutMan.mw_amp180(1) - # case without VSM and with QWG - if ((self.mw_G_mixer_phi()!=self.mw_D_mixer_phi()) - or (self.mw_G_mixer_alpha()!=self.mw_D_mixer_alpha())): - logging.warning('CCL_Transmon {}; _prep_mw_pulses: ' - 'no VSM detected, using mixer parameters' - ' from gaussian channel.'.format(self.name)) - MW_LutMan.mixer_phi(self.mw_G_mixer_phi()) - MW_LutMan.mixer_alpha(self.mw_G_mixer_alpha()) - AWG.set('ch{}_offset'.format(MW_LutMan.channel_I()),self.mw_mixer_offs_GI()) - AWG.set('ch{}_offset'.format(MW_LutMan.channel_Q()),self.mw_mixer_offs_GQ()) - MW_LutMan.channel_amp(self.mw_amp180()) - - # 4. reloads the waveforms - if do_prepare: + # Mixer params + MW_LutMan.G_mixer_phi(self.mw_G_mixer_phi()) + MW_LutMan.G_mixer_alpha(self.mw_G_mixer_alpha()) + MW_LutMan.D_mixer_phi(self.mw_D_mixer_phi()) + MW_LutMan.D_mixer_alpha(self.mw_D_mixer_alpha()) + if self.cfg_prepare_mw_awg(): MW_LutMan.load_waveforms_onto_AWG_lookuptable() + AWG = MW_LutMan.AWG.get_instr() + if AWG.__class__.__name__ == 'QuTech_AWG_Module': + # N.B. This part is QWG specific + AWG.ch1_offset(self.mw_mixer_offs_GI()) + AWG.ch2_offset(self.mw_mixer_offs_GQ()) + AWG.ch3_offset(self.mw_mixer_offs_DI()) + AWG.ch4_offset(self.mw_mixer_offs_DQ()) + else: + # N.B. This part is AWG8 specific + AWG.set('sigouts_{}_offset'.format(self.mw_awg_ch()-1), + self.mw_mixer_offs_GI()) + AWG.set('sigouts_{}_offset'.format(self.mw_awg_ch()+0), + self.mw_mixer_offs_GQ()) + AWG.set('sigouts_{}_offset'.format(self.mw_awg_ch()+1), + self.mw_mixer_offs_DI()) + AWG.set('sigouts_{}_offset'.format(self.mw_awg_ch()+2), + self.mw_mixer_offs_DQ()) def _prep_td_configure_VSM(self): # Configure VSM VSM = self.instr_VSM.get_instr()