English

Quantum Algorithms for Magic Square Diophantine Equations

Quantum Physics 2026-05-07 v1

Abstract

Magic-square constraints define Diophantine systems whose solutions, in several natural families, exhibit rigid periodic structure. We study this structure in an oracle setting, where a marked set of integers is given by black-box access and the goal is to decide whether it encodes a magic square. For 3×33\times 3 magic squares and weighted variants, we prove explicit periodic characterizations that reduce detection to period finding. For larger orders, we identify a class of solutions built from repeated arithmetic patterns, which can be detected via the quantum Fourier transform. We then introduce a shifted-oracle method, based on interference between an oracle and its translates, that helps reconstruct solutions in structured cases. Together, these ingredients give a quantum framework for detecting and reconstructing certain magic-square solutions under suitable assumptions. We also derive finite bounds that make some instances exhaustively solvable and obtain Shor-based criteria for certifying non-existence in restricted number-theoretic settings. As an application, we sketch a quantum communication protocol based on an oracle encoding of a large magic-square solution.

Keywords

Cite

@article{arxiv.2605.04106,
  title  = {Quantum Algorithms for Magic Square Diophantine Equations},
  author = {Dimitrios Thanos and Marcello Bonsangue and Alfons Laarman},
  journal= {arXiv preprint arXiv:2605.04106},
  year   = {2026}
}
R2 v1 2026-07-01T12:51:30.584Z