-
Notifications
You must be signed in to change notification settings - Fork 17
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
Remove unneeded cirq dependency in qiskit-superstaq #117
Comments
If you going from Qiskit's https://qiskit.org/documentation/apidoc/qpy.html it's a native binary serialization format for Qiskit's quantum circuit object. You can pass For example, IBM Quantum has started to use it for the circuit runner serialization by b64 encoding the QPY file written to a BytesIO buffer and embedding that in the json payload: https://github.com/Qiskit/qiskit-ibmq-provider/blob/abc88dbd224cae3c492af177c08a610592e7cd7f/qiskit/providers/ibmq/runtime/utils.py#L124-L132 It also gives you a certain level of backwards compatibility as the format is designed such that newer versions of Qiskit can always load QPY files generated with older versions of Qiskit. |
Thank you very much for the recommendation. @mtreinish. We are going to serialize our circuits to qasm strings for now as a stopgap and circle around to QPY in the future. |
Yup, thanks @mtreinish — that makes a lot of sense. Tracking in #118. |
* casablanca has retired * update * update
Right now, we convert qiskit circuits to cirq circuits just so that we can call
cirq.to_json(circuit)
and get a JSON-serialized version. But then on the server, we go back down to the qiskit circuit anyways.There should be a way to get qiskit circuits down to a serialized format; there shouldn't be a need for a cirq dependency.
repr(qc)
doesn't work, but maybe just taking theqc.qasm()
would work.The text was updated successfully, but these errors were encountered: