A solution of the equation $(1-\tan \theta)(1+\tan \theta) \sec ^{2} \theta+2^{\tan ^{2} \theta}=0$ where, $\theta$ lies in interval $\left(-\frac{\pi}{2}, \frac{\pi}{2}\right)$ is given by $\theta$ is
(a) 0
(b) $\pm \frac{\pi}{3}$
(c) $-\frac{\pi}{6}$
(d) $\frac{\pi}{6}$