3.6.19. qupulse.pulses.time_reversal_pulse_template¶
Classes
|
This pulse template reverses the inner pulse template in time. |
- class TimeReversalPulseTemplate(inner: PulseTemplate, identifier: str | None = None, registry: MutableMapping[str, Serializable] | None = None, metadata: TemplateMetadata | dict = None)[source]¶
Bases:
PulseTemplateThis 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
- property defined_channels: Set[str | int]¶
Implements
PulseTemplate.defined_channels.
- property duration: ExpressionScalar¶
Implements
PulseTemplate.duration.
- property final_values: Dict[str | int, ExpressionScalar]¶
Values of defined channels at t == self.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 initial_values: Dict[str | int, ExpressionScalar]¶
Values of defined channels at t == 0
- property integral: Dict[str | int, ExpressionScalar]¶
Implements
PulseTemplate.integral.
- property measurement_names: Set[str]¶
Implements
PulseTemplate.measurement_names.
- property parameter_names: Set[str]¶
Implements
PulseTemplate.parameter_names.
- with_time_reversal() 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