3.6.3. qupulse.pulses.constant_pulse_template¶
This module defines the ConstantPulseTemplate, a pulse tempalte representating a pulse with constant values on all channels
- Classes:
ConstantPulseTemplate: Defines a pulse via channel-value pairs
- ConstantPulseWaveform: A waveform instantiated from a TablePulseTemplate by providing values for its
declared parameters.
- class qupulse.pulses.constant_pulse_template.ConstantPulseTemplate(duration, amplitude_dict, identifier=None, name=None, measurements=[], **kwargs)[source]¶
Bases:
qupulse.pulses.pulse_template.AtomicPulseTemplate
A qupulse waveform representing a multi-channel pulse with constant values
- Parameters
- __init__(duration, amplitude_dict, identifier=None, name=None, measurements=[], **kwargs)[source]¶
A qupulse waveform representing a multi-channel pulse with constant values
- build_waveform(parameters, channel_mapping)[source]¶
Implements
build_waveform()
.- Return type
Union
[ConstantWaveform
,MultiChannelWaveform
,None
]
- property defined_channels: Set[Union[str, int]]¶
Returns the number of hardware output channels this PulseTemplate defines.
- property duration: qupulse.expressions.ExpressionScalar¶
An expression for the duration of this PulseTemplate.
- Return type
- get_serialization_data()[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.
- Return type
- 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.ExpressionScalar]¶
Returns an expression giving the integral over the pulse.
- Return type
Dict
[Union
[str
,int
],ExpressionScalar
]
- property is_interruptable: bool¶
Return true, if this PulseTemplate contains points at which it can halt if interrupted.
- Return type
- property parameter_names: Set[str]¶
The set of names of parameters required to instantiate this PulseTemplate.