class CrossResonanceHamiltonianAnalysis[source]#

A class to analyze cross resonance Hamiltonian tomography experiment.

Fit model

This is the curve fitting analysis. The following equation(s) are used to represent curve(s).

This analysis performs BlochTrajectoryAnalysis on the target qubit with the control qubit states in \(\in \{ |0\rangle, |1\rangle \}\).

Based on the fit result, cross resonance Hamiltonian coefficients can be determined by

\[\begin{split}ZX &= \frac{p_{x, |0\rangle} - p_{x, |1\rangle}}{2}, \\ ZY &= \frac{p_{y, |0\rangle} - p_{y, |1\rangle}}{2}, \\ ZZ &= \frac{p_{z, |0\rangle} - p_{z, |1\rangle}}{2}, \\ IX &= \frac{p_{x, |0\rangle} + p_{x, |1\rangle}}{2}, \\ IY &= \frac{p_{y, |0\rangle} + p_{y, |1\rangle}}{2}, \\ IZ &= \frac{p_{z, |0\rangle} + p_{z, |1\rangle}}{2},\end{split}\]

where \(p_{\beta, |j\rangle}\) is a fit parameter of BlochTrajectoryAnalysis for the projection axis \(\beta\) with the control qubit state \(|j\rangle\).

Analysis options

These are the keyword arguments of the run() method.

  • Defined in the class CompositeCurveAnalysis:

    • plotter (BasePlotter)

      Default value: Instance of CurvePlotter
      A plotter instance to visualize the analysis result.
    • plot (bool)

      Default value: True
      Set True to create figure for fit result. This is True by default.
    • return_fit_parameters (bool)

      Default value: False
      (Deprecated) Set True to return all fit model parameters with details of the fit outcome. Default to False.
    • return_data_points (bool)

      Default value: False
      (Deprecated) Set True to include in the analysis result the formatted data points given to the fitter. Default to False.
    • extra (Dict[str, Any])

      Default value: {}
      A dictionary that is appended to all database entries as extra information.
  • Defined in the class BaseAnalysis:

    • figure_names (str or List[str])

      Default value: None
      Identifier of figures that appear in the experiment data to sort figures by name.

See also


Initialize the analysis object.



A short-cut for curve drawer instance, if set. None otherwise.

Deprecated since version 0.5: The method qiskit_experiments.curve_analysis.composite_curve_analysis.CompositeCurveAnalysis.drawer() is deprecated as of qiskit-experiments 0.5. It will be removed after 0.6. Use plotter from the new visualization module instead.


Return fit models.


Return name of this analysis.


Return the analysis options for run() method.


Return parameters of this curve analysis.


A short-cut to the plotter instance.



Return curve analysis instance.


index (str | int | None) – Name of group or numerical index.


Curve analysis instance.

Return type:

BaseCurveAnalysis | List[BaseCurveAnalysis]


Return the config dataclass for this analysis

Return type:



Return a copy of the analysis

Return type:


classmethod from_config(config)#

Initialize an analysis class from analysis config

Return type:


run(experiment_data, replace_results=False, **options)#

Run analysis and update ExperimentData with analysis result.

  • experiment_data (ExperimentData) – the experiment data to analyze.

  • replace_results (bool) – If True clear any existing analysis results, figures, and artifacts in the experiment data and replace with new results. See note for additional information.

  • options – additional analysis options. See class documentation for supported options.


An experiment data object containing analysis results, figures, and artifacts.


QiskitError – If experiment_data container is not valid for analysis.

Return type:



Updating Results

If analysis is run with replace_results=True then any analysis results, figures, and artifacts in the experiment data will be cleared and replaced with the new analysis results. Saving this experiment data will replace any previously saved data in a database service using the same experiment ID.

If analysis is run with replace_results=False and the experiment data being analyzed has already been saved to a database service, or already contains analysis results or figures, a copy with a unique experiment ID will be returned containing only the new analysis results and figures. This data can then be saved as its own experiment to a database service.


Set the analysis options for run() method.


fields – The fields to update the options