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.
StarkP1SpectAnalysis¶
- class StarkP1SpectAnalysis[source]¶
Analysis class for StarkP1Spectroscopy.
Overview
The P1 landscape is hardly predictable because of the random appearance of lossy TLS notches, and hence this analysis doesn’t provide any generic mathematical model to fit the measurement data. A developer may subclass this to conduct own analysis. The
StarkP1SpectAnalysis._run_spect_analysis()
is a hook method where you can define a custom analysis protocol.By default, this analysis just visualizes the measured P1 values against Stark tone amplitudes. The tone amplitudes can be converted into the amount of Stark shift when the calibrated coefficients are provided in the analysis option, or the calibration experiment results are available in the result database.
Analysis options
These are the keyword arguments of the
run()
method.- Options
Defined in the class
StarkP1SpectAnalysis
:plotter (Plotter)
Default value: Instance ofCurvePlotter
Plotter to visualize P1 landscape.data_processor (DataProcessor)
Default value: Instance ofDataProcessor
Data processor to compute P1 value.stark_coefficients (Union[Dict, str])
Default value:None
Dictionary of Stark shift coefficients to convert tone amplitudes into amount of Stark shift. This dictionary must include all keys defined inStarkP1SpectAnalysis.stark_coefficients_names
, which are calibrated withStarkRamseyXYAmpScan
. Alternatively, it searches for these coefficients in the result database when “latest” is set. This requires having the experiment service set in the experiment data to analyze.x_key (str)
Default value:"xval"
Key of the circuit metadata to represent x value.
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
qiskit_experiments.library.driven_freq_tuning.StarkRamseyXYAmpScan
Initialization
Initialize the analysis object.
Deprecated since version 0.8: The class
qiskit_experiments.library.driven_freq_tuning.p1_spect_analysis.StarkP1SpectAnalysis
is deprecated as of qiskit-experiments 0.8. It will be removed no earlier than 3 months after the release date. Due to the deprecation of Qiskit Pulse, experiments and related classses involving pulse gate calibrations like this one have been deprecated.Attributes
- plotter¶
Curve plotter instance.
Methods
- config()¶
Return the config dataclass for this analysis
- Return type:
- copy()¶
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.
- 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:
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.