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.
shot_weighted_average¶
- shot_weighted_average(yvals, yerrs, shots)[source]¶
Compute shot based variance and weighted average of the categorized data frame.
Sample is weighted by the shot number.
- 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, float]