Closed AbeerVaishnav13 closed 4 years ago
Hello @tgehr, Just a reminder to add this Shor's factoring algorithm example to the repo. Hoping for it to get merged soon.
Regards Abeer
I don't see why this hasn't been merged, this is great example code.
@tjf801 It has not been merged because it is not obviously correct (e.g., it does not perform any continued fraction expansion) and I have not gotten around to reviewing it in detail so far. (Also, there are some questionable choices of types in the implementation.)
This is my own implementation of Shor's algorithm: https://github.com/eth-sri/silq/blob/master/test/shor.slq
@AbeerVaishnav13 It think your implementation is missing steps, it is using the result of the quantum subroutine directly as a candidate for the order. Also, I think the modular exponentiation part does not work correctly.
Ohh yes @tgehr. Thanks for pointing it out. I definitely forgot to consider the continued fraction part in my code.
Also thanks for sharing your version of the code. It helped me clear many things regarding the implementation of Shor's factoring algorithm in Silq!
Hey @tgehr, this is an example of Shor's factoring algorithm in SILQ. Hoping this gets merged with the main repo.
Regards Abeer