Can a quantum circuit be constructed to simulate recursive control flow and dynamic data structures with equivalent asymptotic complexity?
Resolving this could bridge the gap between low-level quantum circuit design and practical, high-level algorithm implementation, accelerating real-world quantum software development.

Understand this faster with AI
Quantum Computing is part of Stack Overflow’s open communities: specialist spaces where curiosity is welcome, knowledge is shared freely, and the best answers rise to the top. Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work. Bring the best of human thought and AI automation together at your work. Learn more Bring the best of human thought and AI automation together at your work. In quantum algorithm design, it is a well-known result that any deterministic classical function f(x)f(x) computable in time T(n)T(n) can be converted into a reversible quantum circuit operating on \vert{}x\rangle\vert{}0\rangle \to \vert{}x\rangle\vert{}f(x)\rangle\vert{}x\rangle\vert{}0\rangle \to \vert{}x\rangle\vert{}f(x)\rangle with O(T(n))O(T(n)) quantum gates (using standard Bennett uncomputation to handle garbage bits). However, theoretical proofs usually assume f(x)f(x) is represented as a straight-line classical Boolean circuit (e.g., using AND, OR, NOT, and FANOUT gates). In high-level software development, algorithms rely heavily on control flow constructs that do not have fixed circuit bounds, such as: Thanks for contributing an answer to Quantum Computing Stack Exchange! Use MathJax to format equations. MathJax reference. To learn more, see our tips on writing great answers. By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy. To subscribe to this RSS feed, copy and paste this URL into your RSS reader. This comment attacks a person or group. Learn more in our Abusive behavior policy. This comment is rude or condescending. Learn more in our Code of Conduct. A problem not listed above. Try to be as specific as possible. You'll need to complete a few actions and gain 15 reputation points before being able to upvote. Upvoting indicates when questions and answers are useful. What's reputation and how do I get it? Instead, you can save this post to reference later. Site design / logo © 2026 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2026.8.6.
Tags
Source Information
Discussion
0 professional contributions
Sign in to join this professional discussion.
Be the first to add a constructive contribution.
