  We show how a quantum optical measurement scheme based on heterodyne
detection can be used to explore geometrical and topological properties of
condensed matter systems. Considering a 2D material placed in a cavity with a
coupling to the environment, we compute correlation functions of the photons
exiting the cavity and relate them to the hybrid light-matter state within the
cavity. Different polarizations of the intracavity field give access to all
components of the quantum geometric tensor on contours in the Brillouin zone
defined by the transition energy. Combining recent results based on the
metric-curvature correspondence with the measured quantum metric allows us to
characterize the topological phase of the material. Moreover, in systems where
$S_z$ is a good quantum number, the procedure also allows us to extract the
spin Chern number. As an interesting application, we consider a minimal model
for twisted bilayer graphene at the magic angle, and discuss the feasibility of
extracting the Euler number.
