Experiment data and service#5499
Conversation
There was a problem hiding this comment.
I started trying to use the ExperimentData class as a base class for the qiskit-experiments ExperimentData class and have added comments on some of issues I ran into (I haven't really using the analysis results or service parts yet, just focusing on one part at a time)
| """ | ||
| result_data = result_data or {} | ||
| self._result_data = copy.deepcopy(result_data) | ||
| self._source = self._result_data.pop( |
There was a problem hiding this comment.
Are you sure that it's pop and not get here?
There was a problem hiding this comment.
Yeah because _source is an "internal" metadata and not part of the actual result data. It's stored in the result data dictionary in the database because there's no other place to store it, but it's removed from the data dictionary when the AnalysisResult object is loaded from the database.
| TypeError: If the input data type is invalid. | ||
| """ | ||
| if isinstance(data, dict): | ||
| self._add_single_data(data) |
There was a problem hiding this comment.
@jyu00 What about the post-processing callback function, in the cases where the data is not a Job ?
|
Moved to qiskit-experiments |
Summary
Still need testing, but there should be enough code for comments.
Details and comments