Coherent Ising Machines
Every lesson in this module so far computed something linear — transforms, convolutions,
projections — with the nonlinearity outsourced to electronics. This one goes after a different
beast entirely: combinatorial optimization. Portfolio selection, chip placement,
network partitioning, scheduling — thousands of industrial problems reduce to picking the best of
2^N configurations, and for all of them exhaustive search dies by
N \approx 40. The
previous
lesson used optical dynamics as a feature map; the coherent Ising
machine (CIM) uses optical dynamics as the solver: build a network of light
pulses whose physics naturally seeks a minimum-energy configuration, encode your problem as that
energy, switch on, and let the machine relax toward an answer. The machine's key component is a
strange kind of laser — a parametric oscillator — whose defining quirk is that it can
only shine in one of two phases. Two phases, two spin states: hardware that is binary by physics,
analog in how it decides.
The Ising language of hard problems
The lingua franca of this field is borrowed from magnetism. Take N
binary "spins" s_i \in \{+1, -1\}, couple pairs of them with weights
J_{ij}, and score a configuration by its energy:
- the Ising energy is
H(\mathbf{s}) \;=\; -\sum_{i < j} J_{ij}\, s_i s_j ,
with J_{ij} > 0 rewarding alignment of spins
i, j and J_{ij} < 0 rewarding
anti-alignment;
- finding the ground state (minimum-energy configuration) of a general
J is NP-hard — Max-Cut is the special case
J_{ij} = -1 on the edges of a graph, where minimizing
H maximizes the number of anti-aligned (cut) edges;
- a vast catalogue of optimization problems — partitioning, colouring, scheduling, portfolio
selection — translate into Ising form with polynomial overhead, so a fast Ising minimizer is a
general-purpose optimization engine;
- frustration is the source of hardness: with couplings that cannot all be satisfied at once
(a triangle of mutual enemies), the energy landscape fractures into exponentially many local
minima.
Worked micro-example: three spins in a triangle, every pair coupled by
J_{ij} = -1 (each pair "wants" to disagree). Two spins can disagree,
but the third must then agree with one of them. Try
(+1,-1,+1): the 1–2 and 2–3 pairs are happy
(s_i s_j = -1), the 1–3 pair is not
(s_1 s_3 = +1), so
H \;=\; -\big[J_{12}s_1s_2 + J_{23}s_2s_3 + J_{13}s_1s_3\big]
\;=\; -\big[(-1)(-1) + (-1)(-1) + (-1)(+1)\big] \;=\; -1 .
Check the other configurations and you find only two possible scores: -1
(one unhappy pair — six configurations are tied at this optimum) and +3
(all spins aligned, every pair unhappy). No configuration satisfies all three pairs. That
irreducible dissatisfaction — frustration — multiplied across thousands of spins, is what
makes the landscape rugged and the problem hard.
A laser that can only say + or −
The CIM's spin is a pulse of light in a degenerate optical parametric
oscillator (OPO): a nonlinear crystal in a cavity, pumped at frequency
2\omega, converting pump photons into pairs of signal photons at
\omega — stimulated
emission's stranger sibling. Because two signal photons are born from each pump
photon, the signal field is phase-locked to half the pump phase — and half of a phase has
exactly two solutions, 0 and \pi. Below pump
threshold the signal is essentially noise; as the pump power p crosses
threshold, the field must commit, and the steady-state amplitude follows a pitchfork: the "off"
state destabilises and two mirror-image branches — phase 0, phase
\pi — open up. Which branch a pulse takes is the machine's binary
decision:
One OPO is one spin. For a network, the standard trick is time multiplexing (the same move as the
last lesson's virtual nodes): N pulses circulate in a kilometre-scale
fibre loop, each pulse one spin. The couplings J_{ij} are imposed by
measurement and feedback: a tap siphons off a little of each pulse, homodyne
detection measures its amplitude x_j, an FPGA computes
\sum_j J_{ij} x_j for every spin, and a modulator injects that sum back
into pulse i on its next round trip. The physics then does something
lovely. Feedback means the pulses share gain and loss: configurations of phases that satisfy the
couplings experience lower round-trip loss than frustrated ones. As the pump ramps up,
the first configuration to reach threshold — the first to out-earn its losses — is the one with
minimum loss, which by construction is the minimum of H. The machine
doesn't search the 2^N corners; it holds all of them in superposed
analog amplitudes below threshold and lets gain competition promote the cheapest one first. That
is the minimum-gain principle — and also, as the "Watch out!" below explains, a
promise the hardware only approximately keeps.
The honest benchmark: race it against a CPU
Any proposed optimizer must beat the boring baseline: simulated annealing (SA) —
flip random spins, accept improvements always and regressions with probability
e^{-\Delta H/T}, cool T slowly. The program
below builds a random 10-spin Max-Cut problem and lets three solvers at it: brute force (ground
truth), SA, and a CIM-style analog descent — the mean-field dynamics
\dot x_i = (p - 1)x_i - x_i^3 + \varepsilon \sum_j J_{ij} x_j that
approximate a measurement-feedback machine, with the pump ramped through threshold:
// One Ising problem, three solvers.
const N = 10;
let seed = 7;
const rand = (): number => {
seed = (seed * 1664525 + 1013904223) % 4294967296;
return seed / 4294967296;
};
// Random Max-Cut instance: J[i][j] = -1 on edges (each pair an edge with prob 1/2).
const J: number[][] = [];
for (let i = 0; i < N; i++) J.push(new Array(N).fill(0));
let edges = 0;
for (let i = 0; i < N; i++)
for (let j = i + 1; j < N; j++)
if (rand() < 0.5) { J[i][j] = J[j][i] = -1; edges++; }
const energy = (s: number[]): number => {
let e = 0;
for (let i = 0; i < N; i++)
for (let j = i + 1; j < N; j++) e -= J[i][j] * s[i] * s[j];
return e;
};
const cutOf = (e: number): number => (edges + e) / 2; // for J = −1 on edges
// 1) Brute force: the true optimum (fix s[0] = +1 by symmetry).
let bestE = Infinity;
for (let m = 0; m < 2 ** (N - 1); m++) {
const s = [1];
for (let b = 0; b < N - 1; b++) s.push((m >> b) & 1 ? 1 : -1);
bestE = Math.min(bestE, energy(s));
}
console.log("edges: " + edges + " | optimal cut (brute force): " + cutOf(-bestE));
// 2) Simulated annealing on a CPU: the boring baseline.
let s = Array.from({ length: N }, () => (rand() < 0.5 ? 1 : -1));
let e = energy(s), saBest = e;
let T = 3.0;
for (let step = 0; step < 4000; step++) {
const i = Math.floor(rand() * N);
s[i] = -s[i];
const e2 = energy(s);
if (e2 <= e || rand() < Math.exp((e - e2) / T)) e = e2;
else s[i] = -s[i];
saBest = Math.min(saBest, e);
T *= 0.998;
}
console.log("simulated annealing best cut: " + cutOf(-saBest));
// 3) CIM-style dynamics: analog amplitudes, pump ramped through threshold.
const x: number[] = Array.from({ length: N }, () => 0.01 * (rand() - 0.5));
const dt = 0.02, eps = 0.35;
for (let step = 0; step < 3000; step++) {
const p = step / 1500; // pump ramp: 0 → 2
const nx = x.slice();
for (let i = 0; i < N; i++) {
let fb = 0;
for (let j = 0; j < N; j++) fb += J[i][j] * x[j];
nx[i] += dt * ((p - 1) * x[i] - x[i] ** 3 + eps * fb);
}
for (let i = 0; i < N; i++) x[i] = nx[i];
}
const spins = x.map((v) => (v >= 0 ? 1 : -1));
console.log("CIM-style dynamics final cut: " + cutOf(-energy(spins)));
On a toy instance all three typically find the optimum — which is exactly the point. Solution
quality on small problems distinguishes nothing; the argument is about speed and
scale. A fibre-loop CIM holds 100,000 pulse-spins circulating at gigahertz rates, updating
every spin every round trip (microseconds), with the all-to-all coupling computed in the feedback
loop. Published head-to-heads on dense 2,000-spin problems have shown CIMs reaching good solutions
orders of magnitude faster than a D-Wave quantum annealer of the same era, and competitive with —
the honest phrase is "trading blows with" — well-tuned digital heuristics. But the comparison
cuts both ways: SA on a modern CPU is embarrassingly fast, GPU/FPGA "simulated bifurcation"
machines — digital simulations of the CIM's own equations — match or beat the optical
hardware on many published instances, and time-to-solution contests are notoriously sensitive to
parameter tuning, instance selection and what one counts as "solved". The defensible claim for
optical Ising machines is not supremacy; it is a favourable scaling of speed and energy for
dense, large-N problems, and an architecture whose costliest operation
— the N^2 coupling sum — rides on physics rather than arithmetic.
The marketing sometimes hints at it; the honest answer is "not in the way you'd hope". Below
threshold, an OPO's signal field genuinely is a squeezed vacuum state — a quantum object, and in
principle each pulse passes through a moment of superposition between its two phases as it crosses
threshold. But in the measurement-feedback architecture the pulses interact only through a
classical channel — a homodyne measurement and an FPGA — which destroys any entanglement
between spins as fast as it could form. Numerical studies find the machine's behaviour is
reproduced well by semiclassical equations like the ones you just ran; indeed that is precisely why
"simulated bifurcation" on GPUs works so well as a competitor. There are proposed all-optical
coupling schemes where quantum correlations might genuinely help, and measuring whether they do is
an active research question. For now, classify the CIM as a quantum-inspired analog
computer: its binary states are enforced by quantum optics, its computation is
(semi)classical dynamics. If that feels deflationary, note that Module 9 covers photonic machines
whose quantumness is not in doubt — and whose engineering difficulties are correspondingly not in
doubt either.
The minimum-gain argument quietly assumed every pulse oscillates at the same amplitude,
so that the analog energy landscape the machine descends matches the Ising energy
H(\mathbf{s}) evaluated on the signs. Real machines break this
assumption: strongly-coupled spins settle at different amplitudes than weakly-coupled ones, and
this amplitude heterogeneity deforms the landscape — the machine can happily
relax into an analog minimum whose sign pattern is not the Ising ground state. It is the
CIM's version of a systematic bug, and the field's countermeasures are worth knowing: error-
feedback schemes that dynamically adjust each pulse's gain to equalise amplitudes, chaotic-
amplitude variants that deliberately keep the system restless, and simply re-running with fresh
noise. The general lesson generalises across this whole module: an analog computer solves the
problem its physics defines, which is only ever an approximation of the problem you
wrote down. Quantifying that gap — not wiring the machine — is usually the hard part.
Where this goes next
The CIM completes this module's tour of analog optical computing at its most ambitious: not just
evaluating a fixed transform but steering a physical system through an exponentially large search
space. Every machine in the tour, though, kept colliding with the same walls — precision, drift,
I/O, cascading error. The final
lesson faces those walls squarely: what analog optics can never do, what it does
better than anything else, and the design rules that separate the two.