atomiq.components.laser module#

class atomiq.components.laser.LaserSource(frequency, power=0.001, *args, **kwargs)#

Bases: Component

Free-running laser source

This class represents a generic (free-running) laser source that emits light of a specified frequency

Parameters:
  • frequency (TFloat) -- Frequency of the emitted light in Hz

  • power (TFloat) -- Emitted light power in W

get_frequency()#
set_frequency(frequency)#
Parameters:

frequency (TFloat) --

get_power()#
set_power(power)#
Parameters:

power (TFloat) --

class atomiq.components.laser.LockedLaserSource(lock, *args, **kwargs)#

Bases: LaserSource

Locked laser source

This class represents a generic locked laser source that emits light of a specified frequency

Parameters:

lock (Lock) -- lock component that locks the laser source

kernel_invariants = {'lock'}#
get_frequency()#
set_frequency(frequency)#
Parameters:

frequency (TFloat) --

get_power()#
set_power(power)#
Parameters:

power (TFloat) --

class atomiq.components.laser.Laser(laser_source, zero_freq=None, *args, **kwargs)#

Bases: LaserSource

Laser light that can be modulated

Since we inherit from LaserSource here, a Laser object can itself again be a LaserSource for another Laser object. This way one can describe consecutive manipulations from a LaserSource to the final Laser object.

Parameters:
  • laser_source (LaserSource) -- The laser source that this laser is taken from

  • zero_freq (TFloat) -- absolute frequency in Hz that should be considered zero. This allows to reference the laser frequency relative to e.g. an atomic transition. If not set, the detuning will be relative to the lock point of the laser source

kernel_invariants = {'laser_source', 'zero_freq'}#
get_frequency()#
set_frequency(frequency)#

Set the absolute frequency of the light after modulation

Parameters:

frequency (TFloat) -- Absolute frequency of the light after modulation in Hz

set_detuning(detuning)#
Parameters:

detuning (TFloat) --

detune(frequency)#
Parameters:

frequency (TFloat) --

get_power()#
set_power(power)#
Parameters:

power (TFloat) --

class atomiq.components.laser.SwitchableLaser(switch, *args, **kwargs)#

Bases: Laser, Switchable

A laser that can be switched on and off

This class represents a laser that can be switched on and off, e.g. by a mechanical shutter. However, every Switchable can be used to switch the laser.

Parameters:
  • laser_source -- The laser source that this laser is taken from

  • switch (Switchable) -- The component that switches the laser light

A Switchable has one ore more channel(s) that can be switched on or off

kernel_invariants = {'switch'}#
on()#
off()#
detune(frequency)#
Parameters:

frequency (TFloat) --

get_frequency()#
get_power()#
set_detuning(detuning)#
Parameters:

detuning (TFloat) --

set_frequency(frequency)#

Set the absolute frequency of the light after modulation

Parameters:

frequency (TFloat) -- Absolute frequency of the light after modulation in Hz

set_power(power)#
Parameters:

power (TFloat) --

class atomiq.components.laser.ModulatedLaser(modulator, switch=None, fm_device='mod', am_device='mod', src_transmission=1.0, *args, **kwargs)#

Bases: SwitchableLaser, Parametrizable

A laser that can be changed in frequency and amplitude

This class represents a laser that is altered by an acusto-optic modular (AOM). The AOM can be used the modulate the amplitude and the frequency of the light.

Parameters:
  • laser_source -- The laser source that this laser is taken from

  • switch (Switchable) -- The component that switches the laser light. If none is given, the AOM is used to switch the light.

  • modulator (LightModulator) -- component that does the amplitude/frequency/phase modulation of the laser. E.g. an AOM, EOM, etc.

  • zero_freq -- absolute frequency in Hz that should be considered zero. This allows to reference the laser frequency relative to e.g. an atomic transition. If not set, the detuning will be relative to the lock point of the laser source

  • fm_device (TStr) -- Choose whether the frequency should be set via the modulator (mod) or the laser source (src). (default: mod)

  • am_device (TStr) -- Choose whether the power should be set via the modulator (mod) or the laser source (src). (default: mod)

  • src_transmission (TFloat) -- Transmission of the light from the laser source to behind the modulator [0..1] (default 1)

