Magnetic moment due to a planar square loop of side l carrying current I is
\(\overrightarrow{m}=I\,\overrightarrow{A}\)
For square loop A = I2

Where ̂ is unit vector normal to loop.
Magnetic field due to current carrying wire at the location of loop is directed downward perpendicular to plane of loop. Since the magnetic moment is parallel to area vector hence torque is zero.
Force on QR and SP are equal and opposite, so net force on these sides is zero.



That is loop experiences a repulsive force but no torque.