opto.trace.propagators.propagators#

Module Contents#

Classes#

AbstractPropagator

AbstractFeedback

Feedback container used by propagators. It needs to support addition.

Propagator

SumPropagator

API#

class AbstractPropagator[source]#
abstract propagate(child: opto.trace.nodes.MessageNode) Dict[opto.trace.nodes.Node, Any][source]#

Compute propagated feedback to node.parents of a node. Return a dict where the keys are the parents and the values are the propagated feedback.

class AbstractFeedback[source]#

Feedback container used by propagators. It needs to support addition.

class Propagator[source]#

Bases: opto.trace.propagators.propagators.AbstractPropagator

Initialization

register(operator_name, propagate_function)[source]#
propagate(child: opto.trace.nodes.MessageNode) Dict[opto.trace.nodes.Node, Any][source]#
abstract init_feedback(node: opto.trace.nodes.Node, feedback: Any)[source]#

Given raw feedback, create the feedback object that will be propagated recursively.

class SumPropagator[source]#

Bases: opto.trace.propagators.propagators.Propagator

Initialization

init_feedback(feedback: Any)[source]#