atomiq.components ================= .. py:module:: atomiq.components Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/atomiq/components/basics/index /autoapi/atomiq/components/coil/index /autoapi/atomiq/components/dummies/index /autoapi/atomiq/components/electronics/index /autoapi/atomiq/components/laser/index /autoapi/atomiq/components/lock/index /autoapi/atomiq/components/optimizers/index /autoapi/atomiq/components/optoelectronics/index /autoapi/atomiq/components/primitives/index /autoapi/atomiq/components/sinara/index Attributes ---------- .. autoapisummary:: atomiq.components.heros atomiq.components.RemoteHERO atomiq.components.logger atomiq.components.components atomiq.components.suservo_replacements Classes ------- .. autoapisummary:: atomiq.components.Component atomiq.components.Remote atomiq.components.ComponentFactory Functions --------- .. autoapisummary:: atomiq.components.get_class_by_name atomiq.components._create_device_replace atomiq.components.build_object_from_device_db atomiq.components.build_object_hero atomiq.components.build_object Package Contents ---------------- .. py:function:: get_class_by_name(name, relative_path=None) Resolve class by name :param name: (str) "%s.%s" % (module.name, class.name) :return: (class) .. py:class:: Component(parent, identifier, debug_output = False, *args, **kwargs) Bases: :py:obj:`artiq.language.environment.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. :param parent: The parent context of the component. Usually this is the experiment that uses the component :param identifier: A unique name to identify the component. :param 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. .. py:attribute:: kernel_invariants .. py:attribute:: experiment .. py:attribute:: identifier .. py:attribute:: debug_output :value: False .. py:attribute:: core .. py:attribute:: _kernel_invariants .. py:attribute:: _prepare_done :value: False .. py:attribute:: _build_done :value: False .. py:attribute:: _hooks_done :value: [] .. py:method:: _recursive_prepare() .. py:method:: _prepare() Specify here what should be done for this component in the prepare phase .. py:method:: _recursive_build() .. py:method:: _build() Specify here what should be done for this component in the build phase .. py:method:: _do_prerun() .. py:method:: required_components(ancestors=[]) .. py:method:: _prerun() 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. .. py:class:: Remote(remote_reference, sync = False) .. py:attribute:: remote_reference .. py:attribute:: sync :value: False .. py:data:: heros .. py:data:: RemoteHERO .. py:data:: logger .. py:data:: components :value: None .. py:data:: suservo_replacements :value: [] .. py:function:: _create_device_replace(desc, device_mgr, *args, **kwargs) .. py:function:: build_object_from_device_db(parent, object_id) .. py:function:: build_object_hero(parent, object_id) .. py:function:: build_object(classname, arg_dict) .. py:class:: ComponentFactory .. py:method:: produce(name, parent) :staticmethod: .. py:method:: _produce_from_dict(identifier, parent, dictionary) :staticmethod: