build neighbors function and quil scaffold