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.

RestlessToCounts

class RestlessToCounts(num_qubits, validate=True)[source]

Post-process restless data and convert restless memory to counts.

This node first orders the measured restless data according to the measurement sequence and then compares each bit in a shot with its value in the previous shot. If they are the same then the bit corresponds to a 0, i.e. no state change, and if they are different then the bit corresponds to a 1, i.e. there was a state change.

Parameters:
  • num_qubits (int) – The number of qubits which is needed to construct the header needed by qiskit.result.postprocess.format_counts_memory to convert the memory into a bit-string of counts.

  • 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