Add offset parameter to ramp pulse
Explanation of changes
Add an offset to the ramp pulse.
Motivation of changes
The default value for the offset is zero for backwards compatibility. An option might be to change the signature to
class RampPulse(Operation):
"""
The RampPulse Operation is a real-valued pulse that ramps from the specified offset
to the specified amplitude + offset during the duration of the pulse.
"""
def __init__(
self,
amp: float,
duration: float,
port: str,
*,
offset: float = 0,
clock: str = BasebandClockResource.IDENTITY,
t0: float = 0,
data: Optional[dict] = None,
):
so that all non-default arguments should be set by keyword.
Merge checklist
See also merge request guidelines
-
Merge request has been reviewed and approved by a project maintainer. -
Merge request contains a clear description of the proposed changes and the issue it addresses. -
Merge request made onto appropriate branch (develop for most MRs). -
New code is fully tested. -
New code is documented and docstrings use numpydoc format. -
CHANGELOG.rstandAUTHORS.rsthave been updated (when applicable). -
CI pipelines pass - black code-formatting passes (gitlab-ci),
- test suite passes (gitlab-ci),
- no degradation in code-coverage (codacy),
- no (serious) new pylint code quality issues introduced (codacy),
- documentation builds successfully (CI and readthedocs),
-
windows tests pass (manually triggered by maintainers before merging).
For reference, the issues workflow is described in the contribution guidelines.
Edited by Damien Crielaard