Note

This is the documentation for the current state of the development branch of Qiskit Experiments. The documentation or APIs here can change prior to being released.

LayerFidelityAnalysis

class LayerFidelityAnalysis(layers, analyses=None)[source]

A class to analyze layer fidelity experiments.

Overview

It estimates Layer Fidelity and EPLG (error per layered gate) by fitting the exponential curve to estimate the decay rate, hence the process fidelity, for each 2-qubit (or 1-qubit) direct randomized benchmarking result. See Ref. [1] for details.

References

[1] David C. McKay, Ian Hincks, Emily J. Pritchett, Malcolm Carroll, Luke C. G. Govia, Seth T. Merkel, Benchmarking Quantum Processor Performance at Scale (open)

Analysis options

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

Options
  • 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

Initialization

Initialize a composite analysis class.

Parameters:
  • analyses – a list of component experiment analysis objects.

  • flatten_results – If True flatten all component experiment results into a single ExperimentData container, including nested composite experiments. If False save each component experiment results as a separate child ExperimentData container.

  • generate_figures – Optional flag to set the figure generation behavior. If always, figures are always generated. If never, figures are never generated. If selective, figures are generated if the analysis quality is bad.

Attributes

options

Return the analysis options for run() method.

Methods

component_analysis(index=None)

Return the component experiment Analysis instance.

Parameters:

index (int | None) – Optional, the component index to return analysis for. If None return a list of all component analysis instances.

Returns:

The analysis instance for the specified index, or a list of all analysis instances if index is None.

Return type:

BaseAnalysis | List[BaseAnalysis]

config()

Return the config dataclass for this analysis

Return type:

AnalysisConfig

copy()

Return a copy of the analysis

classmethod from_config(config)

Initialize an analysis class from analysis config

Return type:

BaseAnalysis

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

Run analysis and update ExperimentData with analysis result.

Parameters:
  • 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.

Returns:

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

Raises:

QiskitError – If experiment_data container is not valid for analysis.

Return type:

ExperimentData

Note

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_options(**fields)

Set the analysis options for the experiment. If the broadcast argument set to True, the analysis options will cascade to the child experiments.