qilisdk.noise.offset_perturbation

Classes

OffsetPerturbation

Parameter perturbation that adds a constant offset.

Module Contents

class OffsetPerturbation(*, offset: float)[source]

Bases: qilisdk.noise.parameter_perturbation.ParameterPerturbation

Parameter perturbation that adds a constant offset.

Args: offset (float): Additive bias applied to the parameter value.

property offset: float[source]

Return the constant offset applied to parameter values.

Returns:

The additive offset.

Return type:

float

perturb(value: float) float[source]

Return a perturbed version of a parameter value.

Parameters:

value (float) – The original parameter value.

Returns:

The perturbed parameter value.