  We present a new approach for generating cluster states on-chip, with the
state encoded in the spatial component of the photonic wavefunction. We show
that for spatial encoding, a change of measurement basis can improve the
practicality of cluster state algorithm implementation, and demonstrate this by
simulating Grover's search algorithm. Our state generation scheme involves
shaping the wavefunction produced by spontaneous parametric down-conversion in
on-chip waveguides using specially tailored nonlinear poling patterns.
Furthermore the form of the cluster state can be reconfigured quickly by
driving different waveguides in the array.