A Switchable has one ore more channel(s) that can be switched on or off

kernel_invariants = {'am_device', 'fm_device', 'modulator', 'src_transmission', 'switch'}#
set_amplitude(amplitude)#
Parameters:

amplitude (TFloat) --

get_frequency()#
Return type:

TFloat

set_frequency(frequency)#

Set the absolute frequency of the light after modulation

Parameters:

frequency (TFloat) -- Absolute frequency of the light after modulation in Hz

ramp(duration, frequency_start=- 1.0, frequency_end=- 1.0, amplitude_start=- 1.0, amplitude_end=- 1.0, power_start=- 1.0, power_end=- 1.0, ramp_timestep=- 1.0, ramp_steps=- 1)#

Ramp frequency and/or power/amplitude over a given duration.

Parameters default to -1 to indicate no change. If the start frequency/amplitude is set to -1, the ramp starts from the last frequency/amplitude which was set.

Either power or amplitude can be given to ramp the intensity of the laser. If power is given, it overwrites the value for the amplitude

This method advances the timeline by ´duration´

Parameters:
  • duration (TFloat) -- ramp duration [s]

  • frequency_start (TFloat) -- initial frequency [Hz]

  • frequency_end (TFloat) -- end frequency [Hz]

  • amplitude_start (TFloat) -- initial amplitude [Hz]

  • amplitude_end (TFloat) -- end amplitude [Hz]

  • power_start (TFloat) --

  • power_end (TFloat) --

  • ramp_timestep (TFloat) --

  • ramp_steps (TInt32) --

arb(duration, samples_amp=[], samples_power=[], samples_freq=[], samples_det=[], samples_phase=[], repetitions=1, prepare_only=False, run_prepared=False, transform_amp=<function identity_float>, transform_freq=<function identity_float>, transform_phase=<function identity_float>)#

Play Arbitrary Samples from a List

This method allows to set the output amplitude, frequency an phase according to the values specified in respective lists. The whole sequence is played in the specified duration. The pattern store in the sample list can also be repeated.

We supports a scheme to prepare the arb function before it is actually used. If that is needed, run this function with prepare_only = True when the arb should be prepared and with run_only = True when the prepared arb should be played. In both calls the other parameters have to be passed.

Parameters:
  • samples_amp (TList(TFloat)) -- List of amplitude samples. If this list is empty (default), the amplitude is not modified.

  • samples_power (TList(TFloat)) -- List of power samples. If this list is empty (default), the amplitude is not modified. This overwrites samples_amp.

  • samples_freq (TList(TFloat)) -- List of frequency samples. If this list is empty (default), the frequency is not modified.

  • samples_det (TList(TFloat)) -- List of frequency samples relative to the zero frequency. If this list is empty (default), the frequency is not modified. This overwrites samples_frequency

  • samples_phase (TList(TFloat)) -- List of phase samples. If this list is empty (default), the phase is not modified.

  • duration (TFloat) -- The time in which the whole sequence of samples should be played back [s].

  • repetitions (TInt32) -- Number of times the sequence of all samples should be played. (default 1)

  • prepare_only (TBool) --

  • run_prepared (TBool) --

get_power()#
Return type:

TFloat

set_power(power)#

Set the absolute power of the light after modulation

Parameters:

power (TFloat) -- Absolute power of the light after modulation in W

detune(frequency)#
Parameters:

frequency (TFloat) --

off()#
on()#
set_detuning(detuning)#
Parameters:

detuning (TFloat) --

class atomiq.components.laser.StabilizedModulatedLaser(photodiode, *args, **kwargs)#

Bases: ModulatedLaser, Measurable

A power-stabilized modulated laser

With some means of measuring the laser power after the amplitude modulator and a feedback, the laser power can be stabilized. This is an abstract class to represent this kind of setups. To monitor the power of the laser after the modulator, a photodiode is required.

Parameters:

photodiode (Photodiode) -- The photodiode that monitors the laser power

A Switchable has one ore more channel(s) that can be switched on or off

