示例#1
0
    pls.hardware.set_inv_sinc(readout_port, 0)
    pls.hardware.set_inv_sinc(control_port, 0)
    pls.hardware.configure_mixer(
        freq=readout_freq,
        in_ports=sample_port,
        out_ports=readout_port,
        sync=False,  # sync in next call
    )
    pls.hardware.configure_mixer(
        freq=control_freq,
        out_ports=control_port,
        sync=True,  # sync here
    )
    if USE_JPA:
        pls.hardware.set_lmx(jpa_pump_freq, jpa_pump_pwr)
        set_dc_bias(jpa_bias_port, jpa_bias)
        time.sleep(1.0)

    # ************************************
    # *** Setup measurement parameters ***
    # ************************************

    # Setup lookup tables for frequencies
    pls.setup_freq_lut(
        output_ports=readout_port,
        group=0,
        frequencies=0.0,
        phases=0.0,
        phases_q=0.0,
    )
    pls.setup_freq_lut(
示例#2
0
    def run(
        self,
        presto_address,
        presto_port=None,
        ext_ref_clk=False,
    ):

        # Instantiate interface class
        with pulsed.Pulsed(
                address=presto_address,
                port=presto_port,
                ext_ref_clk=ext_ref_clk,
                adc_mode=AdcMode.Mixed,
                adc_fsample=AdcFSample.G2,
                dac_mode=[DacMode.Mixed42, DacMode.Mixed02, DacMode.Mixed02, DacMode.Mixed02],
                dac_fsample=[DacFSample.G10, DacFSample.G6, DacFSample.G6, DacFSample.G6],
        ) as pls:
            pls.hardware.set_adc_attenuation(self.sample_port, 0.0)
            pls.hardware.set_dac_current(self.readout_port, 32_000)
            pls.hardware.set_dac_current(self.control_port, 32_000)
            pls.hardware.set_inv_sinc(self.readout_port, 0)
            pls.hardware.set_inv_sinc(self.control_port, 0)
            pls.hardware.configure_mixer(
                freq=self.readout_freq,
                in_ports=self.sample_port,
                out_ports=self.readout_port,
                sync=False,  # sync in next call
            )
            pls.hardware.configure_mixer(
                freq=self.control_freq,
                out_ports=self.control_port,
                sync=True,  # sync here
            )
            if self.jpa_params is not None:
                pls.hardware.set_lmx(self.jpa_params['jpa_pump_freq'], self.jpa_params['jpa_pump_pwr'])
                set_dc_bias(self.jpa_params['jpa_bias_port'], self.jpa_params['jpa_bias'])
                time.sleep(1.0)

            # ************************************
            # *** Setup measurement parameters ***
            # ************************************

            # Setup lookup tables for frequencies
            # we only need to use carrier 1
            pls.setup_freq_lut(
                output_ports=self.readout_port,
                group=1,
                frequencies=0.0,
                phases=0.0,
                phases_q=0.0,
            )
            pls.setup_freq_lut(
                output_ports=self.readout_port,
                group=0,
                frequencies=0.0,
                phases=0.0,
                phases_q=0.0,
            )
            pls.setup_freq_lut(
                output_ports=self.control_port,
                group=0,
                frequencies=0.0,
                phases=0.0,
                phases_q=0.0,
            )

            # Setup lookup tables for amplitudes
            pls.setup_scale_lut(
                output_ports=self.readout_port,
                group=1,
                scales=self.first_pulse_amp_arr,
            )
            pls.setup_scale_lut(
                output_ports=self.readout_port,
                group=0,
                scales=self.readout_amp,
            )
            pls.setup_scale_lut(
                output_ports=self.control_port,
                group=0,
                scales=self.control_amp,
            )

            # Setup readout and control pulses
            # use setup_long_drive to create a pulse with square envelope
            # setup_long_drive supports smooth rise and fall transitions for the pulse,
            # but we keep it simple here
            first_pulse = pls.setup_long_drive(
                output_port=self.readout_port,
                group=1,
                duration=self.readout_duration,
                amplitude=1.0,
                amplitude_q=1.0,
                rise_time=0e-9,
                fall_time=0e-9,
            )
            readout_pulse = pls.setup_long_drive(
                output_port=self.readout_port,
                group=0,
                duration=self.readout_duration,
                amplitude=1.0,
                amplitude_q=1.0,
                rise_time=0e-9,
                fall_time=0e-9,
            )
            control_ns = int(round(self.control_duration *
                                   pls.get_fs("dac")))  # number of samples in the control template
            control_envelope = sin2(control_ns)
            control_pulse = pls.setup_template(
                output_port=self.control_port,
                group=0,
                template=control_envelope,
                template_q=control_envelope,
                envelope=True,
            )

            # Setup sampling window
            pls.set_store_ports(self.sample_port)
            pls.set_store_duration(self.sample_duration)

            # ******************************
            # *** Program pulse sequence ***
            # ******************************
            T = 0.0  # s, start at time zero ...
            for ramsey_delay in self.ramsey_delay_arr:
                # first "readout" pulse
                pls.reset_phase(T, self.readout_port)
                pls.output_pulse(T, first_pulse)
                T += self.readout_duration
                T_end_first = T
                # first pi/2 pulse
                pls.reset_phase(T, self.control_port)
                pls.output_pulse(T, control_pulse)
                T += self.control_duration
                # Ramsey delay
                T += ramsey_delay
                # second pi/2 pulse
                pls.output_pulse(T, control_pulse)
                T += self.control_duration
                # Readout pulse starts after control pulse,
                # `buffer_time` away from the first pulse
                assert T <= T_end_first + self.buffer_time
                T = T_end_first + self.buffer_time
                pls.reset_phase(T, self.readout_port)
                pls.output_pulse(T, readout_pulse)
                # Sampling window
                pls.store(T + self.readout_sample_delay)
                # Move to next iteration
                T += self.readout_duration
                T += self.wait_delay
            # next scale on first pulse
            pls.next_scale(T, self.readout_port, 1)
            T += self.wait_delay

            # **************************
            # *** Run the experiment ***
            # **************************
            pls.run(
                period=T,
                repeat_count=len(self.first_pulse_amp_arr),
                num_averages=self.num_averages,
                print_time=True,
            )
            t_arr, (data_I, data_Q) = pls.get_store_data()

            if self.jpa_params is not None:
                pls.hardware.set_lmx(0.0, 0.0)
                set_dc_bias(self.jpa_params['jpa_bias_port'], 0.0)

        self.t_arr = t_arr
        self.store_arr = data_I + 1j * data_Q

        return self.save()
wait_delay = 200e-6  # s, delay between repetitions to allow the qubit to decay
readout_sample_delay = 290 * 1e-9  # s, delay between readout pulse and sample window to account for latency

# Coupler bias sweep
nr_bias = 512
bias_min = -4.5  # V
bias_max = +4.5  # V
coupler_bias_arr = np.linspace(bias_min, bias_max, nr_bias)

store_arr = np.zeros((nr_bias, nr_freqs, int(round(sample_duration * 1e9))),
                     np.complex128)

set_amp(coupler_bias_port, True)
for bb, coupler_bias in enumerate(coupler_bias_arr):
    set_dc_bias(coupler_bias_port, coupler_bias)
    time.sleep(1.0)

    # Instantiate interface class
    with pulsed.Pulsed(
            address=ADDRESS,
            port=PORT,
            ext_ref_clk=EXT_REF_CLK,
            adc_mode=AdcMode.Mixed,
            adc_fsample=AdcFSample.G2,
            dac_mode=[
                DacMode.Mixed42, DacMode.Mixed02, DacMode.Mixed02,
                DacMode.Mixed02
            ],
            dac_fsample=[
                DacFSample.G10, DacFSample.G6, DacFSample.G6, DacFSample.G6
bias_max = +4.5  # V
coupler_bias_arr = np.linspace(bias_min, bias_max, nr_bias)
coupler_bias_port = 2  # MLA

# Tune
ns = int(round(500e6 / df))
df = 500e6 / ns
n_start = int(round(f_start / df))
n_stop = int(round(f_stop / df))
n_arr = np.arange(n_start, n_stop + 1)
nr_freqs = len(n_arr)
freq_arr = df * n_arr
resp_arr = np.zeros((nr_bias, nr_freqs), np.complex128)

set_amp(coupler_bias_port, True)
set_dc_bias(coupler_bias_port, coupler_bias_arr[0])
time.sleep(1.0)

with lockin.Lockin(
        address=ADDRESS,
        port=PORT,
        ext_ref_clk=EXT_CLK_REF,
        adc_mode=AdcMode.Mixed,
        adc_fsample=AdcFSample.G2,
        dac_mode=DacMode.Mixed42,
        dac_fsample=DacFSample.G10,
) as lck:
    lck.hardware.set_adc_attenuation(input_port, 0.0)
    lck.hardware.set_dac_current(output_port, 32_000)
    lck.hardware.set_inv_sinc(output_port, 0)