Skip to content

removed positive amplitude constraint in Rabi analysis

Adriaan requested to merge rabi_allow_negative_amps into develop

Explanation of changes

Removed the positive amplitude constraint when fitting a Rabi and added a test. It also turns out (even with the constraint still there) that the fit failed indicator is not reliable. I have updated the bad-fit test to rely on random noise as input, but even then the indicator does not reliably show. I have marked this test as an xfail.

Motivation of changes

A Rabi is typically performed before the readout is calibrated. This means that the result will consist of an oscialltion between two complex values.

The amplitude of this oscillation can be either positive or negative, but when the amplitude is negative, the fit will fail. This will result in the Rabi analysis not working for data we can expect from the experiment.

I have removed the constraint and added a test

Below a figure that shows a failed fit for a perfectly good rabi signal.

Rabi_oscillation


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 has 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 Adriaan

Merge request reports