The quantum circuit model essentially treats every quantum algorithm as a straight-line program. While this view is universal, recent work has shown that it is inconvenient for using different-length quantum subroutines in superposition. Using the quantum walk formalism of quantum algorithms, it is possible to model such branching behaviour, and get better composition in this setting. We apply the above branching composition to Grover's algorithm, which gives a variable-time quantum search algorithm that is worse than previous work. The reason it is worse is because branching composition does not take into account another deviation from straight-line programs: looping. We show that by modifying branching composition to also include looping, we can get a complexity that matches previous work. This highlights the importance of properly modeling the program control flow when designing quantum algorithms.
翻译:量子电路模型本质上将每个量子算法视为一个直线型程序。尽管这一观点具有普遍性,但最新研究表明,它不便于在叠加态中使用不同长度的量子子程序。通过利用量子算法的量子游走形式化方法,可以对此类分支行为进行建模,并在该设定下实现更优的组合效果。我们将上述分支组合应用于Grover算法,得到了一种变时间量子搜索算法,但其性能劣于先前工作。性能劣化的原因在于分支组合未能考虑另一种偏离直线型程序的行为:循环。研究表明,通过将分支组合修改为同时包含循环机制,可以获得与先前工作相媲美的复杂度。这凸显了在设计量子算法时对程序控制流进行恰当建模的重要性。