atomiq.components.optoelectronics.lightmodulator

Classes

Shutter

Component to switch light on or off depending on a logical signal. This could be a mechanical shutter or a binary

LightModulator

An abstract light modulator for frequency, amplitude, phase, polarisation

RFLightModulator

A light modulator driven by an RF source

AOM

An acousto-optical modulator to alter amplitude, frequency and phase of the light.

Module Contents

class atomiq.components.optoelectronics.lightmodulator.Shutter(switch, invert=False, opening_time=0, closing_time=0, *args, **kwargs)[source]

Bases: atomiq.components.primitives.Component, atomiq.components.primitives.Switchable

Component to switch light on or off depending on a logical signal. This could be a mechanical shutter or a binary only amplitude modulator (e.g. AOM, EOM, Pockels cell etc.). It requires a class:Switchable switch that operates the shutter

Parameters:
  • switch (Switchable) -- Switch that operates the shutter, e.g. TTL

  • invert (artiq.language.types.TBool) -- invert the logic of on and off

  • opening_time (artiq.language.types.TFloat) -- Time in s it takes from the arrival of the TTL until the shutter is fully opened (default 0)

  • closing_time (artiq.language.types.TFloat) -- Time in s it takes from the arrival of the TTL until the shutter is completely closed (default 0). Note that if closing_time is > 0 the shutter is already closing before the time at which the off() method is called

kernel_invariants
switch
invert = False
opening_time = 0
closing_time = 0
on()[source]

Opens the shutter. The time cursor is moved back in time to accommodate the opening_time of the shutter. After executing the on (or off if inverted) method of the defined switch the time cursor is then forwarded by opening_time again. The time cursor advancement is therefore given by the switch.on() or switch.off() method.

off()[source]

Closes the shutter. The time cursor is moved back in time to accommodate the closing_time of the shutter. After executing the off (or on if inverted) method of the defined switch the time cursor is then forwarded by closing_time again. The time cursor advancement is therefore given by the switch.on() or switch.off() method.

class atomiq.components.optoelectronics.lightmodulator.LightModulator(*args, **kwargs)[source]

Bases: atomiq.components.primitives.Component, atomiq.components.primitives.Parametrizable

An abstract light modulator for frequency, amplitude, phase, polarisation

This class serves as a base class for all kinds of electro-optic devices that can change the properties of light.

abstractmethod set_frequency(frequency)[source]

Set the frequency by which the light is shifted.

Parameters:

frequency (artiq.language.types.TFloat) -- Frequency in Hz by which the light is shifted.

abstractmethod get_frequency()[source]
Return type:

artiq.language.types.TFloat

abstractmethod set_amplitude(amplitude)[source]

Set the amplitude of the light after the modulator

Parameters:

amplitude (artiq.language.types.TFloat) -- Relative amplitude [0 .. 1] of the light after the modulator

abstractmethod set_phase(phase)[source]

Set the phase shift of the light imposed by the modulator

Parameters:

phase (artiq.language.types.TFloat) -- Phase shift in radians

abstractmethod set_polarisation(angle)[source]

Set the polarization rotation imposed by the modulator

Parameters:

angle (artiq.language.types.TFloat) -- Rotation angle in radians

class atomiq.components.optoelectronics.lightmodulator.RFLightModulator(rfsource, freq_limit, amp_limit=(0.0, 1.0), *args, **kwargs)[source]

Bases: LightModulator

A light modulator driven by an RF source

This class serves as a base class for devices like AOM, EOM, etc.

Parameters:
  • rfsource (RFSource) -- The rfsource that drives the modulator

  • freq_limit (tuple) -- Tuple (freq_min, freq_max) giving the minimum/maximum RF frequency that the modulator can handle in Hz.

  • amp_limit (tuple) -- Tuple (amp_min, amp_max) giving the minimum/maximum RF attenuation that the modulator can do in range [0..1].

kernel_invariants
rfsource
ramp(duration, frequency_start=float('nan'), frequency_end=float('nan'), amplitude_start=float('nan'), amplitude_end=float('nan'), ramp_timestep=float('nan'), ramp_steps=-1)[source]

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

