BaseCoherenceFitter

class BaseCoherenceFitter(description, backend_result, xdata, qubits, fit_fun, fit_p0, fit_bounds, circuit_names, series=None, expected_state='0', time_index=0, time_unit='micro-seconds')[source]

Base class for fitters of characteristic times

Parameters
  • description (str) – description of the fitter’s purpose, e.g. ‘T1’.

  • backend_result (Union[Result, List[Result]]) – result of execution on the backend.

  • xdata (Union[List[float], array]) – delay times of the circuits.

  • qubits (List[int]) – the qubits to be characterized.

  • fit_fun (Callable[…, float]) – equivalent to parameter f of scipy.curve_fit.

  • fit_p0 (List[float]) – equivalent to parameter p0 of scipy.curve_fit.

  • fit_bounds (Tuple[List[float], List[float]]) – equivalent to parameter bounds of scipy.curve_fit.

  • circuit_names (List[str]) – names of the circuits, should be the same length as xdata. Full circuit name will be these plus the series name.

  • series (Optional[List[str]]) – list of circuit name tags

  • expected_state (str) – is the circuit supposed to end up in ‘0’ or ‘1’?

  • time_index (int) – among parameters of fit_fun, which one is the characteristic time.

  • time_unit (str) – unit of delay times in xdata.

Attributes

BaseCoherenceFitter.backend_result

Return the execution results

BaseCoherenceFitter.description

Return the fitter’s purpose, e.g.

BaseCoherenceFitter.fit_fun

Return the function used in the fit, e.g.

BaseCoherenceFitter.measured_qubits

Return the indices of the qubits to be characterized

BaseCoherenceFitter.params

Return the fit function parameters that were calculated by curve_fit

BaseCoherenceFitter.params_err

Return the error of the fit function parameters

BaseCoherenceFitter.series

Return the list of series for the data

BaseCoherenceFitter.xdata

Return the data points on the x-axis, the independenet parameter which is fit against

BaseCoherenceFitter.ydata

Return the data points on the y-axis

Methods

BaseCoherenceFitter.add_data(results[, …])

Add new execution results to previous execution results

BaseCoherenceFitter.fit_data([qid, p0, …])

Fit the curve.

BaseCoherenceFitter.plot(qind, series[, ax, …])

Plot coherence data.

BaseCoherenceFitter.time([qid, series])

Return the characteristic time for the given qubit and series

BaseCoherenceFitter.time_err([qid, series])

Return the error of characteristic time for the given qubit and series