atomiq.components.sinara.suservo

Classes

SUServo

Representation for the SUServo gateware

SUServoChannel

A Urukul DDS channel in SUServo configuration as RF Source

SUServoADCChannel

Analog Input of a Sampler in an SUServo configuration

SUServoModulatedLaser

A Laser with intensity stabilization realized by the SUServo

Module Contents

class atomiq.components.sinara.suservo.SUServo(suservo_device, start_loop=True, *args, **kwargs)[source]

Bases: atomiq.components.primitives.Component

Representation for the SUServo gateware

On init, the servo loop in the SUServo is stared automatically. If this is not wanted configure the :param:start_loop

Parameters:
  • suservo_device -- The artiq SUServo device from your device_db, e.g. @suservo0.

  • start_loop (artiq.language.types.TBool) -- Sets if the servo loop should be started at the prerun stage.

kernel_invariants
suservo_device
servo_on = False
start_loop = True
_prerun()[source]

Specify here what should be done for this component before the run starts. In contrast to the _build() method, the _prerun() routine is executed on the core device before the actual experiment starts.

set_servomode(enabled)[source]
Parameters:

enabled (artiq.language.types.TBool)

get_adc_value(channel)[source]
Parameters:

channel (artiq.language.types.TInt32)

Return type:

artiq.language.types.TFloat

set_adc_gain(channel, gain=0)[source]
Parameters:
  • channel (artiq.language.types.TInt32)

  • gain (artiq.language.types.TInt32)

class atomiq.components.sinara.suservo.SUServoChannel(suservo, suservo_channel, default_attenuation=19.0, default_profile=0, servo_divider=10.0, *args, **kwargs)[source]

Bases: atomiq.components.electronics.rfsource.RFSource, atomiq.components.primitives.Switchable

A Urukul DDS channel in SUServo configuration as RF Source

If not in servo mode, this can be used just like a normal :class:UrukulChannel

Parameters:
  • suservo (SUServo) -- The atomiq SUServo component this channel belongs to

  • suservo_channel -- The artiq SUServo channel from your device_db, e.g. @suservo0_ch2.

  • default_profile -- Which of the 32 profiles of the SUServo should be used? (default 0)

  • servo_divider (artiq.language.types.TFloat) -- Todo: Why do we need this? (default 10.0)

kernel_invariants
suservo
suservo_channel
profile = 0
attenuation = 19.0
servo_on = False
servo_divider = 10.0
next_on
next_off
_prerun()[source]

Specify here what should be done for this component before the run starts. In contrast to the _build() method, the _prerun() routine is executed on the core device before the actual experiment starts.

set(frequency=float('nan'), amplitude=float('nan'), phase=0.0, profile=-1)[source]

Set the frequency and amplitude of the DDS channel

Frequency/amplitude are set to the last known value if nan is passed (default).

Parameters:
  • frequency (artiq.language.types.TFloat) -- Frequency in Hz (nan to use previous value)

  • amplitude (artiq.language.types.TFloat) -- If servomode is off, this is the DDS amplitude (0..1). If servomode is on, this is the target voltage on the photodiode. (nan to use previous value)

  • phase (artiq.language.types.TFloat) -- Phase in rad to be set (default 0.0)

  • profile (artiq.language.types.TInt32) -- DDS Profile (-1 to keep current profile)

set_att(attenuation)[source]

Set the hardware attenuation for this urukul channel via cpld.

Parameters:

attenuation (artiq.language.types.TFloat) -- channel attenuation (0. to 31.0 in 0.5 increments) [dB]

_set_frequency(frequency)[source]
Parameters:

frequency (artiq.language.types.TFloat)

set_amplitude(amplitude)[source]

Set the amplitude of the DDS output

Parameters:

amplitude -- If servomode is off, this is the DDS amplitude (0..1). If servomode is on, this is the target voltage on the photodiode.

_set_amplitude(amplitude)[source]
Parameters:

amplitude (artiq.language.types.TFloat)

_set_phase(phase)[source]
Parameters:

phase (artiq.language.types.TFloat)

on()[source]

Turn on the RF output via the fast switch

off()[source]

Turn off the RF output via the fast switch

set_servomode(enabled)[source]

Switch servo mode of the SUServo on or off

The servo loop in the SUServo gateware (running on the Kasli) can only be switched on globally for all channels. However, we can decide for each channel if the output of the servo loop should be given to the DDS. This function switches the the updating for this channel.

Parameters:

enabled (artiq.language.types.TBool) -- Whether the servomode should be enabled

_ramp(duration, frequency_start, frequency_end, amplitude_start, amplitude_end, ramp_timestep=0.0002)[source]

At some point, we want to replace this by code that uses the digital ramp generator (DRG) on the AD9910 because this allows for much faster ramps

Parameters:
  • duration (artiq.language.types.TFloat)

  • frequency_start (artiq.language.types.TFloat)

  • frequency_end (artiq.language.types.TFloat)

  • amplitude_start (artiq.language.types.TFloat)

  • amplitude_end (artiq.language.types.TFloat)

  • ramp_timestep (artiq.language.types.TFloat)

