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门。我们详细阐述了如何利用量子回溯接口为数独问题构建接受预言机与拒绝预言机的过程。所展示的代码使用高级量子编程语言Qrisp编写,可在当前大多数物理后端和模拟器上执行。随后,我们进行了若干基于模拟器的实验,成功解决了包含多达9个空格的4x4数独实例。据我们所知,这是首个具有如此通用性的可编译实现方案,标志着量子软件工程迈出了重要而令人振奋的一步。