zero.elements module

Base circuit elements

class zero.elements.BaseElement[source]

Bases: object

Represents a source or sink of a function, with a unit.

This is an abstract representation of components, nodes or noise sources.

ELEMENT_TYPE = None
ELEMENT_UNIT = None
property element_type
property element_unit
exception zero.elements.ElementNotFoundError(name, message="element '%s' not found", *args, **kwargs)[source]

Bases: Exception

class zero.elements.GenericElement(name, unit)[source]

Bases: zero.elements.BaseElement

Represents a generic element with custom unit.

This is used in place of components and nodes when creating functions with non-circuit elements.

ELEMENT_TYPE = '__custom__'
property element_unit
property label