Quantum annealing is a quantum computing paradigm with the aim to solve generic optimization problems1234, where the cost function corresponds to the energy of an infinite-range Ising spin glass5. Finding the optimal solution of the problem is thus equivalent to determining the ground state of the spin glass. In quantum annealing, this task is accomplished by adiabatic passage of a system of N spins in the instantaneous ground state of a Hamiltonian (denoted logical spin model) of the form