Let $D<0$ be a fundamental discriminant and consider the theta series $$\vartheta\_Q(\tau)=\sum\_{v\in\mathbb{Z}^2} q^{Q(v)}$$
associated to a quadratic form $Q$ of discriminant $D$. It appears to be true that $\vartheta\_Q=\vartheta\_Q|U(|D|)$, where $U$ is the usual Atkin U-operator, defined by its action on $q$-series
$$\big(\sum\_n a(n)q^n\big)|U(m):=\sum\_n a(mn)q^n,$$
but I can't seem to find a proof of this. I strongly suspect that this is well-known (probably in much greater generality), but I'm not sure where to look. If anyone has a reference or of course a proof, that would be much appreciated! 



(Binary) Theta functions and Atkin's U-operator
I think you want to show that in each ideal class the number of ideals of norm a is equal to the number of ideals of norm $a \cdot |D|$. This should follow directly from the following 2 facts.


(1). All primes $p$ dividing $|D|$ ramify in the ring of integers of $\mathbb{Q}(\sqrt{D})$.


(2). The unique ideal of norm $|D|$ (uniqueness and existence follow from (1), taking a little care about the prime $2$) is principal, generated by $\sqrt{D}$.


In view of (1) and (2) the map $J \rightarrow \sqrt{D} \cdot J$ gives the desired bijection.


