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.

sample_average

sample_average(yvals, yerrs, shots)[source]

Compute sample based variance and average of the categorized data frame.

Original variance of the data is ignored and variance is computed with the y values.

Parameters:
  • yvals (ndarray) – Y values to average.

  • yerrs (ndarray) – Y errors to average (ignored).

  • shots (ndarray) – Number of shots used to obtain Y value and error.

Returns:

Averaged Y value, Y error, and total shots.

Return type:

Tuple[float, float, int]