kernel_invariants = {'photodiode'}#
get_power()#
Return type:

TFloat

stabilize(enable)#
Parameters:

enable (TBool) --

arb(duration, samples_amp=[], samples_power=[], samples_freq=[], samples_det=[], samples_phase=[], repetitions=1, prepare_only=False, run_prepared=False, transform_amp=<function identity_float>, transform_freq=<function identity_float>, transform_phase=<function identity_float>)#

Play Arbitrary Samples from a List

This method allows to set the output amplitude, frequency an phase according to the values specified in respective lists. The whole sequence is played in the specified duration. The pattern store in the sample list can also be repeated.

We supports a scheme to prepare the arb function before it is actually used. If that is needed, run this function with prepare_only = True when the arb should be prepared and with run_only = True when the prepared arb should be played. In both calls the other parameters have to be passed.

Parameters:
  • samples_amp (TList(TFloat)) -- List of amplitude samples. If this list is empty (default), the amplitude is not modified.

  • samples_power (TList(TFloat)) -- List of power samples. If this list is empty (default), the amplitude is not modified. This overwrites samples_amp.

  • samples_freq (TList(TFloat)) -- List of frequency samples. If this list is empty (default), the frequency is not modified.

  • samples_det (TList(TFloat)) -- List of frequency samples relative to the zero frequency. If this list is empty (default), the frequency is not modified. This overwrites samples_frequency

  • samples_phase (TList(TFloat)) -- List of phase samples. If this list is empty (default), the phase is not modified.

  • duration (TFloat) -- The time in which the whole sequence of samples should be played back [s].

  • repetitions (TInt32) -- Number of times the sequence of all samples should be played. (default 1)

  • prepare_only (TBool) --

  • run_prepared (TBool) --

detune(frequency)#
Parameters:

frequency (TFloat) --

get_frequency()#
Return type:

TFloat

off()#
on()#
ramp(duration, frequency_start=- 1.0, frequency_end=- 1.0, amplitude_start=- 1.0, amplitude_end=- 1.0, power_start=- 1.0, power_end=- 1.0, ramp_timestep=- 1.0, ramp_steps=- 1)#

Ramp frequency and/or power/amplitude over a given duration.

Parameters default to -1 to indicate no change. If the start frequency/amplitude is set to -1, the ramp starts from the last frequency/amplitude which was set.

Either power or amplitude can be given to ramp the intensity of the laser. If power is given, it overwrites the value for the amplitude

This method advances the timeline by ´duration´

Parameters:
  • duration (TFloat) -- ramp duration [s]

  • frequency_start (TFloat) -- initial frequency [Hz]

  • frequency_end (TFloat) -- end frequency [Hz]

  • amplitude_start (TFloat) -- initial amplitude [Hz]

  • amplitude_end (TFloat) -- end amplitude [Hz]

  • power_start (TFloat) --

  • power_end (TFloat) --

  • ramp_timestep (TFloat) --

  • ramp_steps (TInt32) --

set_amplitude(amplitude)#
Parameters:

amplitude (TFloat) --

set_detuning(detuning)#
Parameters:

detuning (TFloat) --

set_frequency(frequency)#

Set the absolute frequency of the light after modulation

Parameters:

frequency (TFloat) -- Absolute frequency of the light after modulation in Hz

set_power(power)#

Set the absolute power of the light after modulation

Parameters:

power (TFloat) -- Absolute power of the light after modulation in W

class atomiq.components.laser.OptimizerStabilizedModulatedLaser(optimizer, cache_size=8, *args, **kwargs)#

Bases: StabilizedModulatedLaser

A modulated laser power-stabilized through an optimizer

This class integrates an optimizer to find the best setting of the amplitude modulator to achieve the desired power on the monitoring photodiode. This can be used to create "poor man's PID". Upon calling :func:set_power() it is checked whether an optimization result for the requested power already exists. If not the optimizer is called to find the best setting. This result is applied to the modulator and stored in the cache.

