You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem is that when we are lowering rotate-and-reduce via baby-step-giant-step, if the numBabySteps does not divide the total number of steps, we have two options:
Add some extra ops at the end to account for the leftover
Find the closest number to sqrt(n) that does divide steps and use that.
Not sure which is best, and I decided to punt on doing the most optimal thing for now and implementing a naive version of (2). It seems like (2) is suboptimal in extreme cases like a prime number of steps, so the question is how to select between (1) and (2)