class atomiq.components.sinara.suservo.SUServoADCChannel(suservo, default_gain=0, *args, **kwargs)[source]

Bases: atomiq.components.electronics.adc.ADCChannel

Analog Input of a Sampler in an SUServo configuration

ATTENTION: When default_gain is !=1 is given, this might cause problems in closed loop mode. It seems SUServo internally uses gain=1. Maybe it can be set differntly but I don't see how.

Parameters:
  • suservo (SUServo) -- The SUServo component that this channel belongs to

  • default_gain (artiq.language.types.TInt32) -- The default gain in machine units (0: 1, ..., 3: 1000) to set for this channel on startup

kernel_invariants
suservo
gain = 0
_prerun()[source]

Specify here what should be done for this component before the run starts. In contrast to the _build() method, the _prerun() routine is executed on the core device before the actual experiment starts.

set_gain(gain=0)[source]

Set the gain for the ADC channel in SUServo configuration

Parameters:

gain (artiq.language.types.TInt32) -- Gain in machine units (0: 1, ..., 3: 1000)

measure(samples=1, cached=False)[source]
Parameters:
  • samples (artiq.language.types.TInt32)

  • cached (artiq.language.types.TBool)

Return type:

artiq.language.types.TFloat

class atomiq.components.sinara.suservo.SUServoModulatedLaser(default_kp, default_ki=0.0, default_ki_limit=0.0, *args, **kwargs)[source]

Bases: atomiq.components.laser.ContinuouslyStabilizedModulatedLaser

A Laser with intensity stabilization realized by the SUServo

The SUServo realizes a PI servo controller in hardware with an update time inteval of 1.3us, leading to a maximum analog bandwith of >500kHz. To achieve this a Sampler (8 analog in) is bundled in the gateware with two Urukuls (2 x 4 DDS channels).

With this class, the SUServo can be used in open loop as well as in closed loop mode. Use the stabilize() function to switch between open and closed loop mode. When switching from closed to open loop, the last output power on the DDS channel will be hold.

Parameters:
  • modulator -- The modulator (most likely an AOM) that is driven by the SUServo. The Modulator given here must be of a class derived from :class:RFLightModulator and the rfsource of the modulator must be of the class :class:SUServoChannel.

  • photodiode -- The photodiode monitoring the laser. The photodiode must be of a class derived from :class:AnalogPhotodiode and the photodiode's :param:adc_channel must be of the class :class:SUServoADCChannel.

  • default_kp (artiq.language.types.TFloat) -- default proportional (P-) part for the SUServo loop. Values should be negative.

  • default_ki (artiq.language.types.TFloat) -- default integral (I-) part for the SUServo loop. Values should be negative. (default 0.0)

  • default_ki_limit (artiq.language.types.TFloat) -- default limit for I-part of the SUServo loop. 0.0 means unlimited. (default 0.0)

kernel_invariants
default_kp
default_ki = 0.0
default_ki_limit = 0.0
suservo_channel
_prerun()[source]

Specify here what should be done for this component before the run starts. In contrast to the _build() method, the _prerun() routine is executed on the core device before the actual experiment starts.

set_servo_parameter(adc_channel, kp, ki, ki_limit, delay=0.0)[source]

Set servo loop parameters.

Parameters:
  • kp (artiq.language.types.TFloat) -- proportional (P-) part for the SUServo loop. Values should be negative.

  • ki (artiq.language.types.TFloat) -- integral (I-) part for the SUServo loop. Values should be negative.

  • ki_limit (artiq.language.types.TFloat) -- limit for I-part of the SUServo loop. 0.0 means unlimited.

  • delay (artiq.language.types.TFloat) -- delay between switching on the laser an the servo loop becoming active (default: 0.0)

_stabilize(enable)[source]
Parameters:

enable (artiq.language.types.TBool)

_transform_power_dummy(power)[source]
Parameters:

power (artiq.language.types.TFloat)

Return type:

artiq.language.types.TFloat

_transform_power_calibration(power)[source]
Parameters:

power (artiq.language.types.TFloat)

Return type:

artiq.language.types.TFloat

_amplitude_from_power(power)[source]
Parameters:

power (artiq.language.types.TFloat)

Return type:

artiq.language.types.TFloat

set_power(power)[source]

Set the output power of the laser

If the SUServo is in open loop mode, this sets the amplitude of the DDS channel. If the SUServo is in closed loop mode, it sets the photodiode value the servo loop should target. If the photodiode is calibrated the power argument should be given in the calibrated units.

Parameters:

power (artiq.language.types.TFloat) -- the power the laser should be set/stabilized to. In open loop mode it takes the DDS amplitude (0..1). In closed loop mode it takes the target value on the photodiode for the servo loop. If the photodiode is calibrated the power should be given in the calibrated units (e.g. mW).