# What is the best way to use loop statements on a quantum computer?

I am interested in solving a time dependent linear partial differential equation of the form $$Ax=b$$ which, in classical computing, would amount to looping over solutions of $$Ax=b$$ where $$b$$ is updated each step.

My question is, is there a quantum analog to the looping procedure that I have described? If not, does that imply that to solve this one would need to write a loop on the classical system which calls the quantum solver each step? In case it is relevant, I am using the IBMQ system.

This question is related to this post.

• No, this is not what I am asking. A partial differential equation can be discretized and written in the form $Ax=b$. I am already working with the HHL algorithm to solve simple steady pde's. In the future, I hope to solve unsteady pde's which, on a classical computer, involves looping over the system $Ax=b$ wherein each iteration $b$ is updated from the solution of $x$. I would like to find out if there is some analogue of this iterative process on a quantum computer which would not involve a loop. Sep 21, 2020 at 19:22