modular forms with complex multiplication I would like the definition of a modular form with complex multiplication and if possible a reference. 
Thank you ! 
 A: A newform $f=\sum_{n=1}^\infty a(n)q^n$ of level N and weight k has complex multiplication if there is a quadratic imaginary field K such that $a(p)=0$ as soon as p is a prime which is inert in K. The field K is then unique (if the weight k≥2), and one says that f has CM by K.
A: The MO post is a mess. From what I understand,
Let $f$ be a weight $k$ newform for $\Gamma_1(N)$
$$f(z) =\sum_n a_n(f) e^{2i\pi nz}, \qquad L(s,f)=\sum_n a_n(f)n^{-s}=\prod_p \frac1{1-a_p p^{-s}+\chi(p) p^{k-1-2s}}$$
Then $f$ has CM by $K=Q(\sqrt{-d})$ iff $f\otimes |\phi|=f\otimes \phi$ where $$f\otimes \phi(z)= \sum_n a_n(f) \phi(n)e^{2i\pi nz},\qquad f\otimes |\phi|(z)= \sum_n a_n(f) |\phi(n)|e^{2i\pi nz}$$
where $\phi$ is the Dirichlet character such that $\zeta_K(s)=\zeta(s)L(s,\phi)$ ie. $\phi(n)=\prod_{p^k\| n} \phi(p)^k, \phi(p)=0$ if $pO_K$ is ramified, $\phi(p)=1$ if $pO_K$ splits, $\phi(p) = -1$ if $pO_K$ is inert, equivalently for $pO_K$ unramified $\phi(p)= \frac{Frob_{p,K/Q}(\sqrt{-d})}{\sqrt{-d}}=\rho_{K/Q}(Frob_{p,K/Q})$.
$$L(s,f\otimes \phi)=\prod_{\phi(p)\ne 0} \frac1{1- \phi(p) a_p p^{-s}+\phi(p^2)\chi(p) p^{k-1-2s}}$$

so $f\otimes \phi=f\otimes |\phi|$ iff $\phi(p)= -1$ implies $a_p=0$.

From there the main question is if $f(z)=\sum_{I\subset O_K} \psi(I) e^{2i\pi N(I) z}$ for some Hecke (grossen)character of $K$, which is answered by Joel's answer
