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.

inverse_weighted_variance

inverse_weighted_variance(yvals, yerrs, shots)[source]

Compute inverse weighted variance and weighted average of the categorized data frame.

Sample is weighted by the inverse of the data variance.

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

  • yerrs (ndarray) – Y errors to average.

  • 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]