add_discrete_pulse
- LinearDrivingField.add_discrete_pulse(samples, frequency, dt, start=None)
Add a piecewise-constant pulse to this driving field.
The complex envelope is held constant on each segment, giving a GRAPE-style control pulse.
- Parameters:
samples (
List[float|complex]) – Complex envelope value on each segment (in \(\text{T}\));samples[k]sets the amplitude and phase of segmentk.frequency (
float) – Carrier frequency of the pulse (in \(\text{MHz}\)).dt (
float|List[float]) – Segment duration(s) (in \(\mu\text{s}\)). A scalar uses the same step for every segment; a list the same length assamplesgives a per-segment duration.start (
float|None) – Absolute start time of the pulse (in \(\mu\text{s}\)). See the note below for the three ways to set it; defaults to this field’s currentlast_pulse_end.
Note
startcan be set three ways:None(default): append after the previous pulse on this field (this field’s ownlast_pulse_end).a float: an explicit absolute time (in \(\mu\text{s}\)).
model.last_pulse_end: the global end, i.e. after the latest pulse across all driving fields – use this to start a pulse on one field right after a sequence built on another field.
- Raises:
SimphonyError – If any
dtis not positive, ordtis a list whose length differs fromsamples.