Skip to content

Commit 58ee4d4

Browse files
committed
Remove kwargs from Experiment.analysis class meth
1 parent c5479e3 commit 58ee4d4

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

qiskit_experiments/base_experiment.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -142,17 +142,13 @@ def run_analysis(self, experiment_data, **options) -> ExperimentData:
142142
Raises:
143143
QiskitError: if experiment_data container is not valid for analysis.
144144
"""
145-
if self.__analysis_class__ is None:
146-
raise QiskitError(f"Experiment {self._type} does not have a default Analysis class")
147-
148145
# Get analysis options
149146
analysis_options = copy.copy(self.analysis_options)
150147
analysis_options.update_options(**options)
151148
analysis_options = analysis_options.__dict__
152149

153150
# Run analysis
154-
# pylint: disable = not-callable
155-
analysis = self.__analysis_class__()
151+
analysis = self.analysis()
156152
analysis.run(experiment_data, save=True, return_figures=False, **analysis_options)
157153
return experiment_data
158154

@@ -167,12 +163,12 @@ def physical_qubits(self) -> Tuple[int]:
167163
return self._physical_qubits
168164

169165
@classmethod
170-
def analysis(cls, **kwargs):
166+
def analysis(cls):
171167
"""Return the default Analysis class for the experiment."""
172168
if cls.__analysis_class__ is None:
173169
raise QiskitError(f"Experiment {cls.__name__} does not have a default Analysis class")
174170
# pylint: disable = not-callable
175-
return cls.__analysis_class__(**kwargs)
171+
return cls.__analysis_class__()
176172

177173
@abstractmethod
178174
def circuits(self, backend: Optional[Backend] = None) -> List[QuantumCircuit]:

0 commit comments

Comments
 (0)