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.

MemoryToCounts

class MemoryToCounts(validate=True)[source]

A data action that takes discriminated data and transforms it into a counts dict.

This node is intended to be used after the DiscriminatorNode node. It will convert the classified memory into a list of count dictionaries wrapped in a numpy array.

Create new node.

Parameters:

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

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