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

Add .zip format for artifact upload #93

Merged
merged 4 commits into from
Feb 2, 2024

Conversation

coruscating
Copy link
Collaborator

Summary

Required for qiskit-community/qiskit-experiments#1342 since it would be computationally intensive to upload many artifact files for a composite experiment. Instead, artifacts will be zipped by type and uploaded as archives. The API already supports .zip formats.

@CLAassistant
Copy link

CLAassistant commented Feb 1, 2024

CLA assistant check
All committers have signed the CLA.

@gadial gadial merged commit dc5bbd7 into Qiskit-Extensions:main Feb 2, 2024
9 checks passed
github-merge-queue bot pushed a commit to qiskit-community/qiskit-experiments that referenced this pull request Feb 8, 2024
### Summary

This PR adds the artifacts interface following the design in
https://github.com/Qiskit/rfcs/blob/master/0007-experiment-dataframe.md.

### Details and comments

- Added the `ArtifactData` dataclass for representing artifacts.
- Added `ExperimentData.artifacts()`, `.add_artifacts()`, and
`delete_artifact()` for working with artifacts, which is stored in a
thread safe list. Currently the `ScatterTable` and `CurveFitResult`
objects are stored as artifacts, and experiment serialization data will
be added in the future.
- Artifacts are grouped by type and stored in a compressed format so
that there aren't a huge number of individual files for composite
experiments. As such, this PR depends on
Qiskit-Extensions/qiskit-ibm-experiment#93 to
allow `.zip` formats for uploading to the cloud service. Inside each
zipped file is a list of JSON artifact files with the filename equal to
their unique artifact ID. For composite experiments with
`flatten_results=True`, all `ScatterTable` artifacts are stored in
`curve_data.zip` in individual jsons and so forth.
- Added a how-to for artifacts and updated documentation to demonstrate
dataframe objects like AnalysisResults and the ScatterTable
(`dataframe.css` is for styling these tables).
- Deprecated accessing analysis results via numerical indices to
anticipate removing the curve fit result from analysis results
altogether in the next release.
- Fixed bug where `figure_names` were being duplicated in a copied
`ExperimentData` object.

Example experiment with artifacts
([link](https://quantum.ibm.com/experiments/eaad518d-232f-4cab-b137-e480ff7f1cbb)):

![image](https://github.com/Qiskit-Extensions/qiskit-experiments/assets/3870315/a2929782-dfef-4535-b246-1167666ebfc9)

---------

Co-authored-by: Naoki Kanazawa <nkanazawa1989@gmail.com>
Co-authored-by: Will Shanks <wshaos@posteo.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants