quantify_scheduler.operations.stitched_pulse
Module Contents
Classes
A pulse composed of multiple operations that together constitute a waveform. |
|
The StitchedPulseBuilder can be used to create a StitchedPulse incrementally by |
- class StitchedPulse(pulse_info: List[Any] | None = None)[source]
Bases:
quantify_scheduler.operations.operation.Operation
A pulse composed of multiple operations that together constitute a waveform.
This class can be used to construct arbitrarily long waveforms by stitching together pulses with optional changes in offset in between.
- Parameters
pulse_info (List[Any] or None, optional) – A list containing the pulses that are part of the StitchedPulse. By default None.
- add_pulse(pulse_operation: quantify_scheduler.operations.operation.Operation) None [source]
Adds pulse_info of pulse_operation Operation to this Operation.
- Parameters
pulse_operation (Operation) – an operation containing pulse_info.
- Raises
ValueError – When the operation’s port and/or clock do not match those of the previously added SitchedPulse components.
- class StitchedPulseBuilder(port: str | None = None, clock: str | None = None, t0: float = 0.0)[source]
The StitchedPulseBuilder can be used to create a StitchedPulse incrementally by adding pulse and offset operations.
- Parameters
port (str or None, optional) – Port of the stitched pulse. This can also be added later through
set_port()
. By default None.clock (str or None, optional) – Clock used to modulate the stitched pulse. This can also be added later through
set_clock()
. By default None.t0 (float, optional) – Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule. This can also be added later through
set_t0()
. By default None.
- set_port(port: str) StitchedPulseBuilder [source]
Set the port for all parts of the StitchedPulse.
- Parameters
port (str) – Port of the stitched pulse.
- Return type
- set_clock(clock: str) StitchedPulseBuilder [source]
Set the clock for all parts of the StitchedPulse.
- Parameters
clock (str) – Clock used to modulate the stitched pulse.
- Return type
- set_t0(t0: float) StitchedPulseBuilder [source]
Set the start time of the whole StitchedPulse.
- Parameters
t0 (float) – Time in seconds when to start the pulses relative to the start time of the Operation in the Schedule.
- Return type
- add_pulse(pulse: quantify_scheduler.operations.operation.Operation, append: bool = True) StitchedPulseBuilder [source]
Add an Operation to the StitchedPulse that is a valid pulse.
- Parameters
- Return type
- Raises
RuntimeError – If the Operation is not a pulse.
- add_voltage_offset(path_0: float, path_1: float, duration: float | None = None, rel_time: float = 0.0, append: bool = True, min_duration: float = qblox_constants.GRID_TIME * 1e-09) StitchedPulseBuilder [source]
Add a DC voltage offset to the StitchedPulse.
- Parameters
path_0 (float) – The offset on path 0 of the sequencer.
path_1 (float) – The offset on path 1 of the sequencer.
duration (float or None, optional) – Specifies how long to maintain the offset. If set to None, the offset voltage offset will hold until the end of the StitchedPulse. By default None.
rel_time (float, optional) – Specifies when to set the offset, relative to the current end of the StitchedPulse (if
append = True
), or to the start of the StitchedPulse (ifappend = False
). By default 0.0.append (bool, optional) – Specifies whether to append the operation to the end of the StitchedPulse, or to insert it at a time relative to the start of the StitchedPulse, specified by the the rel_time argument. By default True.
min_duration (float, optional) – The minimal duration of the voltage offset. By default equal to the grid time of Qblox modules.
- Return type
- Raises
ValueError – If the duration is not at least
min_duration
.RuntimeError – If the offset overlaps in time with a previously added offset.
- _build_voltage_offset_operations() List[quantify_scheduler.operations.pulse_library.VoltageOffset] [source]
Add offset instructions that reset any offset that had a specified duration.
If an offset was added without a duration, it is assumed that its duration should be until the end of the StitchedPulse, and any following offsets that _do_ have a duration will be reset to this value. Otherwise, offsets with a duration will be reset to 0.
At the end of the StitchedPulse, the offset will be reset to 0.
An offset does not need to be reset, if at the end of its duration, another offset instruction starts.
- _overlaps_with_existing_offsets(offset: _VoltageOffsetInfo) bool [source]
- build() StitchedPulse [source]
Build the StitchedPulse.
- Return type