class Stf(operation, value_shape, batch_shape)

A sampleable tensor-valued function of time (or batch of such functions).

You can use the arithmetic operators +, -, *, **, /, //, and @ to perform operations between two Stf objects or between an Stf and a Tensor.

  • value_shape (tuple) – The shape of the function value.

  • batch_shape (tuple) – The shape of the batch in the function.

See also


Operation to create an Stf representing the identity function.


Stf represents an arbitrary function of time. Piecewise-constant (PWC) or constant functions are special cases of Stfs and the Q-CTRL Python package provides specific APIs to support them. Note that as the PWC property can simplify the calculation, you should always consider using PWC-related APIs if your system parameters or controls are described by PWC functions.

For more information on Stf nodes see the Working with time-dependent functions in Boulder Opal topic.