Planning & Search in Rust
Esc

Loading…

↑↓ move ↵ open Esc close
Colour theme
Quantum & QUBO

planning-qubo

Planning, scheduling and constraint problems as QUBO and Ising models: encoders, decoders, penalty tuning, classical samplers and export for quantum annealers and QAOA

cargo add planning-qubo

Who it is for

  • People with access to a quantum annealer or a QAOA setup who need planning, scheduling or assignment problems as QUBO or Ising models. The penalty builder turns named variables and constraints (exactly-one, at-most-one, linear with slack bits) into a model, and the decoders map a sample back to a plan and name each violated constraint. The assignment problem has a ready encoder; other problems are built from the same constraints.
  • Researchers comparing samplers on the same model: the exhaustive sampler gives the exact optimum of small models, and simulated annealing, with a seeded RNG and a configurable schedule, shows how close a heuristic gets. Both stop on a work budget and resume later, so runs can be time-sliced and measured by the work they did.
  • Exact experiments and teaching: i64 models keep every penalty and every QUBO-to-Ising conversion exact, so results can be checked against brute force.

It is not for solving these problems fast on a classical machine. A direct solver beats a QUBO encoding there: see task-allocation for assignment, constraint-search for constraint satisfaction, mapf-search for multi-agent path finding and heuristic-search for pathfinding.

Algorithms 2

  • QUBO penalty encoding Penalty method for QUBO · Ising formulation

    Constraints become quadratic penalty terms on named binary variables (exactly-one, at-most-one, linear constraints with slack bits), added to the objective; QUBO and Ising models convert exactly.

    BuilderConstraintKind

  • Single-bit-flip simulated annealing over a QUBO under a configurable temperature schedule and a resumable budget; warm calls allocate nothing.

    SimulatedAnnealingSchedule