EDIT: Tony Pantev has pointed out that the answer to this question will appear in forthcoming work of Bogomolov-Soloviev-Yotov. I look forward to reading it! 


Background
----------


Let $E \to X$ be a holomorphic vector bundle over a complex manifold. A connection $A$ in $E$ is called *holomorphic* if in local holomorphic trivialisations of $E$, $A$ is given by a holomorphic 1-form with values in End(E).


Notice that the curvature of $A$ is necessarily a (2,0)-form. In particluar, holomorphic connections over Riemann surfaces are *flat*. This will be important for my question.


The Question
------------


I am interested in the following situation. Let $E \to S$ be a rank 2 holomorphic vector bundle over a Riemann surface of genus $g \geq 2$. I suppose that $E$ admits a global holomorphic trivialisation (which I do *not* fix) and that we choose a nowhere vanishing section $v$ of $\Lambda^2 E$. (So I *do* fix a trivialisation of the determinant bundle.) I want to consider holomorphic connections in $E$ which make $v$ parallel. The holonomy of such a connection takes values in $\mathrm{SL}(2,\mathbb{C})$ (modulo conjugation). 


My question: if I allow you to change the complex structure on $S$, which conjugacy classes of representations of $\pi\_1(S)$ in $\mathrm{SL}(2,\mathbb C)$ arise as the holonomy of such holomorphic connections?


EDIT: As jvp points out, some reducible representations never arise this way. I actually had in mind irreducible representations, moreover with discrete image in $\mathrm{SL}(2,\mathbb{C})$. Sorry for not mentioning that in the beginning!


Motivation
----------


A naive dimension count shows that in fact the two spaces have the same dimension: 


For the holomorphic connections, if you choose a holomorphic trivialisation of $E\to S$, then the connection is given by a holomorphic 1-form with values in $sl(2, \mathbb C)$. This is a $3g$ dimensional space. Changing the trivialisation corresponds to an action of $\mathrm{SL(2,\mathbb C)}$ and so there are in fact $3g-3$ inequivalent holomorphic connections for a fixed complex structure. Combined with the $3g -3$ dimensional space of complex structures on $S$ we see a moduli space of dimension $6g-6$.


For the representations, the group $\pi\_1(S)$ has a standard presentation with $2g$-generators and 1 relation. Hence the space of representations in $\mathrm{SL}(2,\mathbb{C})$ has dimension $6g-3$. Considering representations up to conjugation we subtract another 3 to arrive at the same number $6g-6$.


A curious remark
----------------


Notice that if we play this game with another group besides $\mathrm{SL}(2,\mathbb{C})$ which doesn't have dimension 3, then the two moduli spaces do not have the same dimension. So it seems that $\mathrm{SL}(2,\mathbb{C})$ should be important in the answer somehow.



Representations of surface groups via holomorphic connections
This question is addressed in a very recent paper of Bogomolov-Soloviev-Yotov (I don't think it is on the web yet). Among many interesting things they prove that the map from the moduli space of pairs $(C,\nabla)$ where $\nabla$ is a holomorphic connection on the trivial rank two bundle on some smooth curve $C$ is submersive whenever $\nabla$ is irreducible and $C$ is generic. 


With regard to Jack Evans' comment: this is a very different question than the question of determining respresentations in a real form (which has been extensively studied by Hitchin, Goldman, Garcia-Prada, etc.). It is about a holomorphic subvariety in the moduli of representations. A better analogy will be to look at the moduli space of opers which is the moduli space of holomorphic flat connections on a fixed (non-trivial) rank two vector bundle, namely, the 1-st jet bundle of a theta characteristic on the curve. 


