atomiq.components.sinara.sampler

Classes

Sampler

Sinara Sampler 8 Channel ADC

SamplerChannel

Single ADC Channel of a Sinara Sampler

Module Contents

class atomiq.components.sinara.sampler.Sampler(sampler_device, default_gain=[np.int32(0)] * 8, *args, **kwargs)[source]

Bases: atomiq.components.electronics.adc.ADC

Sinara Sampler 8 Channel ADC

This class represents the Sinara Sampler with all its 8 channels. It allows to sample all channels at once and to read out the result.

Parameters:
  • sampler_device -- The ARTIQ device for the sampler from the device_db, e.g. @sampler0

  • default_gain (list[numpy.int32]) -- List with 8 entries setting the default gain for the 8 channels at startup. (default [0, .. , 0])

kernel_invariants
_sampler_device
default_gain
_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(channel, gain=np.int32(0))[source]
Parameters:
  • channel (numpy.int32)

  • gain (numpy.int32)

_measure(target_arr)[source]

Measure a single sample on all 8 channels at once.

This function advances the timeline by 175 us

Parameters:

target_arr (TArray(TFloat))

Return type:

TArray(TFloat)

num_chan
invalid_return
_build()

Specify here what should be done for this component in the build phase

measure(samples=np.int32(1), channel='')

Measures all channels and returns the mean for a given number of subsequent samples.

This method advances the timeline by samples * sampling_time

Parameters:
  • samples (numpy.int32) -- number of samples to take and average

  • channel (str)

Return type:

TArray(TFloat)

experiment
identifier
debug_output = False
core
_kernel_invariants
_prepare_done = False
_build_done = False
_hooks_done = []
children = []
__in_build = True
channels: list[str]
measurement_channels()
class atomiq.components.sinara.sampler.SamplerChannel(default_gain=np.int32(0), *args, **kwargs)[source]

Bases: atomiq.components.electronics.adc.ADCChannel

Single ADC Channel of a Sinara Sampler

This class represents a single channel of a Sinara Sampler as an ADCChannel.

Parameters:

default_gain (numpy.int32) -- Default gain to set for the Sampler channel at startup. (default 0)

adc_device: Sampler
set_gain(gain)[source]

Set the gain for the Sampler Channel

Parameters:

gain (numpy.int32) -- Gain in machine units (0: 1, ..., 3: 1000)

kernel_invariants
channel
measure(samples=np.int32(1), cached=False, channel='')
Parameters:
  • samples (numpy.int32)

  • cached (bool)

  • channel (str)

Return type:

float

experiment
identifier
debug_output = False
core
_kernel_invariants
_prepare_done = False
_build_done = False
_hooks_done = []
children = []
__in_build = True
channels: list[str]
measurement_channels()