Need to prove $\displaystyle\int_\Gamma e^{-z^2}dz=\int_{-\infty}^\infty e^{-x^2}dx=\pi^{1/2}$ for the contour $\Gamma=\{Im(z)=a\}$.
Set $z= x+iy$ for $x,y \in \mathbb{R}$, then we have $$\int_\Gamma e^{-z^2}dz=e^{a^2}\int_{-\infty}^{\infty}e^{-x^2}e^{-2xa i}dx$$
How to proceed after this? First, I tried to convert $e^{-2xai}$ to a trigonometric function and solve it. But it didn't work.