We show that the algorithmic complexity of any classical algorithm written in a Turing-complete programming language polynomially bounds the number of quantum bits that are required to run and even symbolically execute the algorithm on a quantum computer. In particular, we show that any classical algorithm $A$ that runs in $\mathcal{O}(f(n))$ time and $\mathcal{O}(g(n))$ space requires no more than $\mathcal{O}(f(n)\cdot g(n))$ quantum bits to execute, even symbolically, on a quantum computer. With $\mathcal{O}(1)\leq\mathcal{O}(g(n))\leq\mathcal{O}(f(n))$ for all $n$, the quantum bits required to execute $A$ may therefore not exceed $\mathcal{O}(f(n)^2)$ and may come down to $\mathcal{O}(f(n))$ if memory consumption by $A$ is bounded by a constant. Our construction works by encoding symbolic execution of machine code in a finite state machine over the satisfiability-modulo-theory (SMT) of bitvectors, for modeling CPU registers, and arrays of bitvectors, for modeling main memory. The FSM is linear in the size of the code, independent of execution time and space, and represents the reachable machine states for any given input. The FSM may be explored by bounded model checkers using SMT and SAT solvers as backend. However, for the purpose of this paper, we focus on quantum computing by unrolling and bit-blasting the FSM into (1)~satisfiability-preserving quadratic unconstrained binary optimization (QUBO) models targeting adiabatic forms of quantum computing such as quantum annealing, and (2)~semantics-preserving quantum circuits (QCs) targeting gate-model quantum computers. With our compact QUBOs, real quantum annealers can now execute simple but real code even symbolically, yet only with potential but no guarantee for exponential speedup, and with our QCs as oracles, Grover's algorithm applies to symbolic execution of arbitrary code, guaranteeing at least in theory a quadratic speedup.
翻译:我们显示任何古典算法的算法复杂性, 这些古典算法以图灵- 完整的编程语言写成。 磁度比特( f) 将运行甚至象征性地在量子计算机上执行算法所需的量子比特数数量捆绑起来。 特别是, 我们显示任何以$mathcal{O}( f( n)) 美元时间和$mathcal{O}( g( n) ) 美元空间的经典算法复杂性都不需要超过$\ mathcal{O}( f( n)\ cdot g( n) ) 量比特币比特( 甚至是象征性地) 。 如果用 $\ 数学比特{ O} ( g)\\leq\ mathcal{O} ( g)( g( f( n) ) 美元) 以美元运行所有美元, 需要的量比特币比特价比特( fr) 的算法度比特( fral- demodal) commoal- demoal) oral- demodeal commodeal- demodeal ors, ors( modeal) mamod) mamod) mamod( mamod) mamod) ors ( max) or) lax) mamodeal mamods) mamods) max max max max max max max max max 。