-
Notifications
You must be signed in to change notification settings - Fork 159
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
Enhancement: add a Qiskit export #448
Comments
I agree that a QASM export would be good. However, note that this functionality would be a lot of work. For example, QASM doesn't have built-in operations for modular exponentiation on a mix of classical and quantum values. So the export code would need to specify a decomposition for that operation, and all the other complex operations in the toolbox. There are also concepts in quirk that may not exist in qiskit, such as time dependent gates and post-selection and custom non-unitary operations and the distinction between a detector (collapsing simulation) and a measurement (dephasing simulation). The quirk import code in cirq is a couple thousand lines of python: https://github.com/quantumlib/Cirq/tree/master/cirq/interop/quirk . That's with support from the target library, so that decompositions are not needed. |
@Strilanc I have a pretty crude of this working on my fork (I'm using it for a different project). However, it only supports the gates that the IQX circuit designer currently supports (X, Y, Z, H, S, T, Sdg, Tdg, Swap, CX, CCX, RX, RY, RZ, SX, SXdg, CRX, CRY, CRZ, Measure). Would you be interested in helping me taking it forward? Perhaps it could be an "experimental" feature that is not (yet) guaranteed to work with the entire set of operations that Quirk supports. Let me know and I'll raise a draft PR if required. |
Cirq has an import-from-quirk feature that you might be able to model this after. It defines custom gates in cirq for gates that otherwise wouldn't be present (like modular exponentiation). I do think that the export functionality should be reliable as long as you only use unitary operations, e.g. incrementing and the QFT should work. |
An export to Qiskit would be a must-have.
The text was updated successfully, but these errors were encountered: