The quantum backtracking algorithm proposed by Ashley Montanaro raised considerable interest, as it provides a quantum speed-up for a large class of classical optimization algorithms. It does not suffer from Barren-Plateaus and transfers well into the fault-tolerant era, as it requires only a limited number of arbitrary angle gates. Despite its potential, the algorithm has seen limited implementation efforts, presumably due to its abstract formulation. In this work, we provide a detailed instruction on implementing the quantum step operator for arbitrary backtracking instances. For a single controlled diffuser of a binary backtracking tree with depth n, our implementation requires only $6n+14$ CX gates. We detail the process of constructing accept and reject oracles for Sudoku problems using our interface to quantum backtracking. The presented code is written using Qrisp, a high-level quantum programming language, making it executable on most current physical backends and simulators. Subsequently, we perform several simulator based experiments and demonstrate solving 4x4 Sudoku instances with up to 9 empty fields. This is, to the best of our knowledge, the first instance of a compilable implementation of this generality, marking a significant and exciting step forward in quantum software engineering.
翻译:Ashley Montanaro提出的量子回溯算法引起了广泛兴趣,因为它为大量经典优化算法提供了量子加速。该算法不会遭遇贫瘠高原问题,且能良好适应容错时代——仅需有限数量的任意角度门。尽管潜力巨大,但该算法的实现工作却十分有限,这可能是由于其抽象表述所致。本研究详细阐述了为任意回溯实例实现量子步进算子的方法。对于深度为n的二叉回溯树的单受控扩散器,我们的实现仅需$6n+14$个CX门。我们详细说明了通过量子回溯接口为数独问题构建接受与拒绝Oracle的过程。所呈现代码使用高级量子编程语言Qrisp编写,可在当前大多数物理后端和模拟器上执行。随后我们进行了多项基于模拟器的实验,成功求解了包含多达9个空格的4x4数独实例。据我们所知,这是首个具备可编译性的通用实现,标志着量子软件工程迈出了重要且振奋人心的一步。