pygsti.extras.drift.signal.generate_flat_signal

pygsti.extras.drift.signal.generate_flat_signal#

generate_flat_signal(power, nummodes, n, candidatefreqs=None, base=0.5, method='sharp')#

Generates a minimal sparsity probability trajectory for the specified power, and a specified number of modes containing non-zero power. This is a probability trajectory that has a signal power of power (where, for a probability trajectory p, the signal vector is s = p - mean(p)), and has that power equally spread over nummodes different frequencies. The phases on the amplitudes are randomized.

Parameters:
  • power (float) – The amount of power in the signal of the generated probability trajectory

  • nummodes (int) – The number of modes to equally spread that power over.

  • n (int) – The number of sample times that the probability trajectory is being created for.

  • candidatefreqs (list, optional) – A list containing a subset of 1,2,…,n-1. If not None, then all frequencies are included.

basefloat in (0,1), optional

The mean of the generated probability trajectory.

methodstr, optional

The method used to guarantee that the created probability trajectory is a valid probability, i.e., is within [0,1]. Options:

  • None. In this case nothing is done to guarantee that the output is a valid probability

    trajectory, but the power in the signal is guaranteed to be the input power.

  • ‘sharp’ or ‘logistic’. The ‘sharp’ or ‘logistic’ methods with the renormalizer()

    function are used to map the generated vector onto [0,1]. When the renormalizer does a non-trivial action on the generated vector, the power in the output will be below the requested power. Moreover, the power will not be distributed only over the requested number of modes (i.e., it impacts the spectrum of the output vector).

Returns:

A probability trajectory.

Return type:

array