Line bundles, connections, and covariantly holomorphic sections

I have a confusion regarding the line bundles arising in Kahler quantization for the torus. I know of course that the space of holomorphic sections should be isomorphic to a space of theta functions. However, there is a gap in my understanding of these bundles. Although a bit pedantic let me first specify the construction of these bundles which I am thinking of.

We may regard the torus as the quotient $\mathbb{C}/\Lambda$, where $\Lambda$ is a lattice generated by two complex numbers, and $\mathbb{C}$ has the standard symplectic form $dx\wedge dy$. Let us for concreteness take $\Lambda$ to be generated by 1 and $i$. Any bundle over the torus can be regarded as a quotient of $\mathbb{C}\times\mathbb{C}$ by an action of $\Lambda$, with $\lambda(z,s)=(z+\lambda,g(\lambda, z)s)$ where $g$ is a cocycle.

The line bundles over the torus are classified by their Chern class, and hence are classified by a level $k$. To obtain the bundle $L_k$ for level $k$ we take $g(\lambda)=e^{\pi ik\omega(\lambda, z)}$, where the hermitian form $h$ on $\mathbb{C}\times\mathbb{C}$ is given by $h((z,s),(z,s'))=s\overline{s'}$. Clearly the cocycle $g$ preserves the hermitian form.

A connection $D$ on $\mathbb{C}\times\mathbb{C}$ with curvature $-2\pi ik\omega$ may be taken to be of the form $D=d-2\pi ikzd\overline{z}$. Now the covariantly constant sections are represented by functions $f$ obeying $\partial_\overline{z}f=2\pi ikzf$. This has solutions $f(z,\overline{z})=\phi(z)e^{2\pi i kz\overline{z}}$ where $\phi$ is holomorphic.

However, for $|f|$ to be invariant under $\Lambda$, we must have $\phi$ invariant under $\Lambda$, since $|f|=|\phi|$. This is impossible unless $\phi$ is constant, as may be argued using the maximum modulus principle, for example. Therefore the space of covariantly holomorphic functions which descend to sections on $L_k$ appears to be 1-dimensional.

Obviously there must be a mistake somewhere - one should get something related to theta functions. But it is not clear to me why on these bundles $L_k$ constructed as above the space of covariantly holomorphic sections is one dimensional? What is the problem with this approach, and what is the correct way to approach this?

-
 The connection you wrote down is not invariant under $\Lambda$. Since $\omega$ contains both $z$ and $\overline{z}$, the gauge transformed connection $g^{-1}Dg$ will have both $dz$ and $d\overline{z}$, while your $D$ has only $d\overline{z}$. If, however, $\omega$ only contained $z$, you could not have $|g|=1$. – Pavel Safronov Sep 11 at 5:32