To find the best setting, the optimizer will (multiple times) switch on the laser, change its power and measure the photodiode. When switching on the light interferes with the experimental sequence, make sure to call :func:set_power() for your desired power for the first time before the experiment starts. Then the optimization will be done when it does not interfere with your experiment and at a later time the optimization result can be read from the cache, i.e. not further optimization is possible. Of course this assumes that the laser source power is reasonably stable during the time between the optimization the the time the value is recalled from the cache.

Parameters:
  • optimizer (Optimizer) -- Optimizer to use for finding the proper setting of the modulator. Make sure that the actor_component of the optimizer is identical to the the lasers modulator and the optimizer's monitor_component is identical to the lasers photodiode.

  • cache_size (TInt32) -- number of optimization results that can be stored. (default 8)

A Switchable has one ore more channel(s) that can be switched on or off

kernel_invariants = {'cache_size', 'optimizer'}#
clear_cache()#
set_power(power)#

Set the output power of the laser

If the requested power is not already in the cache, this will immediately perform the optimization and set the result on the modulator. If the requested power is present in the cache, the cache value is used.

Parameters:
  • power (TFloat) -- the power the laser should be stabilized to. If the photodiode is calibrated the power should be

  • units (given in the calibrated) --

arb(duration, samples_amp=[], samples_power=[], samples_freq=[], samples_det=[], samples_phase=[], repetitions=1, prepare_only=False, run_prepared=False, transform_amp=<function identity_float>, transform_freq=<function identity_float>, transform_phase=<function identity_float>)#

Play Arbitrary Samples from a List

This method allows to set the output amplitude, frequency an phase according to the values specified in respective lists. The whole sequence is played in the specified duration. The pattern store in the sample list can also be repeated.

We supports a scheme to prepare the arb function before it is actually used. If that is needed, run this function with prepare_only = True when the arb should be prepared and with run_only = True when the prepared arb should be played. In both calls the other parameters have to be passed.

Parameters:
  • samples_amp (TList(TFloat)) -- List of amplitude samples. If this list is empty (default), the amplitude is not modified.

  • samples_power (TList(TFloat)) -- List of power samples. If this list is empty (default), the amplitude is not modified. This overwrites samples_amp.

  • samples_freq (TList(TFloat)) -- List of frequency samples. If this list is empty (default), the frequency is not modified.

  • samples_det (TList(TFloat)) -- List of frequency samples relative to the zero frequency. If this list is empty (default), the frequency is not modified. This overwrites samples_frequency

  • samples_phase (TList(TFloat)) -- List of phase samples. If this list is empty (default), the phase is not modified.

  • duration (TFloat) -- The time in which the whole sequence of samples should be played back [s].

  • repetitions (TInt32) -- Number of times the sequence of all samples should be played. (default 1)

  • prepare_only (TBool) --

  • run_prepared (TBool) --

detune(frequency)#
Parameters:

frequency (TFloat) --

get_frequency()#
Return type:

TFloat

get_power()#
Return type:

TFloat

off()#
on()#
ramp(duration, frequency_start=- 1.0, frequency_end=- 1.0, amplitude_start=- 1.0, amplitude_end=- 1.0, power_start=- 1.0, power_end=- 1.0, ramp_timestep=- 1.0, ramp_steps=- 1)#

Ramp frequency and/or power/amplitude over a given duration.

Parameters default to -1 to indicate no change. If the start frequency/amplitude is set to -1, the ramp starts from the last frequency/amplitude which was set.

Either power or amplitude can be given to ramp the intensity of the laser. If power is given, it overwrites the value for the amplitude

This method advances the timeline by ´duration´

Parameters:
  • duration (TFloat) -- ramp duration [s]

  • frequency_start (TFloat) -- initial frequency [Hz]

  • frequency_end (TFloat) -- end frequency [Hz]

  • amplitude_start (TFloat) -- initial amplitude [Hz]

  • amplitude_end (TFloat) -- end amplitude [Hz]

  • power_start (TFloat) --

  • power_end (TFloat) --

  • ramp_timestep (TFloat) --

  • ramp_steps (TInt32) --

set_amplitude(amplitude)#
Parameters:

amplitude (TFloat) --

set_detuning(detuning)#
Parameters:

detuning (TFloat) --

