Skip to content

Experiment data and service#5499

Closed
jyu00 wants to merge 30 commits into
Qiskit:mainfrom
jyu00:experiment-class
Closed

Experiment data and service#5499
jyu00 wants to merge 30 commits into
Qiskit:mainfrom
jyu00:experiment-class

Conversation

@jyu00
Copy link
Copy Markdown
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
Comment thread qiskit/providers/experiment/constants.py
Comment thread qiskit/providers/experiment/experiment_data.py Outdated
Comment thread qiskit/providers/experiment/experiment_data.py Outdated
Comment thread qiskit/providers/experiment/analysis_result.py
Comment thread qiskit/providers/experiment/device_component.py
Comment thread qiskit/providers/experiment/analysis_result.py Outdated
Comment thread qiskit/providers/experiment/analysis_result.py
Comment thread qiskit/providers/experiment/experiment_data.py Outdated
Copy link
Copy Markdown
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)

Comment thread qiskit/providers/experiment/experiment_data.py Outdated
Comment thread qiskit/providers/experiment/experiment_data.py Outdated
Comment thread qiskit/providers/experiment/experiment_data.py Outdated
Comment thread qiskit/providers/experiment/experiment_data.py Outdated
Comment thread qiskit/providers/experiment/experiment_data.py Outdated
Comment thread qiskit/providers/experiment/experiment_data.py Outdated
Comment thread qiskit/providers/experiment/experiment_data.py
Comment thread qiskit/providers/experiment/experiment_data.py Outdated
Comment thread qiskit/providers/experiment/experiment_data.py Outdated
Comment thread qiskit/providers/experiment/experiment_data.py Outdated
Comment thread qiskit/providers/experiment/experiment_data.py Outdated
@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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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: Added Add an "Added" entry in the GitHub Release 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
Copy Markdown
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: Added Add an "Added" entry in the GitHub Release changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants