def load_test_waveform(self): self.awg.delete_all_waveforms() self.awg.get_id() #Sometimes AWGs are slow. If it responds it's ready. length = abs(int(1e9/self.if_freq *100)) qubit_info = mclient.get_qubit_info(self.qubit_info.get_name()) s = sequencer.Sequence() s.append(sequencer.Combined([ sequencer.Constant(length, 0.25, chan=qubit_info.sideband_channels[0]), sequencer.Constant(length, 0.25, chan=qubit_info.sideband_channels[1])])) s = sequencer.Sequencer(s) s.add_ssb(qubit_info.ssb) seqs = s.render() self.seqs = seqs l = awgloader.AWGLoader(bulkload=config.awg_bulkload) base = 1 for i in range(1, 5): awg = instruments['AWG%d'%i] if awg: chanmap = {1:base, 2:base+1, 3:base+2, 4:base+3} logging.info('Adding AWG%d, channel map: %s', i, chanmap) l.add_awg(awg, chanmap) base += 4 l.load(seqs) l.run()
def generate(self, plot=False): self._generated = True sequencer.Sequence.PRINT_EXTENDED = True sequencer.Pulse.RANGE_ACTION = sequencer.IGNORE s = sequencer.Sequencer(self.seq, minlen=0, ch_align=False) s.add_required_channel([0, 1, 2, 3, 'm0', 'master']) seqs = s.render(debug=False) if plot and 0: s.print_seqs(seqs) s.plot_seqs(seqs) # Demod and integration tables ssig = ins_yng.get_demod_scale_sig() sref = ins_yng.get_demod_scale_ref() YngwieEncoding.generate_demodulation_table(self.table_prefix, relative_phase=np.pi/180*90, amplitudes=[ssig,sref]) fg = fpgagenerator.FPGAGenerator(self.table_prefix, integration=self.integrate_log, nmodes=ins_yng.get_nmodes(), nchannels=ins_yng.get_noutputs()) fg.generate(seqs, plot=plot)
Qswitch_info1B, cavity_info1B, ]) Qfun.measure() if 0: # load sequence to AWG2 import awgloader seq = ge(np.pi, 0) s = sequencer.Sequence() s.append(sequencer.Join([sequencer.Constant(250, 1, chan=3), seq])) # s.append(seq) l = awgloader.AWGLoader() awg = mclient.instruments['AWG1'] # awg = mclient.instruments['AWG2'] l.add_awg(awg, {1: 1, 2: 2, 3: 3, 4: 4}) s = sequencer.Sequencer(s) s = s.render() l.load(s) bla if 1: iqg = 40.02 + 50.77j iqe = 8.02 + 1.21j iqg_actual = iqg - (iqe - iqg) / 89.0 * 5.0 iqe_actual = iqe + (iqe - iqg) / 88.0 * 6.0 readout.set_IQe(iqe_actual) readout.set_IQg(iqg_actual) readout.set_IQe_radius(np.abs(iqe_actual - iqg_actual) / 2) if 1: readout.set_IQe(-39.4 + 36.7j)