set_frequency(frequency)#

Set the absolute frequency of the light after modulation

Parameters:

frequency (TFloat) -- Absolute frequency of the light after modulation in Hz

stabilize(enable)#
Parameters:

enable (TBool) --

class atomiq.components.laser.ContinuouslyStabilizedModulatedLaser(start_stabilized=True, *args, **kwargs)#

Bases: StabilizedModulatedLaser

A modulated laser power-stabilized through a continuous servo loop

If a laser is power-stabilized by an external (hardware) servo loop, it is represented by this abstract class.

Parameters:

start_stabilized (TBool) -- Should the servo loop be activated on startup? (default True)

A Switchable has one ore more channel(s) that can be switched on or off

arb(duration, samples_amp=[], samples_power=[], samples_freq=[], samples_det=[], samples_phase=[], repetitions=1, prepare_only=False, run_prepared=False, transform_amp=<function identity_float>, transform_freq=<function identity_float>, transform_phase=<function identity_float>)#

Play Arbitrary Samples from a List

This method allows to set the output amplitude, frequency an phase according to the values specified in respective lists. The whole sequence is played in the specified duration. The pattern store in the sample list can also be repeated.

We supports a scheme to prepare the arb function before it is actually used. If that is needed, run this function with prepare_only = True when the arb should be prepared and with run_only = True when the prepared arb should be played. In both calls the other parameters have to be passed.

Parameters:
  • samples_amp (TList(TFloat)) -- List of amplitude samples. If this list is empty (default), the amplitude is not modified.

  • samples_power (TList(TFloat)) -- List of power samples. If this list is empty (default), the amplitude is not modified. This overwrites samples_amp.

  • samples_freq (TList(TFloat)) -- List of frequency samples. If this list is empty (default), the frequency is not modified.

  • samples_det (TList(TFloat)) -- List of frequency samples relative to the zero frequency. If this list is empty (default), the frequency is not modified. This overwrites samples_frequency

  • samples_phase (TList(TFloat)) -- List of phase samples. If this list is empty (default), the phase is not modified.

  • duration (TFloat) -- The time in which the whole sequence of samples should be played back [s].

  • repetitions (TInt32) -- Number of times the sequence of all samples should be played. (default 1)

  • prepare_only (TBool) --

  • run_prepared (TBool) --

detune(frequency)#
Parameters:

frequency (TFloat) --

get_frequency()#
Return type:

TFloat

get_power()#
Return type:

TFloat

kernel_invariants = {'photodiode'}#
off()#
on()#
ramp(duration, frequency_start=- 1.0, frequency_end=- 1.0, amplitude_start=- 1.0, amplitude_end=- 1.0, power_start=- 1.0, power_end=- 1.0, ramp_timestep=- 1.0, ramp_steps=- 1)#

Ramp frequency and/or power/amplitude over a given duration.

Parameters default to -1 to indicate no change. If the start frequency/amplitude is set to -1, the ramp starts from the last frequency/amplitude which was set.

Either power or amplitude can be given to ramp the intensity of the laser. If power is given, it overwrites the value for the amplitude

This method advances the timeline by ´duration´

Parameters:
  • duration (TFloat) -- ramp duration [s]

  • frequency_start (TFloat) -- initial frequency [Hz]

  • frequency_end (TFloat) -- end frequency [Hz]

  • amplitude_start (TFloat) -- initial amplitude [Hz]

  • amplitude_end (TFloat) -- end amplitude [Hz]

  • power_start (TFloat) --

  • power_end (TFloat) --

  • ramp_timestep (TFloat) --

  • ramp_steps (TInt32) --

set_amplitude(amplitude)#
Parameters:

amplitude (TFloat) --

set_detuning(detuning)#
Parameters:

detuning (TFloat) --

set_frequency(frequency)#

Set the absolute frequency of the light after modulation

Parameters:

frequency (TFloat) -- Absolute frequency of the light after modulation in Hz

set_power(power)#

Set the absolute power of the light after modulation

Parameters:

power (TFloat) -- Absolute power of the light after modulation in W

stabilize(enable)#
Parameters:

enable (TBool) --