identity_stf

Graph.identity_stf()

Create an Stf representing the identity function, f(t) = t.

Returns:

An Stf representing the identity function.

Return type:

Stf

See also

Graph.constant_stf

Create a batch of constant Stfs.

Graph.discretize_stf

Discretize an Stf into a Pwc.

Graph.sample_stf

Sample an Stf at given times.

Notes

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

Examples

Create Gaussian pulse.

>>> time = graph.identity_stf()
>>> time
<Stf: operation_name="identity_stf", value_shape=(), batch_shape=()>
>>> gaussian = graph.exp(- time ** 2)
>>> gaussian
<Stf: operation_name="exp", value_shape=(), batch_shape=()>

See more examples in the How to define continuous analytical Hamiltonians user guide.