Is there a non-abelian version of the Torelli map? Let $C$ be a connected compact oriented real surface of genus $g$, let $G$ be a connected compact Lie group and let $G_\mathbb{C}$ be the complexification of $G$. One considers the moduli space $M (C,G)$ of isomorphism classes of representations of the fundamental group $\pi_1 (C)$ in $G$. It is a compact real algebraic variety (in general singular) with a natural symplectic structure (see Atiyah-Bott, Goldman,...)
If one fixes a complex structure on $C$, one can consider the moduli space $M_{hol} (C,G)$ of degree zero semistable holomorphic $G_\mathbb{C}$-bundles on $C$. It is a projective complex algebraic variety (in general singular) with a natural polarization. The theorem of Narasimhan-Seshadri (for $G=U(n)$, extended by Ramanathan for general $G$) gives an isomorphism between the underlying real analytic structures of $M(C,G)$ and $M_{hol}(C,G)$, with identification of the natural symplectic form on $M(C,G)$ with the natural Kähler form on $M_{hol}(C,G)$. In other words, a choice of complex structure on $C$ gives a natural polarized complex algebraic structure on $M(C,G)$ compatible with the symplectic structure. In vague terms, my question is: how does this structure changes when the complex structure
on $C$ changes?
More precisely, I would like to consider the moduli space $\mathcal{M}$ of polarized complex algebraic structures on $M(C,G)$ compatible with the symplectic structure. I don't know if such moduli space exists.
Q1) Is there a way to make sense of the moduli space $\mathcal{M}$ ? Locally, globally?
If $\mathcal{M}$ makes sense then the Narasimhan-Seshadri theorem gives a map $f: M_g \rightarrow \mathcal{M}$, $C \mapsto M_{hol}(C, G)$, where $M_g$ is the moduli space of complex structures on $C$.
Q2) What can be said on the map $f$ ? Is it injective ? What is the dimension of its image?...
When $G=U(1)$, we simply have $\mathcal{M} = A_g$, the moduli space of principally polarized abelian varieties of dimension $g$ and $f: M_g \rightarrow A_g$ is simply the Torelli map $C \mapsto Jac(C)$, which is injective by the Torelli theorem. So my questions could be reformulated as: is there some non-abelian version of the Torelli map and of the Torelli theorem (where "non-abelian" refers to the replacement of $G=U(1)$ by a general $G$) ?
 A: For higher rank bundles, in other words for $G=SU(n)$, and if you are willing to replace your singular moduli space by the better behaved nonsingular version where the degree is not fixed to be zero but some fixed number coprime to $n$, then the answer is known to be positive by D. Mumford and P.E. Newstead, Periods of a moduli space of bundles on curves, Amer. J. Math. 90 (1968), 1200–1208 for $n=2$, and M.S. Narasimhan and S. Ramanan, Deformations of the moduli space of vector bundles over an algebraic curve, Ann. Math. (2) 101 (1975), 391–417, for higher $n$. The proof involves showing that the cohomology of the moduli space includes a piece of the cohomology of the curve, thus concluding by classical Torelli. There are related results in work of Biswas-Gomez for Higgs bundle moduli spaces. I don't know what happens for general $G$, but forward-searching among the references to these papers might give you the answer.
