diff --git a/qiskit_experiments/framework/composite/composite_analysis.py b/qiskit_experiments/framework/composite/composite_analysis.py index 8f4680bc21..967573482e 100644 --- a/qiskit_experiments/framework/composite/composite_analysis.py +++ b/qiskit_experiments/framework/composite/composite_analysis.py @@ -16,8 +16,7 @@ from typing import List, Dict import numpy as np from qiskit.result import marginal_counts -from qiskit_experiments.framework import BaseAnalysis, ExperimentData, AnalysisResultData -from qiskit_experiments.database_service.device_component import Qubit +from qiskit_experiments.framework import BaseAnalysis, ExperimentData class CompositeAnalysis(BaseAnalysis): @@ -69,7 +68,6 @@ def _run_analysis(self, experiment_data: ExperimentData): # child data is handled by the `replace_results` kwarg of the # parent container it is safe to always clear and replace the # results of child containers in this step - analysis_results = [] for i, (sub_data, sub_exp) in enumerate(zip(marginalized_data, component_exps)): sub_exp_data = experiment_data.child_data(component_ids[i]) @@ -85,23 +83,12 @@ def _run_analysis(self, experiment_data: ExperimentData): # we always run with replace result on component analysis sub_exp.analysis.run(sub_exp_data, replace_results=True) - # Record the component experiment id and type as an analysis result - # for evidence analysis has started and to display in the service DB - result = AnalysisResultData( - name=sub_exp_data.experiment_type, - value=sub_exp_data.experiment_id, - device_components=[ - Qubit(qubit) for qubit in sub_exp_data.metadata.get("physical_qubits", []) - ], - ) - analysis_results.append(result) - # Wait for all component analysis to finish before returning # the parent experiment analysis results for comp_id in component_ids: experiment_data.child_data(comp_id).block_for_results() - return analysis_results, [] + return [], [] def _initialize_components(self, experiment, experiment_data): """Initialize child data components and return list of child experiment IDs""" diff --git a/releasenotes/notes/kids-in-analysis-df7b4dcbeb5b3125.yaml b/releasenotes/notes/kids-in-analysis-df7b4dcbeb5b3125.yaml new file mode 100644 index 0000000000..272ba7b0dc --- /dev/null +++ b/releasenotes/notes/kids-in-analysis-df7b4dcbeb5b3125.yaml @@ -0,0 +1,7 @@ +--- +upgrade: + - | + The :class:`.ParallelExperiment` and :class:`.BatchExperiment` composite experiments + have been changed to no longer return analysis results containing information about + sub-experiments. Instead, use the :meth:`~.ParallelExperiment.child_data` method to + retrieve sub-experiments of a given composite experiment. diff --git a/test/test_composite.py b/test/test_composite.py index 7d6fae2929..09a7784829 100644 --- a/test/test_composite.py +++ b/test/test_composite.py @@ -230,7 +230,6 @@ def test_composite_tags(self): expdata.tags = ["a", "c", "a"] data1.tags = ["b"] - print(expdata.tags) self.assertEqual(sorted(expdata.tags), ["a", "c"]) self.assertEqual(sorted(data1.tags), ["b"]) self.assertEqual(sorted(data2.tags), [])