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 utility function to_json_dict #77

Merged
merged 4 commits into from
Mar 21, 2023
Merged

Conversation

ollityrkko
Copy link
Contributor

The function can be used to sanitise data (e.g. circuit metadata) before sending it IQMClient.

CHANGELOG.rst Outdated
Version 11.7
============

* Add utility function ``to_json_dict`` to convert a dict to a JSON dict. `#76 <https://github.com/iqm-finland/iqm-client/pull/76>`_
Copy link
Contributor

Choose a reason for hiding this comment

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

PR #77

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

return JSONEncoder.default(self, o)


def to_json_dict(obj: dict[str, Any]) -> dict:
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it supposed to be used anywhere in iqm-client or just for the users? If for users, there should probably be an example in readme or docs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is not used anywhere in iqm-client, and it is not really intended for users as such, but rather for integrators.
First use will be in qiskit-on-iqm.
I added a short paragraph of it in integration guide.

@ollityrkko ollityrkko merged commit 3eeb7c0 into main Mar 21, 2023
@ollityrkko ollityrkko deleted the COMP-740-serialize-numpy-arrays branch March 21, 2023 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants