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.

AverageData

class AverageData(axis, validate=True)[source]

A node to average data representable as numpy arrays.

Initialize a data averaging node.

Parameters:
  • axis (int) – The axis along which to average.

  • validate (bool) – If set to False the DataAction will not validate its input.

Notes

If the input array has no standard error, then this node will compute the standard error of the mean, i.e. the standard deviation of the datum divided by \(\sqrt{N}\) where \(N\) is the number of data points. Otherwise the standard error is given by the square root of \(N^{-1}\) times the sum of the squared errors.

Methods

__call__(data)

Call the data action of this node on the data.

Parameters:

data (ndarray) – A numpy array with arbitrary dtype. If the elements are ufloat objects consisting of a nominal value and a standard error, then the error propagation is done automatically.

Returns:

The processed data.

Return type:

ndarray