Beispiel #1
0
        def filler_func(self, length):
            self.length = length
            channel_amplitudes_ = channel_amplitudes.channel_amplitudes(
                device, **{gate.metadata['carrier_name']: self.amplitude})

            if 'pulse_type' in gate.metadata:
                if gate.metadata['pulse_type'] == 'cos':
                    frequency = float(gate.metadata['frequency'])
                    #print(frequency)
                    #print(self.length)
                    channel_pulses = [
                        (c, device.pg.sin, self.amplitude, frequency)
                        for c, a in channel_amplitudes_.metadata.items()
                    ]
                    gate_pulse = [
                        device.pg.pmulti(self.length, *tuple(channel_pulses))
                    ]
            else:
                gate_pulse = excitation_pulse.get_rect_cos_pulse_sequence(
                    device=device,
                    channel_amplitudes=channel_amplitudes_,
                    tail_length=float(gate.metadata['tail_length']),
                    length=self.length,
                    phase=0.0)

            return [device.pg.pmulti(pre_pause)
                    ] + gate_pulse + [device.pg.pmulti(post_pause)]
    def get_pulse_sequence(self, phase=0.0, frequency_shift = None):
        #pulse_sequence = get_long_process_vf(self.device, self, inverse=False)
        if frequency_shift is None:
            frequency_shift = float(self.metadata['frequency_shift'])
        pulse_sequence = get_vf(self.device, self, frequency_shift)
        pulse_sequence += excitation_pulse.get_rect_cos_pulse_sequence(device = self.device,
                                           channel_amplitudes = self.channel_amplitudes,
                                           tail_length = float(self.metadata['tail_length']),
                                           length = float(self.metadata['length']),
                                           phase = phase)
        pulse_sequence += get_vf(self.device, self, 0)
        # subtract accumulated phase during the pulse as is it will be compensated through single-qubit rotations
        # which are calibrated properly
        carrier_name = self.metadata['carrier_name']
        accumulation_time = len(pulse_sequence[1][carrier_name])/self.device.pg.channels[carrier_name].get_clock()
        carrier_harmonic = float(self.metadata['carrier_harmonic'])
        pulse_sequence += [self.device.pg.pmulti(0, (carrier_name, pulses.vz, -(accumulation_time*frequency_shift)*2*np.pi*carrier_harmonic))]
        # adding single-qubit rotations
        if np.isfinite(float(self.metadata['phase_q1'])):
            pulse_sequence += excitation_pulse.get_s(self.device, self.metadata['q1'],
                                                     phase=float(self.metadata['phase_q1']))
        if np.isfinite(float(self.metadata['phase_q2'])):
            pulse_sequence += excitation_pulse.get_s(self.device, self.metadata['q2'],
                                                     phase=float(self.metadata['phase_q2']))

        post_pause_length = float(self.device.get_sample_global(name='two_qubit_pulse_post_pause'))
        pulse_sequence += [self.device.pg.pmulti(post_pause_length)]
        return pulse_sequence
 def filler_func(length):
     return vf_pulse + \
            excitation_pulse.get_rect_cos_pulse_sequence(device = device,
                                        channel_amplitudes = channel_amplitudes_,
                                        tail_length = float(gate.metadata['tail_length']),
                                        length = length,
                                        phase = 0.0) #+ \
Beispiel #4
0
 def filler_func(self, length):
     channel_amplitudes_ = channel_amplitudes.channel_amplitudes(
         device, **{gate.metadata['carrier_name']: self.amplitude})
     return [device.pg.pmulti(pre_pause)
             ] + excitation_pulse.get_rect_cos_pulse_sequence(
                 device=device,
                 channel_amplitudes=channel_amplitudes_,
                 tail_length=float(gate.metadata['tail_length']),
                 length=length,
                 phase=0.0) + [device.pg.pmulti(post_pause)]
Beispiel #5
0
 def filler_func(length):
     channel_amplitudes_ = channel_amplitudes.channel_amplitudes(
         device, **{
             gate.metadata['carrier_name']:
             float(gate.metadata['amplitude'])
         })
     return excitation_pulse.get_rect_cos_pulse_sequence(
         device=device,
         channel_amplitudes=channel_amplitudes_,
         tail_length=float(gate.metadata['tail_length']),
         length=length,
         phase=0.0)
    def set_Zgate_amplitude(x):
        channel_amplitudes1_ = channel_amplitudes.channel_amplitudes(device,
                                                                     **{Zgate.metadata[
                                                                            'carrier_name']: x})
        print(channel_amplitudes1_)

        pulse_seq1 = excitation_pulse.get_rect_cos_pulse_sequence(device=device,
                                                                  channel_amplitudes=channel_amplitudes1_,
                                                                  tail_length=float(Zgate.metadata['tail_length']),
                                                                  length=float(qubit_readout_pulse.metadata['length']),
                                                                  phase=0.0)

        classifier.ro_seq =  device.trigger_readout_seq + device.pg.parallel(pulse_seq1,qubit_readout_pulse.get_pulse_sequence())
Beispiel #7
0
    def set_ex_length(length):
        pre_pulse_sequences = []
        for pulse in pre_pulses:
            if hasattr(pulse, 'get_pulse_sequence'):
                pre_pulse_sequences += pulse.get_pulse_sequence(0.0)
            else:
                pre_pulse_sequences += pulse
        #pre_pulse_sequences = [p for pulse in pre_pulses for p in pulse.get_pulse_sequence(0)]
        ex_pulse_seq = excitation_pulse.get_rect_cos_pulse_sequence(
            device, channel_amplitudes, tail_length, length,
            phase=0.) * repeats
        delay_seq = [device.pg.pmulti(readout_delay)]
        readout_trigger_seq = device.trigger_readout_seq
        readout_pulse_seq = readout_pulse.pulse_sequence

        device.pg.set_seq(device.pre_pulses + pre_pulse_sequences + delay_seq +
                          ex_pulse_seq + delay_seq + readout_trigger_seq +
                          readout_pulse_seq)