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

Make NoiseLearnerResult JSON serializable #1908

Closed
frankharkins opened this issue Sep 6, 2024 · 1 comment · Fixed by #1909
Closed

Make NoiseLearnerResult JSON serializable #1908

frankharkins opened this issue Sep 6, 2024 · 1 comment · Fixed by #1909
Assignees
Labels
enhancement New feature or request

Comments

@frankharkins
Copy link
Member

What is the expected feature or enhancement?

Unlike other result types, NoiseLearnerResult is not JSON serializable. I get an error when trying to save the job using this guide: https://docs.quantum.ibm.com/guides/save-jobs#save-results-to-disk.

import json
from qiskit_ibm_runtime import RuntimeEncoder
with open("result.json", "w") as file:
   json.dump(retrieved_job.result(), file, cls=RuntimeEncoder)
TypeError: Object of type NoiseLearnerResult is not JSON serializable

Full traceback.

Acceptance criteria

NoiseLearnerResult can be serialized with RuntimeEncoder and RuntimeDecoder.

@frankharkins frankharkins added the enhancement New feature or request label Sep 6, 2024
@joshuasn joshuasn self-assigned this Sep 6, 2024
@frankharkins
Copy link
Member Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants