pygsti.extras.drift.probtrajectory.amplitude_compression#
- amplitude_compression(probtrajectory, times, epsilon=0.0, verbosity=1)#
Reduces the amplitudes in a CosineProbTrajectory model until the model is valid, i.e., all probabilities are within [0, 1]. Also rectifies any of the constant components of the probability trajectories that are slightly outside [0, 1].
- Parameters:
probtrajectory (CosineProbTrajectory) – The model on which to perform the amplitude reduction
times (list) – The times at which to enforce the validity of the model (this algorithm does not guarantee that the probabilities will be within [0, 1] at all times in the reals).
epsilon (float, optional) – The amplitudes are compressed so that all the probabilities are within [0+epsilon,1-epsilon] at all times. Setting this to be larger than 0 can be useful as it guarantees that the resultant probability trajectory has a non-zero likelihood.
- Returns:
CosineProbTrajectory – The new model, that may have had the amplitudes reduced
Bool – Whether or not the function did anything non-trivial, i.e, whether any compression was required.