Parameters default to -1 or nan to indicate no change. If no starting value is given, the ramp starts from the last frequency/amplitude which was set.

This method advances the timeline by ´duration´

Parameters:
  • duration (artiq.language.types.TFloat) -- ramp duration [s]

  • frequency_start (artiq.language.types.TFloat) -- initial frequency [Hz]

  • frequency_end (artiq.language.types.TFloat) -- end frequency [Hz]

  • amplitude_start (artiq.language.types.TFloat) -- initial amplitude

  • amplitude_end (artiq.language.types.TFloat) -- end amplitude

  • ramp_timestep (artiq.language.types.TFloat)

  • ramp_steps (artiq.language.types.TInt32)

arb(duration, samples_amp=[], samples_freq=[], samples_phase=[], repetitions=1, prepare_only=False, run_prepared=False, transform_amp=identity_float, transform_freq=identity_float, transform_phase=identity_float)[source]

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 prepapre_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_freq (TList(TFloat)) -- List of frequency samples. If this list is empty (default), the frequency is not modified.

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

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

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

  • prepare_only (artiq.language.types.TBool)

  • run_prepared (artiq.language.types.TBool)

_arb(duration, samples_amp=[], samples_freq=[], samples_phase=[], repetitions=1, prepare_only=False, run_prepared=False, transform_amp=identity_float, transform_freq=identity_float, transform_phase=identity_float)[source]
Parameters:
  • duration (artiq.language.types.TFloat)

  • samples_amp (TList(TFloat))

  • samples_freq (TList(TFloat))

  • samples_phase (TList(TFloat))

  • repetitions (artiq.language.types.TInt32)

  • prepare_only (artiq.language.types.TBool)

  • run_prepared (artiq.language.types.TBool)

get_frequency_min()[source]
Return type:

artiq.language.types.TFloat

get_frequency_max()[source]
Return type:

artiq.language.types.TFloat

get_frequency()[source]
Return type:

artiq.language.types.TFloat

_check_and_set_frequency(frequency)[source]
Parameters:

frequency (artiq.language.types.TFloat)

set_frequency(frequency)[source]

Set the frequency by which the light is shifted.

Parameters:

frequency (artiq.language.types.TFloat) -- Frequency in Hz by which the light is shifted.

get_amplitude_min()[source]
Return type:

artiq.language.types.TFloat

get_amplitude_max()[source]
Return type:

artiq.language.types.TFloat

get_amplitude()[source]
Return type:

artiq.language.types.TFloat

_check_and_set_amplitude(amplitude)[source]
Parameters:

amplitude (artiq.language.types.TFloat)

set_amplitude(amplitude)[source]

Set the amplitude of the light after the modulator

Parameters:

amplitude (artiq.language.types.TFloat) -- Relative amplitude [0 .. 1] of the light after the modulator

get_phase()[source]
Return type:

artiq.language.types.TFloat

set_phase(value)[source]

Set the phase shift of the light imposed by the modulator

Parameters:
  • phase -- Phase shift in radians

  • value (artiq.language.types.TFloat)

on()[source]
off()[source]
class atomiq.components.optoelectronics.lightmodulator.AOM(center_freq, freq_limit=None, bandwidth=None, switch=None, switching_delay=0, passes=1, order=1, am_calibration=None, *args, **kwargs)[source]

Bases: RFLightModulator, atomiq.components.primitives.Switchable

An acousto-optical modulator to alter amplitude, frequency and phase of the light.

A component to represent an AOM to attenuate, switch and frequency-shift light. It is controlled by an RFSource and a Switchable to rapidly switch the light on and off. As such, the AOM works also as a (non-perfect) shutter.

