Closed WildJimmy closed 12 months ago
The multiplication algorithm now gives a precise answer for any two 5-bit (or less) numbers. To be clear, that means any 2 numbers less than or equal to 16. I don't know how many more qubits we can use so I figured this was a good limit to demonstrate that it works.
The two main changes allowing this are a) I replaced all the steps of adding different gates and attempting QFT -> multiply -> reverse QFT with a library circuit in qiskit that does this in one step. I believe this is okay (science is built on the shoulders of giants) b) the output format was strange, and I believe this was causing the function to return zeroes when it was absolutely not supposed to
Anyways, if you have questions about the process let me know, but this should probably be the finalized version (given that it works precisely for relatively 'large' numbers)
@uarif @AhmedCode99 Probably good for you both to see this!
This issue #33 has been fixed, but I'm still suspicious that the multiplication is not happening properly (for reasons that are within our control). After doing some reading, I think it's because Bard gave me some incomplete advice. Seems like there's a manipulation to be done after the QFT that will give the desired result. Will hopefully be 100% ironed out tonight.
In the meantime @uarif I think you should still be able to the majority of the documentation at this point, so hopefully I'm not holding you up. Everything I've read seems to indicate that the general process we have is correct (encode the binary numbers to the qubits, then Hadamard gate, then QFT the system, then some manipulation with a gate I'm trying to sort out, then reverse QFT to get the properly measurable result.
Anyways, sorry for not having this cleared sooner. I thought my earlier result was as good as it gets (and the issue was just that quantum computing was inaccurate), but it seems like I needed to expand more on the AI provided process