  The quantum modular invariant of a real number is defined as a discontinuous,
PGL(2,Z)-invariant multi-valued map using the distance-to-the-nearest-integer
function. On the rationals, the quantum modular invariant is shown to be
infinity and for quadratic irrationalities PARI/GP experiments suggest it is a
finite set. In the case of the golden mean, we produce explicit formulas
involving weighted versions of the Rogers-Ramanujan functions for the
experimental supremum and infimum of its quantum modular invariant. We then
define a universal modular invariant as a continuous and single valued map of
ultrasolenoids, such that 1) the classical modular invariant is a quotient of
its restriction to a subsolenoid fibering over the classical moduli space of
elliptic curves and 2) the quantum modular invariant is a quotient of its
restriction to a subsolenoid fibering over the moduli space of elliptic curves
equipped with a Kronecker foliation.
