-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Modular Arithmetic Libraries #13608
Comments
Thanks @dfinder for the suggestion and for your willingness to contribute the code! I have taken a brief look at the linked paper and it seems that the described synthesis methods form an extension/improvement of what we have in Qiskit already, see https://docs.quantum.ibm.com/api/qiskit/circuit_library for the arithmetic circuit classes that are already supported, and see https://docs.quantum.ibm.com/api/qiskit/transpiler_synthesis_plugins for the available synthesis algorithms for these classes. (Note that while I say "circuit classes", the recommended way is to represent these objects as Could you please make a list of the existing/new arithmetic gate classes + the corresponding synthesis algorithms that you would be willing to add? Especially where the new gates are concerned, we have an ongoing discussion in #13571 of which gates should be a part of Qiskit's circuit library. There are many useful gates that we may not want to include in Qiskit itself, yet have them available somewhere in the Qiskit ecosystem. For instance, a possible choice is to implement new gate classes + synthesis methods as a new package within https://github.com/qiskit-community. One more question, do you have any data on the 2-qubit gate counts / 2-qubit depths for the gates that already exist in Qiskit (i.e. |
Considering that modular exponentiation is at the heart of some of the most compelling use cases thus far for quantum computing[Cracking RSA and Diffie–Hellman], I found it somewhat fascinating that modular exponentiation wasn't already baked into the system. I would be willing to add functions that work as follows: So we have: And then exponentiation is n (modular multiplies, reset the adder). So modular exponentiation with modulo N uses 6x^4+12x^3+5x^2+1 gates and 3x+1 qubits. But you wanted the 2-qubit gate decomposition. I am afraid I'll have to use math and get back to you shortly. Wait, are you asking also for the decomposition numbers for the pre-existing implemented quantum adders/multipliers? this sounds like a fun research project, I'll get back to you shortly. |
Thank you for clarifying. So the first function My question about the data was to just run all the different synthesis methods to compare the number of 2-qubit gates and the 2-qubit depth for the new synthesis method for the
I believe the new synthesis method should offer an advantage but it would be nice to see some concrete numbers (of course, these could be easily worked out from the formulas that you have listed above). Regarding the two other functions, |
What should we add?
As part of a quantum computing project for trying to implement Shor's algorithm against a 3 digit number, I ended up implementing https://arxiv.org/pdf/2112.10537 in Qiskit by converting the example code/pennylane code into qiskit. Would this be good to add?
The text was updated successfully, but these errors were encountered: