# Ray class groups through binary quadratic forms

If $d$ is the discriminant of a quadratic number field, then the primitive classes of binary quadratic forms of discriminant $d$ form a group isomorphic to the narrow ideal class group of $\mathbb{Q}(\sqrt{d})$. The classes of forms are equivalence classes under an action by $\mathrm{SL}_2(\mathbb{Z})$. My question is, is there a collection of subgroups of $\mathrm{SL_2}(\mathbb{Z})$ for which the sets of classes of forms of discriminant $d$ under action by these groups are in bijection with the narrow ray class groups of $\mathbb{Q}(\sqrt{d})$?

(I would hope that Gauss's composition operation, which is already well-defined at the level of classes under the action of $\begin{bmatrix} 1 & \mathbb{Z} \\ 0 & 1 \end{bmatrix}$, would provide a group operation that makes these bijections into isomorphisms of ray class groups.)

I guess that the answer is no. The binary forms with discriminant $\Delta \cdot f^2$ describe ring class fields modulo $f$ (see Cox's book), so by taking the limit as $f \to \infty$ something like the idelic version of the full ring class group will result, and this is what I expect you will get using your weak equivalence. For proving that you cannot get anything beyond ring class fields you probably should look at G. Bruckner, Charakterisierung der galoisschen Zahlkörper, deren zerlegte Primzahlen durch binäre quadratische Formen gegeben sind, Math. Nachr. 32 (1966), 317-326, where the proof in the finite case is given.