arXiv:2604.04786quant-phcs.AI2026-04

用量子搜索生成幻方,比经典方法快一倍

A Quantum Search Approach to Magic Square Constraint Problems with Classical Benchmarking

  • 把幻方构造转为量子搜索问题,用量子幅度放大加速
  • 小规模实例上验证了理论上的二次查询优势
  • 适合对量子算法原理感兴趣的科研人员

本文提出一种量子搜索方法求解组合约束满足问题,以幻方生成为例。将幻方构造重构为量子搜索问题,通过可逆的、依赖约束的预言机标记有效配置,利用格罗弗算法进行振幅放大。在量子编码前,采用暹罗构造和部分约束检查进行经典预处理,生成紧凑的候选域。本工作不采用经典与量子迭代结合的方式,而是将经典部分用于结构化初始化,量子部分用于搜索,并与经典暴力枚举和回溯法进行对比。使用Qiskit实现多寄存器模运算电路、预言机逻辑及扩散算子。实验在小规模网格实例上进行,因经典态矢量模拟器存在指数内存增长,更大网格无法处理。结果验证了所提量子搜索流程的正确性,并确认其相对于经典搜索具有理论上的二次查询优势。

原文摘要 · Abstract (English)

This paper presents a quantum search approach to combinatorial constraint satisfaction problems, demonstrated through the generation of magic squares. We reformulate magic square construction as a quantum search problem in which a reversible, constraint-sensitive oracle marks valid configurations for amplitude amplification via Grover's algorithm. Classical pre-processing using the Siamese construction and partial constraint checks generates a compact candidate domain before quantum encoding. Rather than integrating classical and quantum solvers in an iterative loop, this work uses the classical component for structured initialisation and the quantum component for search, and benchmarks the quantum approach against classical brute-force enumeration and backtracking. Our Qiskit implementation demonstrates the design of multi-register modular arithmetic circuits, oracle logic, and diffusion operators. Experiments are conducted on small grid instances, as larger grids are intractable on classical statevector simulators due to exponential memory growth. The results validate the correctness of the proposed quantum search pipeline and confirm the theoretical quadratic query advantage over classical search.

量子计算约束求解幻方生成

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。