We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
What is the expected feature or enhancement?
NumPy object arrays require special care when encoding/decoding. For example, the following fails:
import json import numpy as np from qiskit_ibm_runtime import RuntimeEncoder, RuntimeDecoder metadata = {"ev_qubits": np.array([np.arange(2), np.arange(3)], dtype=object)} js = json.dumps(metadata, cls=RuntimeEncoder) json.loads(js, cls=RuntimeDecoder)
It successfully encodes, but then fails to decode because it can't figured out the raggedness.
cc @chriseclectic
Acceptance criteria
The above snippet succeeds, where the input to np.array can also include other json-serializable Python builtins.
np.array
The text was updated successfully, but these errors were encountered:
This also fails:
metadata = {"ev_qubits": np.fromiter([[0, 1], [0, 1, 2]], dtype=object)}
Sorry, something went wrong.
No branches or pull requests
What is the expected feature or enhancement?
NumPy object arrays require special care when encoding/decoding. For example, the following fails:
It successfully encodes, but then fails to decode because it can't figured out the raggedness.
cc @chriseclectic
Acceptance criteria
The above snippet succeeds, where the input to
np.array
can also include other json-serializable Python builtins.The text was updated successfully, but these errors were encountered: