Generation of n -qubit W states using spin torque