Each site i of a periodic Nx × Ny lattice carries a one-hot grain label Xig over Q states and a unary composition ladder Uim over M bits,
Xig ∈ {0,1}, ∑g=0Q−1 Xig = 1, Uim ∈ {0,1}, Ui,m+1 ≤ Uim, Ci = s∑mUim, s = 1/M. (1)
Thus, the register holds N(Q+M) logical qubits. The reference run uses 60 × 60, Q = 2, and M = 2, giving 14,400 variables. Collecting all bits into z ∈ {0,1}N(Q+M), the energy splits into a part assembled once and a part rebuilt at every stage n,
Htotal(n)(z) = Hstatic(z) + Hkm(n)(z), Hstatic = HPotts + Hbulk + Hgrad + Hmass + Hcons. (2)
The five static terms are a Potts term rewarding matching neighbour labels over axial and diagonal pairs, the two-phase bulk chemical energy coupling phase to composition, a Cahn–Hilliard gradient energy penalising sharp composition steps, a material-balance penalty, and the one-hot and unary-ordering constraints.
The stage term is purely linear and carries the history. A breadth-first sweep returns the distance di from every site to the nearest interface in O(N) time, and the bias rewards retention of the reference label giref decoded at stage n−1,
Hkm(n) = −∑i bi Xi,giref + ∑i biC ∑m Uim (1−2Uimref), bi = bintf + min(di/dsat, 1) (bbulk−bintf). (3)
Setting bbulk = 20 above the largest Potts gain available to a bulk flip, against bintf = 3.974 at dsat = 2, anchors the bulk and leaves interfacial sites free. Consequently, each solve returns a low-energy state near its predecessor rather than the global minimum.
Material balance is imposed block-locally. Overlapping D × D windows at stride S taper across their overlaps through complementary B-spline ramps wb, which form a partition of unity,
Hmass = ∑b WS (∑i wb(i) fi − Tb)2, ∑bwb(i) = 1 ∀ i, Tb = φ̄(0) ∑iwb(i). (4)
Thus, the local targets tile exactly to the global silver budget while transport per stage is bounded by the block scale.
Equations (1)–(4) define a standard QUBO that carries no solver-specific structure, so the identical Hamiltonian is submittable without modification to any Ising machine. The register is the set of N(Q+M) binary variables from Eq. (1), and encoding validity is enforced by the penalty terms in Hcons rather than by hardware.
The current microstructure is never prepared as a state: it enters through the linear coefficients of Eq. (3) alone, which keeps the quadratic part reusable. Extraction consists of a single decoding of the lowest-energy sample into labels and composition, which then becomes the reference for stage n+1.