iqm.benchmarks.coherence.coherence.fit_coherence_model

iqm.benchmarks.coherence.coherence.fit_coherence_model#

iqm.benchmarks.coherence.coherence.fit_coherence_model(qubit: int, probs: ndarray, delays: ndarray, coherence_exp: str) Tuple[List[BenchmarkObservation], float, float, float, float]#

Fit the coherence model and return observations.

This function fits a coherence model to the provided probability data and returns the fitted parameters along with their uncertainties.

Parameters:
  • qubit (int) – The index of the qubit being analyzed.

  • probs (ndarray) – An array of probability values corresponding to the qubit’s coherence.

  • measured. (delays An array of delay times at which the probabilities were) –

  • coherence_exp (str) – A string indicating the type of coherence experiment (‘t1’ or ‘t2_echo’).

  • delays (ndarray) –

Returns:

  • A list of BenchmarkObservation objects for the fitted parameters.

  • The fitted decay time (T_fit).

  • The uncertainty in the fitted decay time (T_fit_err).

  • The fitted amplitude (A).

  • The fitted offset (C).

Return type:

A tuple containing