This rare ability is called voluntary pupillary control or conscious pupil dilation/constriction.