The nerve to quadratus femoris provides motor innervation to quadratus femoris muscle and inferior gemellus muscle.
In terms of its function, the nerve to quadratus femoris supplies motor innervation to the quadratus femoris muscle and inferior gemellus muscle, playing a crucial role in their movement and control.