Skip to content

Using_pulse_sequence

T. Pruttivarasin edited this page Oct 1, 2015 · 11 revisions

Beside outputting fixed frequency RF signal, the main functionality of the Pulser is to generate a pulse sequence to do experiment in atomic physics. Usually, experiment in atomic physics consists of a sequence of some switching of laser light by modulation of RF signal driving the AOMs and/or controlling mechanical shutters. The sequence is repeated many times to build-up enough statistics in the data acquired from the experiment. So in this tutorial, we will see how we can program pulse sequences to the Pulser.

Programming a pulse sequence

We show here a simple example that allows us to program a pulse sequence to the system and run it. I show here a python script that does exactly that. We will then go through line-by-line later.

from labrad.units import WithUnit
from treedict import TreeDict
import labrad

cxn = labrad.connect()
p = cxn.pulser

p.new_sequence()

p.add_ttl_pulse('ttl_0', WithUnit(0, 'ms'), WithUnit(100, 'ms'))
p.add_ttl_pulse('ttl_0', WithUnit(200, 'ms'), WithUnit(100, 'ms'))

p.program_sequence()

p.start_number(1)
p.wait_sequence_done()
p.stop_sequence()

First few lines are some standard packages importation. The first import line of code is

p.new_sequence()

which defines a new sequence of the pulser.

Next we add to the pulse sequence a few TTL timing. The syntax is "channel_name, start_time and duration of the pulse." So

p.add_ttl_pulse('ttl_0', WithUnit(0, 'ms'), WithUnit(100, 'ms'))

will add a 100 ms-long TTL pulse that starts at t = 0 ms for TTL channel named 'ttl_0'. The naming of the channel can be changed in the hardwareConfiguration.py file.

Once you have added as many TTL pulses as you want, we then "program" the pulse sequence to the FPGA. This is the step where actual data transfer happens between the computer and the FPGA. We do this by executing

p.program_sequence()

Clone this wiki locally