diff --git a/qiskit_experiments/framework/experiment_data.py b/qiskit_experiments/framework/experiment_data.py index f471df8d90..21730cb172 100644 --- a/qiskit_experiments/framework/experiment_data.py +++ b/qiskit_experiments/framework/experiment_data.py @@ -1070,11 +1070,13 @@ def _add_result_data(self, result: Result, job_id: Optional[str] = None) -> None def _retrieve_data(self): """Retrieve job data if missing experiment data.""" # Get job results if missing in experiment data. - if self.provider is None and not self._result_data.copy(): - LOG.warning( - "provider is None and there is no result data that are stored." - " no data was retrieved." - ) + if self.provider is None: + if not self._result_data.copy(): + # Adding warning so the user will have indication why the analysis may fail. + LOG.warning( + "provider is None and there is no result data that are stored." + " no data was retrieved." + ) return retrieved_jobs = {} jobs_to_retrieve = [] # the list of all jobs to retrieve from the server