3.7.19. qupulse.pulses.time_reversal_pulse_template

Classes

TimeReversalPulseTemplate(inner[, ...])

This pulse template reverses the inner pulse template in time.

class qupulse.pulses.time_reversal_pulse_template.TimeReversalPulseTemplate(inner: qupulse.pulses.pulse_template.PulseTemplate, identifier: Optional[str] = None, registry: Optional[MutableMapping[str, Serializable]] = None)[source]

Bases: qupulse.pulses.pulse_template.PulseTemplate

This pulse template reverses the inner pulse template in time.

Initializes a Serializable.

Parameters

identifier – An optional, non-empty identifier for this Serializable. If set, this Serializable will always be stored as a separate data item and never be embedded.

Raises

ValueError – If identifier is the empty string

build_waveform(*args, **kwargs) Optional[qupulse.program.waveforms.Waveform][source]
property defined_channels: Set[Union[str, int]]

Implements defined_channels.

property duration: qupulse.expressions.sympy.ExpressionScalar

Implements duration.

get_serialization_data(serializer=None)[source]

Returns all data relevant for serialization as a dictionary containing only base types.

Implementation hint: In the old serialization routines, if the Serializable contains complex objects which are itself Serializables, a serialized representation for these MUST be obtained by calling the dictify() method of serializer. The reason is that serializer may decide to either return a dictionary to embed or only a reference to the Serializable subelement. This is DEPRECATED behavior as of May 2018. In the new routines, this will happen automatically and every Serializable is only responsible for returning it’s own data and leave nested Serializables in object form.

For the transition time where both implementations are available, implementations of this method should support the old and new routines, using the presence of the serializer argument to differentiate between both. Don’t make use of the implementation in this base class when implementing this method for the old routines.

Parameters

serializer (Serializer) – DEPRECATED (May 2018).A Serializer instance used to serialize complex subelements of this Serializable.

Returns

A dictionary of Python base types (strings, integers, lists/tuples containing these,

etc..) which fully represent the relevant properties of this Serializable for storing and later reconstruction as a Python object.

property integral: Dict[Union[str, int], qupulse.expressions.sympy.ExpressionScalar]

Implements integral.

property measurement_names: Set[str]

Implements measurement_names.

property parameter_names: Set[str]

Implements parameter_names.

with_time_reversal() qupulse.pulses.pulse_template.PulseTemplate[source]

Reverse this pulse template by creating a TimeReversalPT.

Examples

>>> from qupulse.pulses import FunctionPT
... forward = FunctionPT('sin(f * t)', duration_expression=10, channel='A')
... backward = fpt.with_time_reversal()
... forward_and_backward = forward @ backward