  We define an adelic version of a CM elliptic curve $E$ which is equipped with
an action of the profinite completion of the endomorphism ring of $E$. The
adelic elliptic curve so obtained is provided with a natural embedding into the
adelic Heisenberg group. We embed into the adelic Heisenberg group the set of
commensurability classes of arithmetic $1$-dimensional $\mathbb{K}$-lattices
(here and subsequently, $\mathbb{K}$ denotes a quadratic imaginary number
field) and define theta functions on it. We also embed the groupoid of
commensurability modulo dilations into the union of adelic Heisenberg groups
relative to a set of representatives of elliptic curves with $R$-multiplication
($R$ is the ring of algebraic integers of $\mathbb{K}$). We thus get adelic
theta functions on the set of $1$-dimensional $\mathbb{K}$-lattices and on the
groupoid of commensurability modulo dilations. Adelic theta functions turn out
to be acted by the adelic Heisenberg group and behave nicely under complex
automorphisms (Theorems 6.12 and 6.14).
