Laser arb exampleΒΆ
Experiment
from atomiq import AtomiqExperiment
from artiq.experiment import kernel, delay, parallel, ms
import numpy as np
class LaserArbExample(AtomiqExperiment):
"""Laser Arbitrary Amplitude
This example shows how to make a laser run an arbitrary power pattern defined by a list of samples
This example uses a Urukul to drive an AOM that modulates the laser. We will thus be transparently be
using the RAM mode of the Urukul to be as fast as possible. In this example we will create 10 Gaussian-
evelope pulses within the `on_time` (default 5 us).
Since our fictuous situation can not accept the light being off just before the are starts, we split the
arb command into two: The first one prepares the arb sequence (loads the values) and the second one runs
the prepared arb, when we need it.
"""
components = ["ttl_cool", "laser_test"]
arguments = {
"on_time": {"default": 5e-6, "unit": "us", "scale": 1e-6, "ndecimals": 3},
"off_time": {"default": 0.5, "unit": "s"},
}
def prerun_host(self):
num_samples = 100
self.samples = list(np.exp(-np.linspace(-3, 3, num_samples)**2)*0.8+0.2)
@kernel
def step(self, point):
self.log.info("Arb-Test")
repetitions = 10
# set reasoable start parameters for our laser
self.laser_test.set_detuning(-120e6)
self.laser_test.set_amplitude(0.2)
# switch on the laser
self.laser_test.on()
delay(50*ms)
# At this point we don't care about the laser turning off and we prepare the ARB sequence
self.laser_test.arb(point.on_time/repetitions, samples_amp=self.samples, repetitions=repetitions,
prepare_only=True)
delay(2*ms)
with parallel:
self.ttl_cool.pulse(point.on_time)
# run the prepared ARB sequence
self.laser_test.arb(point.on_time/repetitions, samples_amp=self.samples, repetitions=repetitions,
run_prepared=True)
delay(point.off_time)
Components
components = {"type": "atomiq"}
# Add core stuff
components.update({
"log": {
"classname": "atomiq.components.basics.log.KernelLogger"
}
})
# Add locks
components.update({
"lock_cooler": {
"classname": "atomiq.components.lock.SidebandLock",
"arguments": {
"reference_frequency": 384.22811520342896e12, # Frequency where the carrier appears
"lock_offset": 34e6, # Frequency of the sideband
"rf_source": "&dds_lock_cooler"
}
}
})
# Add laser sources
components.update({
"ls_dlpro_cooler": {
"classname": "atomiq.components.laser.LockedLaserSource",
"arguments": {
"lock": "&lock_cooler"
}
}
})
# Add low level Sinara hardware
components.update({
"kasli0": {
"classname": "atomiq.components.sinara.Kasli",
"arguments": {}
},
"urukul0": {
"classname": "atomiq.components.sinara.Urukul",
"arguments": {
"cpld": "@urukul0_cpld"
}
}
})
# Add low Sinara DIOs
components.update({
"ttl_cool": {
"classname": "atomiq.components.sinara.DioOutput",
"arguments": {
"kasli": "&kasli0",
"ttl": "@ttl4"
}
}
})
# Add DDS channels
components.update({
"dds_cooler": {
"classname": "atomiq.components.sinara.urukul.UrukulChannel",
"arguments": {
"urukul": "&urukul0",
"device": "@urukul0_ch0",
"ttl": "@ttl_urukul0_sw0"
}
}
})
# Add AOMs
components.update({
"aom_cooler": {
"classname": "atomiq.components.optoelectronics.lightmodulator.AOM",
"arguments": {
"rfsource": "&dds_cooler",
"switch": "&ttl_cool",
"center_freq": 80e6,
"bandwidth": 10e6,
"switching_delay": 30e-9,
"order": -1,
"passes": 2
}
}
})
# Add lasers
components.update({
"laser_test": {
"classname": "atomiq.components.laser.ModulatedLaser",
"arguments": {
"laser_source": "&ls_dlpro_cooler",
"modulator": "&aom_cooler",
"fm_device": "mod",
"am_device": "mod",
"zero_freq": 384.230484468562e12 + 193.740846e6 - 2.563005979089114e9
}
}
})