Table of Contents
Fetching ...

A Quantum-Inspired Algorithm for Solving Sudoku Puzzles and the MaxCut Problem

Max B. Zhao, Fei Li

TL;DR

The paper introduces a quantum-inspired solver for QUBO problems that combines Matrix Product States (MPS) with Density Matrix Renormalization Group (DMRG) optimization and a discrete driver schedule to approximate the ground state of a problem Hamiltonian $H_{total} = a H_x + b H_z$. It formulates Sudoku as a dense, long-range Ising spin glass via a QUBO, then extends the method to MaxCut, demonstrating successful ground-state solutions for Sudoku instances with over 200 spins and MaxCut instances up to 251 vertices and 3,265 edges. The central innovation is steering the many-spin wavefunction through a sequence of intermediate Hamiltonians $H_i = a_i H_x + b_i H_z$ to produce a high-quality initial MPS that is efficiently refined by DMRG, often ending in a product state with $D=1$. The results highlight the scalability, generality, and diagnostic advantages of tensor-network–based quantum-inspired optimization for industrial-scale QUBO problems, providing a bridge until quantum hardware advances further.

Abstract

We propose and evaluate a quantum-inspired algorithm for solving Quadratic Unconstrained Binary Optimization (QUBO) problems, which are mathematically equivalent to finding ground states of Ising spin-glass Hamiltonians. The algorithm employs Matrix Product States (MPS) to compactly represent large superpositions of spin configurations and utilizes a discrete driving schedule to guide the MPS toward the ground state. At each step, a driver Hamiltonian -- incorporating a transverse magnetic field -- is combined with the problem Hamiltonian to enable spin flips and facilitate quantum tunneling. The MPS is updated using the standard Density Matrix Renormalization Group (DMRG) method, which iteratively minimizes the system's energy via multiple sweeps across the spin chain. Despite its heuristic nature, the algorithm reliably identifies global minima, not merely near-optimal solutions, across diverse QUBO instances. We first demonstrate its effectiveness on intermediate-level Sudoku puzzles from publicly available sources, involving over $200$ Ising spins with long-range couplings dictated by constraint satisfaction. We then apply the algorithm to MaxCut problems from the Biq Mac library, successfully solving instances with up to $251$ nodes and $3,265$ edges. We discuss the advantages of this quantum-inspired approach, including its scalability, generalizability, and suitability for industrial-scale QUBO applications.

A Quantum-Inspired Algorithm for Solving Sudoku Puzzles and the MaxCut Problem

TL;DR

The paper introduces a quantum-inspired solver for QUBO problems that combines Matrix Product States (MPS) with Density Matrix Renormalization Group (DMRG) optimization and a discrete driver schedule to approximate the ground state of a problem Hamiltonian . It formulates Sudoku as a dense, long-range Ising spin glass via a QUBO, then extends the method to MaxCut, demonstrating successful ground-state solutions for Sudoku instances with over 200 spins and MaxCut instances up to 251 vertices and 3,265 edges. The central innovation is steering the many-spin wavefunction through a sequence of intermediate Hamiltonians to produce a high-quality initial MPS that is efficiently refined by DMRG, often ending in a product state with . The results highlight the scalability, generality, and diagnostic advantages of tensor-network–based quantum-inspired optimization for industrial-scale QUBO problems, providing a bridge until quantum hardware advances further.

Abstract

We propose and evaluate a quantum-inspired algorithm for solving Quadratic Unconstrained Binary Optimization (QUBO) problems, which are mathematically equivalent to finding ground states of Ising spin-glass Hamiltonians. The algorithm employs Matrix Product States (MPS) to compactly represent large superpositions of spin configurations and utilizes a discrete driving schedule to guide the MPS toward the ground state. At each step, a driver Hamiltonian -- incorporating a transverse magnetic field -- is combined with the problem Hamiltonian to enable spin flips and facilitate quantum tunneling. The MPS is updated using the standard Density Matrix Renormalization Group (DMRG) method, which iteratively minimizes the system's energy via multiple sweeps across the spin chain. Despite its heuristic nature, the algorithm reliably identifies global minima, not merely near-optimal solutions, across diverse QUBO instances. We first demonstrate its effectiveness on intermediate-level Sudoku puzzles from publicly available sources, involving over Ising spins with long-range couplings dictated by constraint satisfaction. We then apply the algorithm to MaxCut problems from the Biq Mac library, successfully solving instances with up to nodes and edges. We discuss the advantages of this quantum-inspired approach, including its scalability, generalizability, and suitability for industrial-scale QUBO applications.
Paper Structure (17 sections, 35 equations, 10 figures, 4 tables, 1 algorithm)

This paper contains 17 sections, 35 equations, 10 figures, 4 tables, 1 algorithm.

Figures (10)

  • Figure 1: The spin representations of three Sudoku puzzles published in The New York Times on January 2 (diamond), January 12 (circle), and January 14 (plus), 2025, are shown. The mean and standard deviation of the magnetic field $h^z_m$ are as follows: $8.7 \pm 3.0$ for the January 2 puzzle (diamond), $8.0 \pm 3.7$ for January 12 (circle), and $7.3 \pm 2.7$ for January 14 (plus).
  • Figure 2: The dense, long-range couplings among the 210 spins for the January 12, 2025 Sudoku puzzle. Each line represents an Ising coupling $J_{m, n} = 2$, which favors spin-$m$ and and spin-$n$ being antiparallel. Each spin can point either up or down. Finding the lowest-energy spin configuration corresponds to solving the Sudoku puzzle.
  • Figure 3: Statistical analysis of the couplings between the spins. For nearest neighbors, about $75\%$ are coupled. The coupling fraction drops to the $10\%$ level when the distance grows to $6$ or $7$, then fluctuates between $1\%$ and $10\%$. The legends are the same as Figure \ref{['fig:hzm']}. The vertical axis is in logarithmic scale.
  • Figure 4: How the January 8, 2024 puzzle gets solved: As the driving field $h_x$ is reduced, the energy gradually drops to zero. The total spin along the $x$-direction vanishes, while the total spin along the $z$-direction approaches its ground state value. The bond dimension is $D = 20$ and the driving field is set to $h_x = 0.75$.
  • Figure 5: The solution process for another puzzle with fewer clues and more spins: $D = 20$, $h_x = 1$.
  • ...and 5 more figures