add_discrete_pulse

CircularDrivingField.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 segment k.

  • 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 as samples gives 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 current last_pulse_end.

Note

start can be set three ways:

  • None (default): append after the previous pulse on this field (this field’s own last_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 dt is not positive, or dt is a list whose length differs from samples.