Commit graph

2 commits

Author SHA1 Message Date
ecc294e1ff feat(bawim): sudoku 729-spin encoding + incremental ΔH + 3 solvers
Adds:
- §3: delta_h() — incremental energy change (O(N) per flip, not O(N²))
- §4a: Sudoku encoding — 729 spins with one-hot/row/col/block constraints
  via build_sudoku_couplings() and build_sudoku_biases().
  Clue embedding via bias field (h_clue = -50, h_anti = +10).
- §5: Three solvers — greedy_descent, simulated_annealing, oscillating_bath
  (BAWIM-style acoustic wave modulation of coupling amplitudes)
- §5b: Barkhausen stability criterion (loop_gain > 1, phase_shift = 2πn)
  and thermal stability comparison (BAWIM 780 vs CIM 1.73×10^7 deg/°C)
- §7: evaluate_sudoku() with violation counting and clue preservation

All solvers use incremental ΔH instead of full Hamiltonian recompute.
All arithmetic is exact Fraction.  Float only at the SA acceptance
boundary (exp(-ΔH/T) comparison against random draw).
2026-07-07 09:42:38 -05:00
cdc7d24464 feat(python): BAWIM mutation engine — exact Fraction mutation loop
Sketch of a mutation engine for the Bulk Acoustic Wave Ising Machine
(arXiv 2607.02112). Architecture:

  §1  Mutable parameter budget (n_spins, J_bits, feedback %, encoding)
  §2  Core BAWIM equations as exact Fraction arithmetic (Eq 1-5)
  §3  Spin configuration (random + flip)
  §4  Coupling matrix generators (MAX-CUT, NPP)
  §5  Greedy descent solver (swap target)
  §6  Mutation operators (one param per round)
  §7  Evaluation (MAX-CUT, NPP)
  §8  Mutation engine loop with SA acceptance
  §9  CLI

No float in compute path.  Quantize to Q16_16 at output boundary only.
2026-07-07 09:35:44 -05:00