As I understand so far, in some algorithms such as Simon's algorithm, swap-test algorithm or quantum k-means algorithm, we repetitively perform a measurement yielding a classical result. Consequently, this pushes us to run the whole algorithm again and again (starting from initialization of the system).

My question is: do we lose the complexity as the number of repetitions of the algorithm increases?

You probably want to look at old posts about Simon's algorithm, such as the rather complete explanation I gave here, or talking more specifically about the number of times the algorithm has to be repeated.

Yes, you have to repeat the algorithm several times to get different pieces of classical data, which you then process classically to get your final answer. But this is taken into account in the complexity. Indeed, that is often one of the most significant bits of the analysis: what's the average run-time to get the answer? It is this that you compare to the classical run-time.

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.