Skip to content
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

Closed
wants to merge 30 commits into from
Closed

Experiment data and service #5499

wants to merge 30 commits into from

Conversation

jyu00
Copy link
Contributor

@jyu00 jyu00 commented Dec 9, 2020

Summary

Still need testing, but there should be enough code for comments.

Details and comments

@chriseclectic chriseclectic self-assigned this Mar 17, 2021
Copy link
Member

@chriseclectic chriseclectic left a 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)

@jyu00 jyu00 marked this pull request as ready for review May 25, 2021 19:14
@jyu00 jyu00 requested a review from a team as a code owner May 25, 2021 19:14
@jyu00 jyu00 changed the title [WIP] Experiment data and service Experiment data and service May 25, 2021
"""
result_data = result_data or {}
self._result_data = copy.deepcopy(result_data)
self._source = self._result_data.pop(
Copy link
Contributor

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?

Copy link
Contributor Author

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)
Copy link
Contributor

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 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in fc53978

@mtreinish mtreinish added the Changelog: New Feature Include in the "Added" section of the changelog label Jun 7, 2021
@mtreinish mtreinish added this to the 0.18 milestone Jun 7, 2021
@mtreinish mtreinish self-assigned this Jun 7, 2021
@jyu00
Copy link
Contributor Author

jyu00 commented Jul 29, 2021

Moved to qiskit-experiments

@jyu00 jyu00 closed this Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changelog: New Feature Include in the "Added" section of the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants