Skip to content

analysis_models

tergite_autocalibration.lib.utils.analysis_models

Classes:

Name Description
AvoidedCrossings

Extract the avoided crossings from (currents, qubit frequency) data.

CouplerModel

Model for the coupler frequency of the form

CouplingModel

Model to find the coupling strength g between a tunable transmon and a

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

ResonatorAvoidedCrossings

Extract the avoided crossings from (currents, readout frequency) data.

ThreeClassBoundary

Defines the classification boundaries when discriminating between

TwoClassBoundary

Converts the boundary encoded in the LDA discriminator.

Functions:

Name Description
coupler_frequency_function

the frequency of the coupler in terms of the applied bias current.

parabolic

Return a parabolic function.

straighten_ramsey_points

for data corresponding to fitted vs artificial detunings:

AvoidedCrossings

AvoidedCrossings(currents, frequencies, threshold=2000000.0)

Extract the avoided crossings from (currents, qubit frequency) data. This analysis utilizes only the geometric properties of the data, with no assumptions on the underlying physics of the coupler. If the data have a shape like:

qubit frequencies ^ | * * * * | * * * * | * * * * | * * | * | * * | * * _________> currents

the crossings (intersection points X) of the frequency and current asymptotes are identified:

qubit frequencies ^ * | | * * | * | | * * | * * | | * * | * | | * |--------X-------X------------ | | * | | | * * | | | | _________> currents

Attributes:

Name Type Description
I0_hint float | None

hint for the current corresponding to a quantum of magnetic flux

Ic_hint float | None

hint for the current where the coupler has maximum frequency

I0_hint property

I0_hint: float | None

hint for the current corresponding to a quantum of magnetic flux

Ic_hint property

Ic_hint: float | None

hint for the current where the coupler has maximum frequency

CouplerModel

CouplerModel(*args, **kwargs)

Bases: Model

Model for the coupler frequency of the form f = fmax*sqrt(abs(cos(pi * (I-Ic)/I0))) + offset

CouplingModel

CouplingModel(fixed_qubit_frequency: float, coupler_model: ModelResult, data_dc_currents, data_frequencies)

Model to find the coupling strength g between a tunable transmon and a fixed frequency transmon.

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

ResonatorAvoidedCrossings

ResonatorAvoidedCrossings(currents, frequencies)

Extract the avoided crossings from (currents, readout frequency) data. If the data have a shape like:

ro_frequencies ^ | * * | * * | ** * | * * | * * |________> currents

the crossings (intersection points X) of the frequency and current asymptotes are identified: ro_frequencies ^ | | | * | * | | * | * X X * | | * * | | | * *| |_________> currents

Attributes:

Name Type Description
I0_hint float | None

hint for the current where the coupler has maximum frequency

I0_hint property

I0_hint: float | None

hint for the current where the coupler has maximum frequency

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)

coupler_frequency_function

coupler_frequency_function(current: float, fmax: float, Ic: float, I0: float, offset: float) -> float

the frequency of the coupler in terms of the applied bias current. Args: Ic: the current that gives maximum frequency I0: current corresponding to one quantum of flux

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

straighten_ramsey_points

straighten_ramsey_points(artificial_detunings: ndarray, fitted_detunings: ndarray) -> ndarray

for data corresponding to fitted vs artificial detunings: * | | * | * | * | * |-------------------------> |

we find the inflection point and multiply the data before the inflection point by -1 in order to form a line | | * | | * | * |-------------------------> | | * | | * |