atomiq.components.dummies

This module gathers differnt dummy components that mimic hardware but do nothing. They are mainly used for debugging atomiq

Classes

DummyADC

An analog-to-ditigal converter (ADC) with multiple channels

DummyRFSource

A dummy RFSource used for debugging

DummyDAC

A DAC with multiple channels

DummyActor

An atomiq Component

DummyMonitor

An atomiq Component

DummySwitch

An atomiq Component

Module Contents

class atomiq.components.dummies.DummyADC(return_value, *args, **kwargs)[source]

Bases: atomiq.components.electronics.adc.ADC

An analog-to-ditigal converter (ADC) with multiple channels

Many ADCs come with multiple channels that are always sampled together. This class represents such ADCs

Parameters:
  • num_chan -- Number of channels the ADC has.

  • return_value (artiq.language.types.TFloat)

kernel_invariants
return_value
_measure(target_arr)[source]
Parameters:

target_arr (TArray(TFloat))

Return type:

TArray(TFloat)

class atomiq.components.dummies.DummyRFSource(default_frequency=100000000.0, default_amplitude=0.0, default_phase=0.0, freq_limit=(0.0, float('inf')), amp_limit=(0.0, 1.0), blind=False, default_ramp_steps=30, *args, **kwargs)[source]

Bases: atomiq.components.electronics.rfsource.RFSource

A dummy RFSource used for debugging

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

  • default_amplitude (artiq.language.types.TFloat)

  • default_phase (artiq.language.types.TFloat)

  • freq_limit (tuple)

  • amp_limit (tuple)

  • blind (artiq.language.types.TBool)

  • default_ramp_steps (artiq.language.types.TInt32)

_set_frequency(frequency)[source]
_set_amplitude(amplitude)[source]
_set_phase(phase)[source]
class atomiq.components.dummies.DummyDAC(*args, **kwargs)[source]

Bases: atomiq.components.electronics.voltagesource.DAC

A DAC with multiple channels

Parameters:

num_chan -- Number of channels the DAC has

values
set_channel_voltage(channel, voltage)[source]
Parameters:
  • channel (artiq.language.types.TInt32)

  • voltage (artiq.language.types.TFloat)

update()[source]
class atomiq.components.dummies.DummyActor(*args, **kwargs)[source]

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

An atomiq Component

Every component in atomiq inherits from this class. It provides basic functionality for automatic and recursive building and initialization of components (prepare, build, prerun). It also takes care for joining kernel invariants along the inheritance tree.

Note

The arguments parent and identifier are automatically passed to the component object by the atomiq object builder.

Parameters:
  • parent -- The parent context of the component. Usually this is the experiment that uses the component

  • identifier -- A unique name to identify the component.

  • debug_output -- Set whether the component should show debug output. Using this switch rather than the debug kernel logger can allow the compiler to not include the debug commands in the kernel code if the output is not needed.

amplitude = 0.0
set_amplitude(amp)[source]
Parameters:

amp (artiq.language.types.TFloat)

class atomiq.components.dummies.DummyMonitor(dummy_actor, *args, **kwargs)[source]

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

An atomiq Component

Every component in atomiq inherits from this class. It provides basic functionality for automatic and recursive building and initialization of components (prepare, build, prerun). It also takes care for joining kernel invariants along the inheritance tree.

Note

The arguments parent and identifier are automatically passed to the component object by the atomiq object builder.

Parameters:
  • parent -- The parent context of the component. Usually this is the experiment that uses the component

  • identifier -- A unique name to identify the component.

  • debug_output -- Set whether the component should show debug output. Using this switch rather than the debug kernel logger can allow the compiler to not include the debug commands in the kernel code if the output is not needed.

  • dummy_actor (DummyActor)

dummy_actor
get_voltage()[source]
Return type:

artiq.language.types.TFloat

class atomiq.components.dummies.DummySwitch(channels, *args, **kwargs)[source]

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

An atomiq Component

Every component in atomiq inherits from this class. It provides basic functionality for automatic and recursive building and initialization of components (prepare, build, prerun). It also takes care for joining kernel invariants along the inheritance tree.

Note

The arguments parent and identifier are automatically passed to the component object by the atomiq object builder.

Parameters:
  • parent -- The parent context of the component. Usually this is the experiment that uses the component

  • identifier -- A unique name to identify the component.

  • debug_output -- Set whether the component should show debug output. Using this switch rather than the debug kernel logger can allow the compiler to not include the debug commands in the kernel code if the output is not needed.

states
_get_channel_index(channel)[source]
Parameters:

channel (artiq.language.types.TStr)

Return type:

artiq.language.types.TInt32

on(channel='')[source]
Parameters:

channel (artiq.language.types.TStr)

off(channel='')[source]
Parameters:

channel (artiq.language.types.TStr)

is_on(channel='')[source]
Parameters:

channel (artiq.language.types.TStr)

Return type:

artiq.language.types.TBool