Simulation of the quantum search algorithm in an Ising spin system