Fix time array in interpolated complex waveform

Explanation of changes

This closes initially addressed issue #434 (closed), where a numerical pulse created at a time after start of a schedule would be wrong. But it only affect plotting.

The MR now addresses the reason that the plotting bug was not caught before, which is extrapolation of the waveform beyond the given samples. The interpolated_complex_waveform method now allows extrapolation only when t starts less than one t_sample before the start of t_samples, and when t ends less than one t_sample after the end of t_samples. This helps with rounding errors.

Motivation of changes

Pulses should not be extrapolated far beyond the defined samples.


Merge checklist

See also merge request guidelines

  • Merge request has been reviewed (in-depth by a knowledgeable contributor), and is approved by a project maintainer.
  • New code is covered by unit tests (or N/A).
  • New code is documented and docstrings use numpydoc format (or N/A).
  • New functionality: considered making private instead of extending public API (or N/A).
  • Public API changed: added @deprecated (or N/A).
  • Tested on hardware (or N/A).
  • CHANGELOG.md and AUTHORS.md have been updated (or N/A).
  • Windows tests in CI pipeline pass (manually triggered by maintainers before merging).
    • Maintainers do not hit Auto-merge, we need to actively check as manual tests do not block pipeline

For reference, the issues workflow is described in the contribution guidelines.

Edited by Edgar Reehuis

Merge request reports

Loading