def build_sequence(self):
        PulseSequence.build_sequence(self)
        wtpts = self.get_waveform_times('qubit drive I')
        mtpts = self.get_marker_times('qubit buffer')
        ftpts = self.get_waveform_times('qubit 1 flux')

        print len(wtpts)
        print len(ftpts)

        for ii, d in enumerate(self.mm_flux_sideband_pts):
            self.delay = d
            self.markers['readout pulse'][ii] = ap2.square(mtpts, 1, self.origin+self.measurement_delay,
                                                           self.measurement_width)
            self.markers['card trigger'][ii] = ap2.square(mtpts, 1,
                                                          self.origin - self.card_delay + self.measurement_delay,
                                                          self.card_trig_width)

            pulse_delay = self.delay + 2* self.flux_pi_length + 100

            self.markers['ch3m1'][ii] = ap2.square(mtpts, 1,self.origin - pulse_delay - self.tek2_delay_time,
                                                          100)
            w=self.pi_length
            a=self.a

            if self.pulse_type == 'square':
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    ap2.sideband(wtpts,
                                 ap2.square(wtpts, a,self.origin - w - 2 * self.ramp_sigma - pulse_delay, w, self.ramp_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase)

                self.markers['qubit buffer'][ii] = ap2.square(mtpts, 1, self.origin - w - 4 * self.ramp_sigma - pulse_delay - 100,
                                                          w + 4 * self.ramp_sigma + 200)

            if self.pulse_type == 'gauss':
                gauss_sigma=w #covention for the width of gauss pulse
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    ap2.sideband(wtpts,
                                 ap2.gauss(wtpts, a,self.origin - 3* gauss_sigma - pulse_delay, gauss_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase)

                self.markers['qubit buffer'][ii] = ap2.square(mtpts, 1, self.origin - 6*gauss_sigma - 100 - pulse_delay ,
                                                          6*gauss_sigma + 200)


            flux_a = self.flux_a
            flux_freq = self.flux_freq
            flux_pi_length = self.flux_pi_length

            if True:
                self.waveforms['qubit 1 flux'][ii] = ap2.sideband(ftpts,
                                     ap2.square(ftpts, flux_a, 15 , flux_pi_length,5), np.zeros(len(ftpts)),
                                      flux_freq, self.phase)[0]
                self.waveforms['qubit 1 flux'][ii] += ap2.sideband(ftpts,
                                     ap2.square(ftpts, flux_a, 3*15+flux_pi_length +self.delay , flux_pi_length,5), np.zeros(len(ftpts)),
                                      flux_freq, self.phase)[0]
            if False:
                flux_gauss = self.flux_w/4
                self.waveforms['qubit 1 flux'][ii] = ap2.sideband(ftpts,
                                 ap2.gauss(ftpts, flux_a,2* flux_gauss , flux_gauss), np.zeros(len(ftpts)),
                                  flux_freq, self.phase)[0]
Exemple #2
0
    def build_sequence(self):
        PulseSequence.build_sequence(self)
        wtpts = self.get_waveform_times('qubit drive I')
        mtpts = self.get_marker_times('qubit buffer')

        for ii, d in enumerate(self.ramsey_pts):
            self.markers['readout pulse'][ii] = ap2.square(
                mtpts, 1, self.origin + self.measurement_delay,
                self.measurement_width)
            self.markers['card trigger'][ii] = ap2.square(
                mtpts, 1,
                self.origin - self.card_delay + self.measurement_delay,
                self.card_trig_width)

            delay = d
            w = self.half_pi_length
            a = self.a

            if self.pulse_type == 'square':
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    np.add(ap2.sideband(wtpts,
                                        ap2.square(wtpts, a, self.origin - w - 2 * self.ramp_sigma, w, self.ramp_sigma),
                                        np.zeros(len(wtpts)),
                                        self.freq, self.phase), ap2.sideband(wtpts,
                                                                             ap2.square(wtpts, a,
                                                                                        self.origin - w - 2 * self.ramp_sigma - delay,
                                                                                        w, self.ramp_sigma),
                                                                             np.zeros(len(wtpts)),
                                                                             self.freq, self.phase))

                self.markers['qubit buffer'][ii] = np.add(
                    ap2.square(mtpts, 1,
                               self.origin - w - 4 * self.ramp_sigma - 100,
                               w + 4 * self.ramp_sigma + 200),
                    (ap2.square(
                        mtpts, 1, self.origin - w - 4 * self.ramp_sigma -
                        delay - 100, w + 4 * self.ramp_sigma + 200)))
                high_values_indices = self.markers['qubit buffer'][ii] > 1
                self.markers['qubit buffer'][ii][high_values_indices] = 1

            if self.pulse_type == 'gauss':
                gauss_sigma = w
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    np.add(ap2.sideband(wtpts,
                                        ap2.gauss(wtpts, a, self.origin - 3 * gauss_sigma, w), np.zeros(len(wtpts)),
                                        self.freq, self.phase), ap2.sideband(wtpts,
                                                                             ap2.gauss(wtpts, a,
                                                                                       self.origin - 3 * gauss_sigma - delay,
                                                                                       w), np.zeros(len(wtpts)),
                                                                             self.freq, self.phase))

                self.markers['qubit buffer'][ii] = np.add(
                    ap2.square(mtpts, 1, self.origin - 6 * gauss_sigma - 100,
                               6 * gauss_sigma + 200),
                    (ap2.square(mtpts, 1, self.origin - 6 * gauss_sigma -
                                delay - 100, 6 * gauss_sigma + 200)))
                high_values_indices = self.markers['qubit buffer'][ii] > 1
                self.markers['qubit buffer'][ii][high_values_indices] = 1
Exemple #3
0
    def build_sequence(self):
        PulseSequence.build_sequence(self)
        wtpts = self.get_waveform_times('qubit drive I')
        mtpts = self.get_marker_times('qubit buffer')
        ftpts = self.get_waveform_times('qubit 1 flux')

        print(len(wtpts))
        print(len(ftpts))

        for ii, d in enumerate(self.mm_flux_sideband_freq_pts):
            self.markers['readout pulse'][ii] = ap2.square(mtpts, 1, self.origin+self.measurement_delay,
                                                           self.measurement_width)
            self.markers['card trigger'][ii] = ap2.square(mtpts, 1,
                                                          self.origin - self.card_delay + self.measurement_delay,
                                                          self.card_trig_width)

            pulse_delay = self.flux_w + 100

            self.markers['ch3m1'][ii] = ap2.square(mtpts, 1,self.origin - pulse_delay - self.tek2_delay_time,
                                                          100)
            w=self.pi_length
            a=self.a

            if self.pulse_type == 'square':
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    ap2.sideband(wtpts,
                                 ap2.square(wtpts, a,self.origin - w - 2 * self.ramp_sigma - pulse_delay, w, self.ramp_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase)

                self.markers['qubit buffer'][ii] = ap2.square(mtpts, 1, self.origin - w - 4 * self.ramp_sigma - pulse_delay - 100,
                                                          w + 4 * self.ramp_sigma + 200)

            if self.pulse_type == 'gauss':
                gauss_sigma=w #covention for the width of gauss pulse
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    ap2.sideband(wtpts,
                                 ap2.gauss(wtpts, a,self.origin - 3* gauss_sigma - pulse_delay, gauss_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase)

                self.markers['qubit buffer'][ii] = ap2.square(mtpts, 1, self.origin - 6*gauss_sigma - 100 - pulse_delay ,
                                                          6*gauss_sigma + 200)

            flux_a = 1
            flux_freq = d/1e9
            flux_gauss = self.flux_w/6
            self.waveforms['qubit 1 flux'][ii] = ap2.sideband(ftpts,
                                 ap2.gauss(ftpts, flux_a,3* flux_gauss , flux_gauss), np.zeros(len(ftpts)),
                                  flux_freq, self.phase)[0]
    def build_sequence(self):
        PulseSequence.build_sequence(self)

        wtpts = self.get_waveform_times('qubit drive I')
        mtpts = self.get_marker_times('qubit buffer')

        for ii, d in enumerate(self.t1_pts):
            self.markers['readout pulse'][ii] = ap2.square(mtpts, 1, self.origin+self.measurement_delay,
                                                           self.measurement_width)
            self.markers['card trigger'][ii] = ap2.square(mtpts, 1,
                                                          self.origin - self.card_delay + self.measurement_delay,
                                                          self.card_trig_width)

            delay = d
            w=self.pi_length
            a=self.a

            if self.pulse_type == 'square':
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    ap2.sideband(wtpts,
                                 ap2.square(wtpts, a,self.origin - w - 2 * self.ramp_sigma - delay, w, self.ramp_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase)

                self.markers['qubit buffer'][ii] = ap2.square(mtpts, 1, self.origin - w - 4 * self.ramp_sigma - delay - 100,
                                                          w + 4 * self.ramp_sigma + 200)

            if self.pulse_type == 'gauss':
                gauss_sigma=w #covention for the width of gauss pulse
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    ap2.sideband(wtpts,
                                 ap2.gauss(wtpts, a,self.origin - 3* gauss_sigma - delay, gauss_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase)

                self.markers['qubit buffer'][ii] = ap2.square(mtpts, 1, self.origin - 6*gauss_sigma - 100 - delay ,
                                                          6*gauss_sigma + 200)
    def build_sequence(self):
        PulseSequence.build_sequence(self)
        wtpts = self.get_waveform_times('qubit drive I')
        mtpts = self.get_marker_times('qubit buffer')

        for ii, d in enumerate(self.ramsey_pts):
            self.markers['readout pulse'][ii] = ap2.square(mtpts, 1, self.origin+self.measurement_delay,
                                                           self.measurement_width)
            self.markers['card trigger'][ii] = ap2.square(mtpts, 1,
                                                          self.origin - self.card_delay + self.measurement_delay,
                                                          self.card_trig_width)

            delay = d
            w=self.half_pi_length
            a=self.a

            if self.pulse_type == 'square':
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    np.add(ap2.sideband(wtpts,
                                 ap2.square(wtpts, a,self.origin - w - 2 * self.ramp_sigma, w, self.ramp_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase),ap2.sideband(wtpts,
                                 ap2.square(wtpts, a,self.origin - w - 2 * self.ramp_sigma - delay, w, self.ramp_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase))

                self.markers['qubit buffer'][ii] = np.add(ap2.square(mtpts, 1, self.origin - w - 4 * self.ramp_sigma - 100,
                                                          w + 4 * self.ramp_sigma + 200),(ap2.square(mtpts, 1, self.origin - w - 4 * self.ramp_sigma - delay - 100,
                                                          w + 4 * self.ramp_sigma + 200)))
                high_values_indices = self.markers['qubit buffer'][ii] > 1
                self.markers['qubit buffer'][ii][high_values_indices] = 1

            if self.pulse_type == 'gauss':
                gauss_sigma = w
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    np.add(ap2.sideband(wtpts,
                                 ap2.gauss(wtpts, a,self.origin - 3* gauss_sigma, w), np.zeros(len(wtpts)),
                                  self.freq, self.phase),ap2.sideband(wtpts,
                                 ap2.gauss(wtpts, a,self.origin - 3* gauss_sigma - delay, w), np.zeros(len(wtpts)),
                                  self.freq, self.phase))

                self.markers['qubit buffer'][ii] = np.add(ap2.square(mtpts, 1, self.origin - 6*gauss_sigma-100,
                                                         6*gauss_sigma + 200),(ap2.square(mtpts, 1, self.origin - 6*gauss_sigma - delay - 100,
                                                          6*gauss_sigma + 200)))
                high_values_indices = self.markers['qubit buffer'][ii] > 1
                self.markers['qubit buffer'][ii][high_values_indices] = 1
    def build_sequence(self):
        PulseSequence.build_sequence(self)

        wtpts = self.get_waveform_times('qubit drive I')
        mtpts = self.get_marker_times('qubit buffer')
        ftpts = self.get_waveform_times('qubit 1 flux')

        for ii, d in enumerate(self.rabi_pts):

            self.markers['ch3m1'][ii] = ap2.square(mtpts, 1,self.origin +self.measurement_delay - self.tek2_delay_time,
                                                          100)
            self.markers['card trigger'][ii] = ap2.square(mtpts, 1,
                                                          self.origin - self.card_delay + self.measurement_delay,
                                                          self.card_trig_width)

            if self.sweep_type.upper() == 'time'.upper():
                a = self.a
                w = d
            else:
                a = d
                w = self.w

            if self.pulse_type=='square':
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    ap2.sideband(wtpts,
                                 ap2.square(wtpts, a,self.origin - w - 2 * self.ramp_sigma, w, self.ramp_sigma), np.zeros(len(wtpts)),
                                 self.freq, self.phase)

                self.markers['qubit buffer'][ii] = ap2.square(mtpts, 1, self.origin - w - 4 * self.ramp_sigma - 100,
                                                          w + 4 * self.ramp_sigma + 200)

            if self.pulse_type=='gauss':
                gauss_sigma=w #covention for the width of gauss pulse
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    ap2.sideband(wtpts,
                                 ap2.gauss(wtpts, a,self.origin - 3* gauss_sigma , gauss_sigma), np.zeros(len(wtpts)),
                                 self.freq, self.phase)

                self.markers['qubit buffer'][ii] = ap2.square(mtpts, 1, self.origin - 6*gauss_sigma - 100,
                                                          6*gauss_sigma + 200)

            self.waveforms['qubit 1 flux'][ii] = ap2.sideband(ftpts,
                                     ap2.square(ftpts, 1, 15 , 3000,5), np.zeros(len(ftpts)),
                                      self.readout_freq, self.phase)[0]
Exemple #7
0
    def build_sequence(self):
        PulseSequence.build_sequence(self)

        wtpts = self.get_waveform_times('qubit drive I')
        mtpts = self.get_marker_times('qubit buffer')

        ii = 0
        self.markers['readout pulse'][ii] = ap2.square(
            mtpts, 1, self.origin + self.measurement_delay,
            self.measurement_width)
        self.markers['card trigger'][ii] = ap2.square(
            mtpts, 1, self.origin - self.card_delay + self.measurement_delay,
            self.card_trig_width)

        ef_length = self.efprobe_len
        w = self.pi_length
        a = self.a

        if self.pulse_type == 'square':

            self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                ap2.sideband(wtpts,
                             ap2.square(wtpts, a, self.origin - w - 2 * self.ramp_sigma, w, self.ramp_sigma),
                             np.zeros(len(wtpts)),
                             self.freq, self.phase)

            self.markers['qubit buffer'][ii] = ap2.square(
                mtpts, 1, self.origin - w - 4 * self.ramp_sigma - 100,
                w + 4 * self.ramp_sigma + 200)

            self.waveforms['qubit drive I'][ii] += ap2.sideband(
                wtpts,
                ap2.square(wtpts, a,
                           self.origin - ef_length - w - 3 * self.ramp_sigma,
                           ef_length, self.ramp_sigma), np.zeros(len(wtpts)),
                self.fe_sideband_freq, self.phase)[0]
            self.waveforms['qubit drive Q'][ii] += ap2.sideband(
                wtpts,
                ap2.square(wtpts, a,
                           self.origin - ef_length - w - 3 * self.ramp_sigma,
                           ef_length, self.ramp_sigma), np.zeros(len(wtpts)),
                self.fe_sideband_freq, self.phase)[1]
            self.markers['qubit buffer'][ii] += ap2.square(
                mtpts, 1,
                self.origin - ef_length - w - 4 * self.ramp_sigma - 100,
                ef_length + 4 * self.ramp_sigma + 200)

            if self.ge_pi:
                self.waveforms['qubit drive I'][ii] += ap2.sideband(
                    wtpts,
                    ap2.square(
                        wtpts, a,
                        self.origin - ef_length - 2 * w - 3 * self.ramp_sigma,
                        w, self.ramp_sigma), np.zeros(len(wtpts)), self.freq,
                    self.phase)[0]
                self.waveforms['qubit drive Q'][ii] += ap2.sideband(
                    wtpts,
                    ap2.square(
                        wtpts, a,
                        self.origin - ef_length - 2 * w - 3 * self.ramp_sigma,
                        w, self.ramp_sigma), np.zeros(len(wtpts)), self.freq,
                    self.phase)[1]
                self.markers['qubit buffer'][ii] += ap2.square(
                    mtpts, 1, self.origin - ef_length - 2 * w -
                    8 * self.ramp_sigma - 100, w + 4 * self.ramp_sigma + 200)
            high_values_indices = self.markers['qubit buffer'][ii] > 1
            self.markers['qubit buffer'][ii][high_values_indices] = 1

        if self.pulse_type == 'gauss':
            gauss_sigma = w  #covention for the width of gauss pulse
            self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                ap2.sideband(wtpts,
                             ap2.gauss(wtpts, a, self.origin - 3 * gauss_sigma, gauss_sigma), np.zeros(len(wtpts)),
                             self.freq, self.phase)

            self.markers['qubit buffer'][ii] = ap2.square(
                mtpts, 1, self.origin - 6 * gauss_sigma - 100,
                6 * gauss_sigma + 200)

            self.waveforms['qubit drive I'][ii] += ap2.sideband(
                wtpts,
                ap2.gauss(wtpts, a,
                          self.origin - 3 * ef_length - 6 * gauss_sigma,
                          ef_length), np.zeros(len(wtpts)),
                self.fe_sideband_freq, self.phase)[0]
            self.waveforms['qubit drive Q'][ii] += ap2.sideband(
                wtpts,
                ap2.gauss(wtpts, a,
                          self.origin - 3 * ef_length - 6 * gauss_sigma,
                          ef_length), np.zeros(len(wtpts)),
                self.fe_sideband_freq, self.phase)[1]
            self.markers['qubit buffer'][ii] += ap2.square(
                mtpts, 1, self.origin - 6 * ef_length - 6 * gauss_sigma - 100,
                6 * ef_length + 200)

            if self.ge_pi:
                self.waveforms['qubit drive I'][ii] += ap2.sideband(
                    wtpts,
                    ap2.gauss(
                        wtpts, a, self.origin - 3 * gauss_sigma -
                        6 * ef_length - 6 * gauss_sigma, gauss_sigma),
                    np.zeros(len(wtpts)), self.freq, self.phase)[0]
                self.waveforms['qubit drive Q'][ii] += ap2.sideband(
                    wtpts,
                    ap2.gauss(
                        wtpts, a, self.origin - 3 * gauss_sigma -
                        6 * ef_length - 6 * gauss_sigma, gauss_sigma),
                    np.zeros(len(wtpts)), self.freq, self.phase)[1]
                self.markers['qubit buffer'][ii] += ap2.square(
                    mtpts, 1, self.origin - 6 * gauss_sigma - 6 * ef_length -
                    6 * gauss_sigma - 100, 6 * gauss_sigma + 200)
            high_values_indices = self.markers['qubit buffer'][ii] > 1
            self.markers['qubit buffer'][ii][high_values_indices] = 1
    def build_sequence(self):
        PulseSequence.build_sequence(self)

        wtpts = self.get_waveform_times('qubit drive I')
        mtpts = self.get_marker_times('qubit buffer')

        ii =0
        self.markers['readout pulse'][ii] = ap2.square(mtpts, 1, self.origin+self.measurement_delay,
                                                       self.measurement_width)
        self.markers['card trigger'][ii] = ap2.square(mtpts, 1,
                                                      self.origin - self.card_delay + self.measurement_delay,
                                                      self.card_trig_width)

        ef_length = self.efprobe_len
        w=self.pi_length
        a=self.a

        if self.pulse_type == 'square':

            self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                ap2.sideband(wtpts,
                             ap2.square(wtpts, a,self.origin - w - 2 * self.ramp_sigma, w, self.ramp_sigma), np.zeros(len(wtpts)),
                              self.freq, self.phase)

            self.markers['qubit buffer'][ii] = ap2.square(mtpts, 1, self.origin - w - 4 * self.ramp_sigma - 100,
                                                      w + 4 * self.ramp_sigma + 200)

            self.waveforms['qubit drive I'][ii] += ap2.sideband(wtpts,
                             ap2.square(wtpts, a,self.origin - ef_length - w - 3*self.ramp_sigma, ef_length, self.ramp_sigma), np.zeros(len(wtpts)),
                              self.fe_sideband_freq, self.phase)[0]
            self.waveforms['qubit drive Q'][ii] += ap2.sideband(wtpts,
                             ap2.square(wtpts, a,self.origin - ef_length - w - 3*self.ramp_sigma, ef_length, self.ramp_sigma), np.zeros(len(wtpts)),
                              self.fe_sideband_freq, self.phase)[1]
            self.markers['qubit buffer'][ii] += ap2.square(mtpts, 1, self.origin - ef_length - w - 4 * self.ramp_sigma- 100 ,
                                                      ef_length + 4 * self.ramp_sigma+ 200)

            if self.ge_pi:
                self.waveforms['qubit drive I'][ii] += ap2.sideband(wtpts,
                                 ap2.square(wtpts, a,self.origin - ef_length - 2*w - 3*self.ramp_sigma, w,self.ramp_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase)[0]
                self.waveforms['qubit drive Q'][ii] += ap2.sideband(wtpts,
                                 ap2.square(wtpts, a,self.origin - ef_length - 2*w - 3*self.ramp_sigma , w,self.ramp_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase)[1]
                self.markers['qubit buffer'][ii] += ap2.square(mtpts, 1, self.origin - ef_length - 2*w - 8 * self.ramp_sigma - 100 ,
                                                      w + 4 * self.ramp_sigma+ 200)
            high_values_indices = self.markers['qubit buffer'][ii] > 1
            self.markers['qubit buffer'][ii][high_values_indices] = 1

        if self.pulse_type == 'gauss':
            gauss_sigma=w #covention for the width of gauss pulse
            self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                ap2.sideband(wtpts,
                             ap2.gauss(wtpts, a,self.origin - 3* gauss_sigma , gauss_sigma), np.zeros(len(wtpts)),
                              self.freq, self.phase)

            self.markers['qubit buffer'][ii] = ap2.square(mtpts, 1, self.origin - 6*gauss_sigma - 100 ,
                                                      6*gauss_sigma + 200)

            self.waveforms['qubit drive I'][ii] += ap2.sideband(wtpts,
                             ap2.gauss(wtpts, a,self.origin - 3* ef_length - 6*gauss_sigma, ef_length), np.zeros(len(wtpts)),
                              self.fe_sideband_freq, self.phase)[0]
            self.waveforms['qubit drive Q'][ii] += ap2.sideband(wtpts,
                             ap2.gauss(wtpts, a,self.origin - 3* ef_length - 6*gauss_sigma, ef_length), np.zeros(len(wtpts)),
                              self.fe_sideband_freq, self.phase)[1]
            self.markers['qubit buffer'][ii] += ap2.square(mtpts, 1, self.origin - 6*ef_length - 6*gauss_sigma - 100 ,
                                                      6*ef_length+ 200)

            if self.ge_pi:
                self.waveforms['qubit drive I'][ii] += ap2.sideband(wtpts,
                                 ap2.gauss(wtpts, a,self.origin - 3* gauss_sigma - 6*ef_length - 6*gauss_sigma, gauss_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase)[0]
                self.waveforms['qubit drive Q'][ii] += ap2.sideband(wtpts,
                                 ap2.gauss(wtpts, a,self.origin - 3* gauss_sigma - 6*ef_length - 6*gauss_sigma , gauss_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase)[1]
                self.markers['qubit buffer'][ii] += ap2.square(mtpts, 1, self.origin - 6*gauss_sigma - 6*ef_length - 6*gauss_sigma - 100 ,
                                                          6*gauss_sigma + 200)
            high_values_indices = self.markers['qubit buffer'][ii] > 1
            self.markers['qubit buffer'][ii][high_values_indices] = 1
    def build_sequence(self):
        PulseSequence.build_sequence(self)
        wtpts = self.get_waveform_times('qubit drive I')
        mtpts = self.get_marker_times('qubit buffer')
        ftpts = self.get_waveform_times('qubit 1 flux')

        print(len(wtpts))
        print(len(ftpts))

        for ii, d in enumerate(self.mm_flux_sideband_pts):
            self.sb1_pulse = d
            self.markers['readout pulse'][ii] = ap2.square(mtpts, 1, self.origin+self.measurement_delay,
                                                           self.measurement_width)
            self.markers['card trigger'][ii] = ap2.square(mtpts, 1,
                                                          self.origin - self.card_delay + self.measurement_delay,
                                                          self.card_trig_width)

            if self.measure_mode == 1:
                pulse_delay = self.sb1_pulse*self.flux_pi_length_1 + self.flux_pi_length_2 + self.flux_pi_length_1  + 30*3 + 100
            if self.measure_mode == 2:
                pulse_delay = self.sb1_pulse*self.flux_pi_length_1 + self.flux_pi_length_2 + self.flux_pi_length_2  + 30*3 + 100

            self.markers['ch3m1'][ii] = ap2.square(mtpts, 1,self.origin - pulse_delay - self.tek2_delay_time,
                                                          100)
            w=self.pi_length
            a=self.a

            if self.pulse_type == 'square':
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    ap2.sideband(wtpts,
                                 ap2.square(wtpts, a,self.origin - w - 2 * self.ramp_sigma - pulse_delay, w, self.ramp_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase)

                self.markers['qubit buffer'][ii] = ap2.square(mtpts, 1, self.origin - w - 4 * self.ramp_sigma - pulse_delay - 100,
                                                          w + 4 * self.ramp_sigma + 200)

            if self.pulse_type == 'gauss':
                gauss_sigma=w #covention for the width of gauss pulse
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    ap2.sideband(wtpts,
                                 ap2.gauss(wtpts, a,self.origin - 3* gauss_sigma - pulse_delay, gauss_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase)

                # self.waveforms['qubit drive I'][ii] +=ap2.sideband(wtpts,
                #                  ap2.gauss(wtpts, a,self.origin - 3* gauss_sigma, gauss_sigma), np.zeros(len(wtpts)),
                #                   self.freq, self.phase)[0]
                # self.waveforms['qubit drive Q'][ii] += ap2.sideband(wtpts,
                #                  ap2.gauss(wtpts, a,self.origin - 3* gauss_sigma, gauss_sigma), np.zeros(len(wtpts)),
                #                   self.freq, self.phase)[1]

                self.markers['qubit buffer'][ii] = ap2.square(mtpts, 1, self.origin - 6*gauss_sigma - 100 - pulse_delay ,
                                                          6*gauss_sigma + 200)
                # self.markers['qubit buffer'][ii] += ap2.square(mtpts, 1, self.origin - 6*gauss_sigma - 100,
                #                                           6*gauss_sigma + 200)


            flux_a_1 = self.flux_a_1
            flux_freq_1 = self.flux_freq_1
            flux_pi_length_1 = self.flux_pi_length_1
            dc_offset_freq_1 = self.dc_offset_freq_1

            flux_a_2 = self.flux_a_2
            flux_freq_2 = self.flux_freq_2
            flux_pi_length_2 = self.flux_pi_length_2
            dc_offset_freq_2 = self.dc_offset_freq_2

            if True:
                self.waveforms['qubit 1 flux'][ii] = ap2.sideband(ftpts,
                                     ap2.square(ftpts, flux_a_1, 15 , self.sb1_pulse*flux_pi_length_1,5), np.zeros(len(ftpts)),
                                      flux_freq_1, self.phase)[0]
                self.waveforms['qubit 1 flux'][ii] += ap2.sideband(ftpts,
                                     ap2.square(ftpts, flux_a_2, 3*15+self.sb1_pulse*flux_pi_length_1 , flux_pi_length_2,5), np.zeros(len(ftpts)),
                                      flux_freq_2, self.phase + 360*(dc_offset_freq_2)*(self.sb1_pulse*flux_pi_length_1+2*15)/1e9)[1]
                if self.measure_mode == 1:
                    self.waveforms['qubit 1 flux'][ii] += ap2.sideband(ftpts,
                                     ap2.square(ftpts, flux_a_1, 5*15+self.sb1_pulse*flux_pi_length_1 + flux_pi_length_2 , flux_pi_length_1,5), np.zeros(len(ftpts)),
                                      flux_freq_1, self.phase + 360*(dc_offset_freq_1)*(self.sb1_pulse*flux_pi_length_1 + flux_pi_length_2+4*15)/1e9)[1]
                if self.measure_mode == 2:
                    self.waveforms['qubit 1 flux'][ii] += ap2.sideband(ftpts,
                                     ap2.square(ftpts, flux_a_2, 5*15+self.sb1_pulse*flux_pi_length_1+ flux_pi_length_2 , flux_pi_length_2,5), np.zeros(len(ftpts)),
                                      flux_freq_2, self.phase + 360*(dc_offset_freq_2)*(self.sb1_pulse*flux_pi_length_1 + flux_pi_length_2+4*15)/1e9)[1]
            if False:
                flux_gauss = self.flux_w/4
                self.waveforms['qubit 1 flux'][ii] = ap2.sideband(ftpts,
                                 ap2.gauss(ftpts, flux_a,2* flux_gauss , flux_gauss), np.zeros(len(ftpts)),
                                  flux_freq, self.phase)[0]
Exemple #10
0
    def build_sequence(self):
        PulseSequence.build_sequence(self)
        wtpts = self.get_waveform_times('qubit drive I')
        mtpts = self.get_marker_times('qubit buffer')
        ftpts = self.get_waveform_times('qubit 1 flux')

        print(len(wtpts))
        print(len(ftpts))

        for ii, d in enumerate(self.mm_flux_sideband_pts):
            self.sb1_pulse = d
            self.markers['readout pulse'][ii] = ap2.square(
                mtpts, 1, self.origin + self.measurement_delay,
                self.measurement_width)
            self.markers['card trigger'][ii] = ap2.square(
                mtpts, 1,
                self.origin - self.card_delay + self.measurement_delay,
                self.card_trig_width)

            if self.measure_mode == 1:
                pulse_delay = self.sb1_pulse * self.flux_pi_length_1 + self.flux_pi_length_2 + self.flux_pi_length_1 + 30 * 3 + 100
            if self.measure_mode == 2:
                pulse_delay = self.sb1_pulse * self.flux_pi_length_1 + self.flux_pi_length_2 + self.flux_pi_length_2 + 30 * 3 + 100

            self.markers['ch3m1'][ii] = ap2.square(
                mtpts, 1, self.origin - pulse_delay - self.tek2_delay_time,
                100)
            w = self.pi_length
            a = self.a

            if self.pulse_type == 'square':
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    ap2.sideband(wtpts,
                                 ap2.square(wtpts, a,self.origin - w - 2 * self.ramp_sigma - pulse_delay, w, self.ramp_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase)

                self.markers['qubit buffer'][ii] = ap2.square(
                    mtpts, 1,
                    self.origin - w - 4 * self.ramp_sigma - pulse_delay - 100,
                    w + 4 * self.ramp_sigma + 200)

            if self.pulse_type == 'gauss':
                gauss_sigma = w  #covention for the width of gauss pulse
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    ap2.sideband(wtpts,
                                 ap2.gauss(wtpts, a,self.origin - 3* gauss_sigma - pulse_delay, gauss_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase)

                # self.waveforms['qubit drive I'][ii] +=ap2.sideband(wtpts,
                #                  ap2.gauss(wtpts, a,self.origin - 3* gauss_sigma, gauss_sigma), np.zeros(len(wtpts)),
                #                   self.freq, self.phase)[0]
                # self.waveforms['qubit drive Q'][ii] += ap2.sideband(wtpts,
                #                  ap2.gauss(wtpts, a,self.origin - 3* gauss_sigma, gauss_sigma), np.zeros(len(wtpts)),
                #                   self.freq, self.phase)[1]

                self.markers['qubit buffer'][ii] = ap2.square(
                    mtpts, 1,
                    self.origin - 6 * gauss_sigma - 100 - pulse_delay,
                    6 * gauss_sigma + 200)
                # self.markers['qubit buffer'][ii] += ap2.square(mtpts, 1, self.origin - 6*gauss_sigma - 100,
                #                                           6*gauss_sigma + 200)

            flux_a_1 = self.flux_a_1
            flux_freq_1 = self.flux_freq_1
            flux_pi_length_1 = self.flux_pi_length_1
            dc_offset_freq_1 = self.dc_offset_freq_1

            flux_a_2 = self.flux_a_2
            flux_freq_2 = self.flux_freq_2
            flux_pi_length_2 = self.flux_pi_length_2
            dc_offset_freq_2 = self.dc_offset_freq_2

            if True:
                self.waveforms['qubit 1 flux'][ii] = ap2.sideband(
                    ftpts,
                    ap2.square(ftpts, flux_a_1, 15,
                               self.sb1_pulse * flux_pi_length_1, 5),
                    np.zeros(len(ftpts)), flux_freq_1, self.phase)[0]
                self.waveforms['qubit 1 flux'][ii] += ap2.sideband(
                    ftpts,
                    ap2.square(ftpts, flux_a_2,
                               3 * 15 + self.sb1_pulse * flux_pi_length_1,
                               flux_pi_length_2, 5), np.zeros(len(ftpts)),
                    flux_freq_2, self.phase + 360 * (dc_offset_freq_2) *
                    (self.sb1_pulse * flux_pi_length_1 + 2 * 15) / 1e9)[1]
                if self.measure_mode == 1:
                    self.waveforms['qubit 1 flux'][ii] += ap2.sideband(
                        ftpts,
                        ap2.square(
                            ftpts, flux_a_1,
                            5 * 15 + self.sb1_pulse * flux_pi_length_1 +
                            flux_pi_length_2, flux_pi_length_1, 5),
                        np.zeros(len(ftpts)), flux_freq_1,
                        self.phase + 360 * (dc_offset_freq_1) *
                        (self.sb1_pulse * flux_pi_length_1 + flux_pi_length_2 +
                         4 * 15) / 1e9)[1]
                if self.measure_mode == 2:
                    self.waveforms['qubit 1 flux'][ii] += ap2.sideband(
                        ftpts,
                        ap2.square(
                            ftpts, flux_a_2,
                            5 * 15 + self.sb1_pulse * flux_pi_length_1 +
                            flux_pi_length_2, flux_pi_length_2, 5),
                        np.zeros(len(ftpts)), flux_freq_2,
                        self.phase + 360 * (dc_offset_freq_2) *
                        (self.sb1_pulse * flux_pi_length_1 + flux_pi_length_2 +
                         4 * 15) / 1e9)[1]
            if False:
                flux_gauss = self.flux_w / 4
                self.waveforms['qubit 1 flux'][ii] = ap2.sideband(
                    ftpts, ap2.gauss(ftpts, flux_a,
                                     2 * flux_gauss, flux_gauss),
                    np.zeros(len(ftpts)), flux_freq, self.phase)[0]
Exemple #11
0
    def build_sequence(self):
        PulseSequence.build_sequence(self)
        wtpts = self.get_waveform_times('qubit drive I')
        mtpts = self.get_marker_times('qubit buffer')
        ftpts = self.get_waveform_times('qubit 1 flux')

        print(len(wtpts))
        print(len(ftpts))

        for ii, d in enumerate(self.mm_flux_sideband_pts):
            self.delay = d
            self.markers['readout pulse'][ii] = ap2.square(
                mtpts, 1, self.origin + self.measurement_delay,
                self.measurement_width)
            self.markers['card trigger'][ii] = ap2.square(
                mtpts, 1,
                self.origin - self.card_delay + self.measurement_delay,
                self.card_trig_width)

            pulse_delay = self.delay + 2 * self.flux_pi_length + 6 * self.half_pi_length + 100

            self.markers['ch3m1'][ii] = ap2.square(
                mtpts, 1, self.origin - pulse_delay - self.tek2_delay_time,
                100)
            w = self.half_pi_length
            a = self.a

            if self.pulse_type == 'square':
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    ap2.sideband(wtpts,
                                 ap2.square(wtpts, a,self.origin - w - 2 * self.ramp_sigma - pulse_delay, w, self.ramp_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase)

                self.markers['qubit buffer'][ii] = ap2.square(
                    mtpts, 1,
                    self.origin - w - 4 * self.ramp_sigma - pulse_delay - 100,
                    w + 4 * self.ramp_sigma + 200)

            if self.pulse_type == 'gauss':
                gauss_sigma = w  #covention for the width of gauss pulse
                self.waveforms['qubit drive I'][ii], self.waveforms['qubit drive Q'][ii] = \
                    ap2.sideband(wtpts,
                                 ap2.gauss(wtpts, a,self.origin - 3* gauss_sigma - pulse_delay, gauss_sigma), np.zeros(len(wtpts)),
                                  self.freq, self.phase)

                self.waveforms['qubit drive I'][ii] += ap2.sideband(
                    wtpts,
                    ap2.gauss(wtpts, a,
                              self.origin - 3 * gauss_sigma, gauss_sigma),
                    np.zeros(len(wtpts)), self.freq, self.phase)[0]
                self.waveforms['qubit drive Q'][ii] += ap2.sideband(
                    wtpts,
                    ap2.gauss(wtpts, a,
                              self.origin - 3 * gauss_sigma, gauss_sigma),
                    np.zeros(len(wtpts)), self.freq, self.phase)[1]

                self.markers['qubit buffer'][ii] = ap2.square(
                    mtpts, 1,
                    self.origin - 6 * gauss_sigma - 100 - pulse_delay,
                    6 * gauss_sigma + 200)
                self.markers['qubit buffer'][ii] += ap2.square(
                    mtpts, 1, self.origin - 6 * gauss_sigma - 100,
                    6 * gauss_sigma + 200)

            flux_a = self.flux_a
            flux_freq = self.flux_freq
            flux_pi_length = self.flux_pi_length
            dc_offset_freq = self.dc_offset_freq

            if True:
                self.waveforms['qubit 1 flux'][ii] = ap2.sideband(
                    ftpts, ap2.square(ftpts, flux_a, 15, flux_pi_length, 5),
                    np.zeros(len(ftpts)), flux_freq, self.phase)[0]
                self.waveforms['qubit 1 flux'][ii] += ap2.sideband(
                    ftpts,
                    ap2.square(ftpts, flux_a,
                               3 * 15 + flux_pi_length + self.delay,
                               flux_pi_length, 5), np.zeros(len(ftpts)),
                    flux_freq, self.phase + 360 * (dc_offset_freq) *
                    (self.delay + flux_pi_length + 2 * 15) / 1e9)[1]
            if False:
                flux_gauss = self.flux_w / 4
                self.waveforms['qubit 1 flux'][ii] = ap2.sideband(
                    ftpts, ap2.gauss(ftpts, flux_a,
                                     2 * flux_gauss, flux_gauss),
                    np.zeros(len(ftpts)), flux_freq, self.phase)[0]