Esempio n. 1
0
    def _gen_p_block(self):

        count_trace_pb = pb.PulseBlock()

        # Sample clock
        t_step = (self._l_margin + self._laser_dur +
                  self._r_margin) / self._n_pts

        for idx in range(self._n_pts):
            count_trace_pb.append(
                p_obj=po.PTrue(ch='ctr_gate', dur=t_step / 2, t0=t_step / 2))

        # Laser pulse
        count_trace_pb.insert(
            p_obj=po.PTrue(ch='aom', dur=self._laser_dur, t0=self._l_margin))

        # Relaxation period and all off pulse block
        count_trace_pb.append(
            p_obj=po.PFalse(ch='aom', dur=t_step, t0=self._relax))
        count_trace_pb.append(p_obj=po.PFalse(
            ch='ctr_gate',
            dur=t_step,
        ))

        # Duration of full PB
        # [for gated_ctr.get_count_ar() timeout]
        self._pb_dur = count_trace_pb.dur

        # Default value
        count_trace_pb.dflt_dict = dict(aom=po.DFalse(), ctr_gate=po.DFalse())

        return count_trace_pb
Esempio n. 2
0
    def _gen_rfcs_block():

        optimize_pb = pb.PulseBlock()
        optimize_pb.insert(p_obj=po.PTrue(ch='aom', dur=1e-6))
        optimize_pb.insert(p_obj=po.PTrue(ch='mw_gate', dur=1e-6))
        optimize_pb.dflt_dict = dict(aom=po.DTrue(), mw_gate=po.DTrue())
        return optimize_pb
Esempio n. 3
0
    def _gen_rfcs_block():

        optimize_pb = pb.PulseBlock(
            p_obj_list=[
                po.PTrue(ch='aom', dur=1e-6)
            ],
            dflt_dict=dict(aom=po.DTrue())
        )

        return optimize_pb
Esempio n. 4
0
    def _gen_rabi_elem(tau=0, safety_window=200e-9):
        rabi_elem = pb.PulseBlock()

        # Init green_aom pulse
        rabi_elem.insert(p_obj=po.PTrue(ch='aom', dur=2e-6 +
                                        2 * safety_window))

        # Normalization pulse
        rabi_elem.insert(p_obj=po.PTrue(ch='ctr_gate', t0=1.5e-6, dur=0.5e-6))

        # mw pulse
        rabi_elem.append(
            p_obj=po.PTrue(ch='mw_gate', dur=tau, t0=4 * safety_window))

        tmp_dur = rabi_elem.dur + 4 * safety_window

        # Readout AOM pulse
        rabi_elem.insert(p_obj=po.PTrue(ch='aom', dur=1e-6, t0=tmp_dur))

        # readout ctr_gate pulse
        rabi_elem.insert(p_obj=po.PTrue(ch='ctr_gate', dur=0.5e-6, t0=tmp_dur))

        return rabi_elem
Esempio n. 5
0
    def _gen_p_block(self, safety_window=200e-9):

        # ========== Prepare individual blocks =========

        # ------- pre_init_pb --------
        # Long optical pumping before first pulse

        pre_init_pb = pb.PulseBlock(p_obj_list=[po.PTrue(ch='aom', dur=3e-6)])

        # ------- all_off_pb --------
        # Switch all channels off after the full pulse sequence

        all_off_pb = pb.PulseBlock(p_obj_list=[
            po.PFalse(ch='aom', dur=1e-6),
            po.PFalse(ch='mw_gate', dur=1e-6),
            po.PFalse(ch='ctr_gate', dur=1e-6)
        ])

        # ========== Construct full rabi_pb =========

        rabi_pb = pb.PulseBlock(name='RabiPB')

        # Pre-init block
        rabi_pb.insert_pb(pb_obj=pre_init_pb)

        # rabi_element ** n_pts
        for tau in self.tau_ar:
            rabi_pb.append_pb(pb_obj=self._gen_rabi_elem(
                tau=tau, safety_window=safety_window))

        # All-off block
        rabi_pb.append_pb(pb_obj=all_off_pb)

        # Default values
        rabi_pb.dflt_dict = dict(aom=po.DFalse(),
                                 ctr_gate=po.DFalse(),
                                 mw_gate=po.DFalse())

        # Correct for aom delay
        rabi_pb.add_offset(offset_dict=dict(aom=-self._aom_delay))

        # Duration of full RabiPB
        # [for gated_ctr.get_count_ar() timeout]
        self._rabi_pb_dur = rabi_pb.dur

        return rabi_pb
Esempio n. 6
0
    def _gen_p_block(self, debug=False):

        # Technical params

        # safety window between mw_src makes a step and
        # before counter starts accumulation of counts
        safety_window = 0.1 * self._accum_dur

        # Duration of sweep-step pulse
        step_pulse_dur = 0.1 * self._accum_dur  # 200e-6

        # ========== Prepare individual blocks =========

        # ------- first_pb --------
        # First point in the sweep:
        #   mw_src should reset sweep position to start_f,
        #   so there is no need to send step_trig pulse

        first_pb = pb.PulseBlock()

        # long safety window in the beginning
        first_pb.insert(p_obj=po.PFalse(ch='ctr_gate', dur=self._accum_dur))

        # first ctr_gate pulse
        first_pb.append(p_obj=po.PTrue(ch='ctr_gate', dur=self._accum_dur))

        # ------- step_pb --------
        # This pb is repeated for every subsequent sweep step:
        #   send ctr_trig pulse, wait for a safety window and
        #   start accumulating pulses

        step_pb = pb.PulseBlock()

        # step pulse to mw_src
        step_pb.insert(p_obj=po.PTrue(ch='mw_step', dur=step_pulse_dur))

        # ctr_gate pulse
        step_pb.append(p_obj=po.PTrue(
            ch='ctr_gate', dur=self._accum_dur, t0=safety_window))

        # ------- off_pb --------
        # Once sweep is complete, set all outputs to low

        off_pb = pb.PulseBlock()

        off_pb.insert(p_obj=po.PFalse(ch='aom', dur=safety_window))
        off_pb.insert(p_obj=po.PFalse(ch='mw_gate', dur=safety_window))
        off_pb.insert(p_obj=po.PFalse(ch='mw_step', dur=safety_window))
        off_pb.insert(p_obj=po.PFalse(ch='ctr_gate', dur=safety_window))

        # ========== Construct full odmr_pb =========

        odmr_pb = pb.PulseBlock(name='ODMRPulseBlock')

        # Default values
        odmr_pb.dflt_dict = dict(
            aom=po.DFalse(),
            ctr_gate=po.DFalse(),
            mw_gate=po.DFalse(),
            mw_step=po.DFalse(),
        )

        # first_bp
        odmr_pb.insert_pb(pb_obj=first_pb)

        # append step_bp ** (_n_pts-1)
        for _ in np.arange(start=1, stop=self._n_pts):
            odmr_pb.append_pb(pb_obj=step_pb)

        # aom and mw_gate are High during the whole block
        tmp_dur = odmr_pb.dur
        odmr_pb.insert(p_obj=po.PTrue(ch='aom', dur=tmp_dur))
        odmr_pb.insert(p_obj=po.PTrue(ch='mw_gate', dur=tmp_dur))

        # append off_pb
        odmr_pb.append_pb(pb_obj=off_pb)

        if debug:
            return dict(first_pb=first_pb,
                        step_pb=step_pb,
                        off_pb=off_pb,
                        odmr_pb=odmr_pb)
        else:
            return odmr_pb