ComponentΒΆ

Class Arguments

Argument

Type

Default Value

parent

identifier

TStr

debug_output

TBool

False

Bold arguments are mandatory. For more documentation on the listed arguments refer to the class definition below. If parameters appear in this list but not in the class definition below, please recursively check the linked base classes for the definition of the parameter.

Inheritance Diagram

Inheritance diagram of atomiq.components.primitives.Component

Example Component Dictionary

   {
    "primitives_example": {
        "classname": "atomiq.components.primitives.Component",
        "arguments": {
            "parent": "<mandatory parameter ()>",
            "identifier": "<mandatory parameter (TStr)>",
            "debug_output": false
        }
    }
}

Class Description

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]