atomiq.components.primitives module

All components in atomiq derive from the Component class. In addition they can inherit from one or more primitive classes, depending on the properties of the respective component. If, for example, the component represents a device that can measure something, it will inherit from Measurable. If on the other hand, it can be switched, it will inherit from Switchable.

atomiq.components.primitives.add_or_append(obj, member, value)[source]
class atomiq.components.primitives.Component(parent, identifier, debug_output=False, *args, **kwargs)[source]

Bases: HasEnvironment

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 (TStr) -- A unique name to identify the component.

  • debug_output (TBool) -- 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.

kernel_invariants = {'core', 'debug_output', 'experiment', 'identifier'}
required_components(ancestors=[])[source]
class atomiq.components.primitives.Measurable(channels)[source]

Bases: object

A Measurable has one or more channels at which data can be measured

Parameters:

channels (TList(TStr))

kernel_invariants = {'channels'}
measure(channel='')[source]
Parameters:

channel (artiq.compiler.types.TMono('str', OrderedDict()))

Return type:

artiq.compiler.types.TMono('float', OrderedDict())

measurement_channels()[source]
class atomiq.components.primitives.Triggerable(channels)[source]

Bases: object

A Triggerable has one or more channel(s) that can be triggered

Parameters:

channels (TList(TStr))

kernel_invariants = {'channels'}
fire(channel='')[source]
Parameters:

channel (artiq.compiler.types.TMono('str', OrderedDict()))

class atomiq.components.primitives.Switchable(channels)[source]

Bases: object

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

Parameters:

channels (TList(TStr))

kernel_invariants = {'channels'}
on(channel=None)[source]
Parameters:

channel (artiq.compiler.types.TMono('str', OrderedDict()))

off(channel=None)[source]
Parameters:

channel (artiq.compiler.types.TMono('str', OrderedDict()))

is_on(channel=None)[source]
Parameters:

channel (artiq.compiler.types.TMono('str', OrderedDict()))

toggle(channel=None)[source]
Parameters:

channel (artiq.compiler.types.TMono('str', OrderedDict()))

pulse(pulsetime, channel='')[source]
Parameters:
  • pulsetime (artiq.compiler.types.TMono('float', OrderedDict()))

  • channel (artiq.compiler.types.TMono('str', OrderedDict()))

class atomiq.components.primitives.Parametrizable(channels)[source]

Bases: object

A Parametrizable is an entity that can be controlled by one or more continuous parameter(s)

Parameters:

channels (TList(TStr))

kernel_invariants = {'channels'}
set_parameter(value, channel=None)[source]
Parameters:
  • value (artiq.compiler.types.TMono('float', OrderedDict()))

  • channel (artiq.compiler.types.TMono('str', OrderedDict()))

class atomiq.components.primitives.Remote(remote_reference, sync=False)[source]

Bases: object

An abstract class to represent a remote device, i.e. a device that ist not directly attached to the realtime control system (ARTIQ) but is rather controlled through a non-realtime link (i.e. HEROS, pyon, pyro, etc.)

Parameters:
  • remote_reference (str) -- A reference to the remote site that can handle the component. E.g. URL, IP, port, UID..

  • sync (bool) -- Is synchronous operation required, i.e. do we need to wait for the response of the remote site?