  Let $R$ be the maximal order in a quadratic imaginary field $K$. We give an
equivalence of categories between the category of polarized abelian varieties
isomorphic to a product of elliptic curves over $\mathbb{C}$ with complex
multiplication (CM) by $R$ and the category of integral hermitian $R$-lattices.
Then we apply this equivalence to enumerate all the genus $2$ and $3$ curves
with field of moduli $\mathbb{Q}$ and with Jacobian isomorphic to a product of
elliptic curves with CM by $R$.
