iqm.pulse.gates.cz.split_flat_top_part_into_granular_parts

iqm.pulse.gates.cz.split_flat_top_part_into_granular_parts#

iqm.pulse.gates.cz.split_flat_top_part_into_granular_parts(duration, full_width, rise_time, granularity, precision=1e-10)#

To save waveform memory, a (long) flat-top pulse, which is defined by its duration, full_width and rise_time, is divided into three consecutive parts (rise, flat, and fall), all of which conform to the granularity of the device.

Parameters:
  • duration (float) – pulse duration in seconds.

  • full_width (float) – full width of the pulse.

  • rise_time (float) – rise time of the pulse.

  • granularity (float) – minimum allowed pulse duration.

  • precision (float) – precision of rounding to granularity,

Returns:

  • flat part duration

  • rise (or fall) part duration

  • rise time

  • flat part’s non-granular leftover, which is transferred to the rise and fall parts

Return type:

A tuple containing

Raises:
  • ValueError – Error is raised if duration is not a multiple of granularity.

  • ValueError – Error is raised if pulse parameters do not obey duration >= full_width >= 2*rise_time.