A network of optical parametric oscillators is used to simulate classical Ising and XY spin chains. The collective nonlinear dynamics of this network, driven by quantum noise rather than thermal fluctuations, seeks out the Ising / XY ground state as the system transitions from below to above the lasing threshold. We study the behavior of this "Ising machine" for three canonical problems: a 1D ferromagnetic spin chain, a 2D square lattice, and problems where next-nearest-neighbor couplings give rise to frustration. If the pump turn-on time is finite, topological defects form (domain walls for the Ising model, winding number and vortices for XY) and their density can be predicted from a numerical model involving a linear "growth stage" and a nonlinear "saturation stage". These predictions are compared against recent data for a 10,000-spin 1D Ising machine. arXiv:1605.08121v1 [physics.optics] 26 May 2016 J 1 =0.2,J 2 =0.3 J 1 =0.35,J 2 =0.15 J 1 =0.15,J 2 =0.35 0 50 100 150 J 1 =0.3,J 2 =0.2 50 100 150 Pulse i Topological defect formation in 1D and 2D spin chains realized by network of OPOs 21 J 1 =0.45,J 2 =0.05