A: In the analytic category, this question is addressed  in N.Hitchin's paper Flat connections and geometric quantization.
I will write $M$ for your $M_{hol}(C,G)$, and will pretend that $M$ is smooth 
(you can replace $G$ by a central extension, or use the normality of $M$ plus Hartogs-type arguments). Then, if  $P$ be a stable $G_{\mathbb{C}}$-bundle (with no extra automorphisms), $T_{M,[P]}= H^1(C, ad P)$.
The infinitesimal deformation map
$$
H^1(C,T_C) \longrightarrow H^1(M, T_M)
$$
is injective. This is due to Narasimhan and Ramanan when $M$ is smooth (they treat unitary bundles with coprime rank and degree), and Hitchin gives independent proof in the singular case.
Next, cup product gives a map
$$
H^0(T_M^2)\otimes H^1(\Omega^1_M)\to H^1(T_M),
$$
and under multiplication with the Atiyah-Bott symplectic form, the polarisation-preserving deformations correspond to sections of $H^0(M,Sym^2 T_M)\subset H^0(M, T_M^2)$. We can pull these to (the total space of) $\pi:T^\vee_M\to M$:
$$
H^0(M, Sym^2 T_M)\subset H^0(T^\vee_M,  Sym^2 \pi^\ast T_M).
$$
Proposition 2.16 in Hitchin's paper says that the cup product pairing
$$
H^1(C,T_C)\otimes H^0(C, ad P\otimes K_C)\to H^1(C,ad P)
$$
gives, for any class in $H^1(C,T_C)$, the corresponding deformation of the Kaehler polarisation of the moduli space. If you're working with a classical group, the section of $Sym^2\pi^\ast T_M$, corresponding to $[\kappa]\in H^1(C, T_C)$ is 
$$
G(\alpha,\alpha)=\int_C Tr(\alpha^2)\wedge \kappa,\quad   \alpha\in T^\vee_{M,P}=H^0(C, ad P\otimes K_C).
$$
In general, you take the quadratic part of the Hitchin map.
There is indeed an analogy with the abelian case. Hitchin considers a line bundle over Teichmueller space, whose fibres are the ``non-abelian theta-functions'' (of sufficiently high level), and constructs a projectively flat connection on it. The (projective) flatness is the analogue of the heat equation for theta-functions. The connection is known as the Hitchin connection, WZW-connection, or KZB-connection.
A: As stated above, you want to start with:


*

*D. Mumford and P.E. Newstead, Periods of a moduli space of bundles on curves, Amer. J. Math. 90 (1968), 1200–1208 

*M.S. Narasimhan and S. Ramanan, Deformations of the moduli space of vector bundles over an algebraic curve, Ann. Math. (2) 101 (1975), 391–417


Here is a very naive idea (hopefully without mistakes, but sometimes I make really stupid ones when I am brainstorming like this), and it is probably not even in the category you want. Here it goes.
Take the Cartesian product of the (twisted) $G$-character variety of $C$, in your notation $M(C,G)$, with the moduli space of complex structures on $C$, in your notation $M_g$, and define an equivalence relation as follows: $([\rho_1],[C_1])\sim ([\rho_2],[C_2])$ if and only if $M_{hol}(G,C_1)\cong M_{hol}(G,C_2)$ and $[\rho_1]=[\rho_2]$.
Why not let $\mathcal{M}$ be $(M(C,G)\times M_g)/\sim$?
I am not sure what kind of space you get (identification space of a real algebraic space), but you do get maps $M_g\to \mathcal{M}$ just by inclusion (pair with any fixed representation) followed by projection.   Suppose these maps were injective, then: $M_{hol}(C_1,G)\cong M_{hol}(C_2,G)$ implies $C_1\cong C_2$; as is the case in the above references.
You also get a projection $\mathcal{M}\to M(G,C)$, since the equivalence relation is trivial on $M(G,C)$; its fibers are exactly the complex structures $[C]$ that have $M_{hol}(G,C)$ isomorphic (as varieties).
Your vague question was "How does this structure changes when the complex structure on $C$ changes?"
Even if this $\mathcal{M}$ is not what you had in mind, everything in the construction and the maps have concrete descriptions.  Perhaps it can be analyzed.
A: For genus $2$ surface Narasimhan and Ramanan (Ann. of Math. 89, 1969) have proven that the moduli space of (S-equivalence classes, i.e. identifying different extensions of the same degree 0 bundle by its dual) of rank $2$ vector bundles with trivial determinant is the complex projective space $P^3.$ The idea of the proof is as follows. For a (semi-stable) holomorphic rank $2$ bundle, one considers the space of holomorphic line subbundles of degree $-1(=1-g).$ This is a divisor in $Pic_{-1}$ which is dual to a divisor in the linear system given by twice the theta divisor $2\theta.$ Moreover, this divisor uniquely determines the rank 2 bundle if it is stable, or its S-equivalence class if it is strictly semi-stable.
However, I do not know how the natural symplectic structure on the moduli space looks like after identification with $P^3$. I think one should expect that the symplectic structure has singularities at the strictly semi-stable points. If so, one could maybe characterize the strictly semi-stable locus as the singularity set of the symplectic form. On the other hand, by Narasimhan and Ramanan, the strictly semi-stable locus is the Kummer surface in $P^3$ of the Riemann surface of genus 2, and hence determines the Riemann surface.
