-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experiment data and service #5499
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure that it's pop
and not get
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jyu00 What about the post-processing callback function, in the cases where the data is not a Job
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed in fc53978
Moved to qiskit-experiments |
Summary
Still need testing, but there should be enough code for comments.
Details and comments