class RestlessNode(validate=True, memory_allocation=ShotOrder.circuit_first)[source]#

An abstract node for restless data processing nodes.

In restless measurements, the qubit is not reset after each measurement. Instead, the outcome of the previous quantum non-demolition measurement is the initial state for the current circuit. Restless measurements therefore require special data processing nodes that are implemented as sub-classes of RestlessNode. Restless experiments provide a fast alternative for several calibration and characterization tasks, for details see

This node takes as input an array of arrays (2d array) where the sub-arrays are the memories of each measured circuit. The sub-arrays therefore have a length given by the number of shots. This data is reordered into a one dimensional array where the element at index j was the jth measured shot. This node assumes by default that a list of circuits [circ_1, cric_2, ..., circ_m] is measured n_shots times according to the following order:

    circuit 1 - shot 1,
    circuit 2 - shot 1,
    circuit m - shot 1,
    circuit 1 - shot 2,
    circuit 2 - shot 2,
    circuit m - shot 2,
    circuit 1 - shot 3,
    circuit m - shot n,

Once the shots have been ordered in this fashion the data can be post-processed.

Initialize a restless node.

  • validate (bool) – If set to True the node will validate its input.

  • memory_allocation (ShotOrder) – If set to “c” the node assumes that the backend subsequently first measures all circuits and then repeats this n times, where n is the total number of shots. The default value is “c”. If set to “s” it is assumed that the backend subsequently measures each circuit n times.



Call the data action of this node on the data.


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.


The processed data.

Return type: