Skip to content

analysis_models

tergite_autocalibration.lib.utils.analysis_models

Classes:

Name Description
ExpDecayModel

Generate an exponential decay model that can be fit to randomized benchmarking data.

QuadraticModel

A quadratic model, with three Parameters: x0, a, and c.

RabiModel

Generate a cosine model that can be fit to Rabi oscillation data.

RamseyModel

Model for exponentially decaying sinusoidal data of the form

ThreeClassBoundary

Defines the classification boundaries when discriminating between

TwoClassBoundary

Converts the boundary encoded in the LDA discriminator.

Functions:

Name Description
parabolic

Return a parabolic function.

ExpDecayModel

ExpDecayModel(*args, **kwargs)

Bases: Model

Generate an exponential decay model that can be fit to randomized benchmarking data.

QuadraticModel

QuadraticModel(independent_vars=['x'], prefix='', nan_policy='raise', **kwargs)

Bases: Model

A quadratic model, with three Parameters: x0, a, and c.

Defined as:

.. math::

1
f(x; x0, a, c) =  a * (x-x0)**2  + c

Methods:

Name Description
guess

Estimate initial model parameter values from data.

guess

guess(data, x, **kwargs)

Estimate initial model parameter values from data.

RabiModel

RabiModel(*args, **kwargs)

Bases: Model

Generate a cosine model that can be fit to Rabi oscillation data.

RamseyModel

RamseyModel(*args, **kwargs)

Bases: Model

Model for exponentially decaying sinusoidal data of the form amplitudeexp(-tau * t)sin(frequency * t + phase) + offset tau is the characteristic decay constant and omega the frequency of the measured Ramsey Oscillations. The data are collected over a sequence of Ramsey delays t, i.e. delays between two consecutive X90 gates. Used by measurements that calibrate or characterize qubit dephasing: Ramsey correction, T2, T2echo

ThreeClassBoundary

ThreeClassBoundary(lda: LinearDiscriminantAnalysis)

Defines the classification boundaries when discriminating between the |0>, |1>, |2> qubit states. Such definition requires 5 parameters: the (I,Q) coordinates of the point where the three lines meet (centroid) the angles omega_ij that define the direction of each line with respect to the I axis

Attributes

centroid_I: float the I coordinate of the point where the three classification lines meet centroid_Q: float the Q coordinate of the point where the three classification lines meet omega_01: float the angle in degrees in the range [0,360) of the boundary between |0> and |1> omega_12: float the angle in degrees in the range [0,360) of the boundary between |1> and |2> omega_20: float the angle in degrees in the range [0,360) of the boundary between |2> and |0>

Methods

boundary_line (int: class_a, class_a) -> (np.ndarray, np.ndarray): used for plotting, returns the x and y points needed to plot the line between the classes class_a and class_b. The line starts at the centroid.

Methods:

Name Description
omega

Be careful: angle defined in the [0,360) range

omega

omega(index_a: int, index_b: int)

Be careful: angle defined in the [0,360) range

TwoClassBoundary

TwoClassBoundary(lda: LinearDiscriminantAnalysis)

Converts the boundary encoded in the LDA discriminator. The LDA boundary (also called threshold) has the form Ax + By + y_intercept = 0. This boundary is converted: i. To the form y = lamda * x + y_intercept, used in plotting ii. To the form (theta, threshold) used by the Quantify Scheduler for Thresholded Aqcuisitions

Attributes

lamda: float the slope coefficient of form (i) y_intercept: float the y-axis intercept of form (i) theta_rad: float the angle of the boundary, used for form (ii) threshold: float the distance from the IQ origin to the boundary line, used for form (ii)

parabolic

parabolic(x, x0=0, a=0.0, c=0.0)

Return a parabolic function.

parabolic(x, x0, a, c) = a * (x-x0)**2 + c