Parameters:
  • rfsource -- The rf source that drives the AOM

  • center_freq (artiq.language.types.TFloat) -- RF center frequency of the AOM in Hz.

  • freq_limit (tuple) -- Tuple (freq_min, freq_max) giving the minimum/maximum RF frequency that the AOM can handle in Hz. Either freq_limit xor bandwidth must be given

  • bandwidth (artiq.language.types.TFloat) -- RF bandwidth of the AOM around the center frequency in Hz. Either bandwidth xor freq_limit must be given.

  • switch (Switchable) -- An optional switch to rapidly switch on and off the AOM. If none is given the rfsource is used to switch.

  • switching_delay (artiq.language.types.TFloat) -- the switching delay of the AOM, i.e. the time it takes from the arrival of the TTL to having full optical power. (default 0)

  • passes (artiq.language.types.TInt32) -- How often does the beam pass the AOM? Singlepass -> 1, Doublepass -> 2 (default 1)

  • order (artiq.language.types.TInt32) -- The diffraction order the AOM is aligned to. -2, -1, 1, 2 ... (default 1)

  • am_calibration (Calibration) -- Calibration of RF power vs output power. Typically an inverse sigmoid. (default none)

kernel_invariants
center_freq
switching_delay = 0
passes = 1
order = 1
_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.

get_frequency_min()[source]
Return type:

artiq.language.types.TFloat

get_frequency_max()[source]
Return type:

artiq.language.types.TFloat

get_frequency()[source]
Return type:

artiq.language.types.TFloat

set_frequency(frequency)[source]

Set the frequency shift of the light coming out of the AOM

Parameters:

frequency (artiq.language.types.TFloat)

set_detuning(detuning)[source]

Set the frequency shift of the light coming out of the AOM relative to the center frequency

Parameters:

detuning (artiq.language.types.TFloat) -- Detuning from the AOM center frequency in Hz

detune(detuning)[source]

Alias for set_detuning()

Parameters:

detuning (artiq.language.types.TFloat)

_amplitude_transform_calibration(amplitude)[source]
Parameters:

amplitude (artiq.language.types.TFloat)

Return type:

artiq.language.types.TFloat

_amplitude_transform_identity(amplitude)[source]
Parameters:

amplitude (artiq.language.types.TFloat)

Return type:

artiq.language.types.TFloat

set_amplitude(amplitude)[source]

Set the amplitude of the light after the modulator

Parameters:

amplitude (artiq.language.types.TFloat) -- Relative amplitude [0 .. 1] of the light after the modulator

arb(duration, samples_amp=[], samples_freq=[], samples_det=[], samples_phase=[], repetitions=1, prepare_only=False, run_prepared=False, transform_amp=identity_float, transform_freq=identity_float, transform_phase=identity_float)[source]

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 prepapre_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_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 center 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 (artiq.language.types.TFloat) -- The time in which the whole sequence of samples should be played back [s].

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

  • prepare_only (artiq.language.types.TBool)

  • run_prepared (artiq.language.types.TBool)

ramp(duration, frequency_start=float('nan'), frequency_end=float('nan'), amplitude_start=float('nan'), amplitude_end=float('nan'), ramp_timestep=float('nan'), ramp_steps=-1)[source]

Ramp frequency and amplitude over a given duration.

Parameters default to -1 or nan to indicate no change. If the start frequency/amplitude is set to nan, the ramp starts from the last frequency/amplitude which was set. This method advances the timeline by ´duration´.

Note

The amplitude calibration is only applied at the start and end point of the ramp to reduce calculation overhead. This relies on the calibration being sufficiently linear in the ramp range.

Parameters:
  • duration (artiq.language.types.TFloat) -- ramp duration [s]

  • frequency_start (artiq.language.types.TFloat) -- initial frequency shift of the light exiting the AOM [Hz]

  • frequency_end (artiq.language.types.TFloat) -- final frequency shift of the light exiting the AOM [Hz]

  • amplitude_start (artiq.language.types.TFloat) -- initial amplitude

  • amplitude_end (artiq.language.types.TFloat) -- end amplitude

  • ramp_timestep (artiq.language.types.TFloat)

  • ramp_steps (artiq.language.types.TInt32)

on()[source]

Turns on the AOM. The time cursor is moved back in time to accommodate the switching_delay of the AOM. After executing the on method of the defined switch the time cursor is then forwarded by switching_delay again. The time cursor advancement is therefore given by the switch.on() method.

off()[source]

Turns off the AOM. The time cursor is moved back in time to accommodate the switching_delay of the AOM. After executing the off method of the defined switch the time cursor is then forwarded by switching_delay again. The time cursor advancement is therefore given by the switch.off() method.