Note

This is the documentation for the current state of the development branch of Qiskit Experiments. The documentation or APIs here can change prior to being released.

rb_decay

rb_decay(x, y, b=0.5)[source]

Get base of exponential decay function which is assumed to be close to 1.

This assumes following model:

\[y(x) = a \alpha^x + b.\]

To estimate the base of decay function \(\alpha\), we consider

\[y'(x) = y(x) - b = a \alpha^x,\]

and thus,

\[y'(x+dx) = a \alpha^x \alpha^dx.\]

By considering the ratio of y values at \(x+dx\) to \(x\),

\[ry = \frac{a \alpha^x \alpha^dx}{a \alpha^x} = \alpha^dx.\]

From this relationship, we can estimate \(\alpha\) as

\[\alpha = ry^\frac{1}{dx}.\]
Parameters:
  • x (ndarray) – Array of x values.

  • y (ndarray) – Array of y values.

  • b (float) – Asymptote of decay function.

Returns:

Base of decay function.

Return type:

float