+\section{Scalar electrodynamics}
+ 
+In the conventional representation two flavor scalar electrodynamics is a model of two flavors of 
+oppositely charged complex fields $\phi_x, \chi_x \in \mathds{C}$ living on the 
+sites $x$ of the lattice, interacting via the gauge fields $U_{x,\sigma} \in$ U(1) sitting on the links. 
+We use 4-d euclidean lattices of size $V_4 = N_s^3 \times N_t$ with periodic 
+boundary conditions for all directions. The lattice spacing is set to 1, i.e., all dimensionful quantities 
+are in units of the lattice spacing. 
+
+We write the action as the sum, $S = S_U + S_\phi + S_\chi$, where $S_U$ is the gauge action 
+and $S_\phi$ and $S_\chi$ are the actions for the two scalars. For the gauge action we use 
+Wilson's form
+\begin{equation} 
+S_U \; = \; - \beta \, \sum_x \sum_{\sigma < \tau} \mbox{Re} \; U_{x,\sigma} U_{x+\widehat{\sigma}, \tau}
+U_{x+\widehat{\tau},\sigma}^\star U_{x,\tau}^\star \; .
+\label{gaugeaction}
+\end{equation}
+The sum runs over all plaquettes, $\widehat{\sigma}$ and $\widehat{\tau}$ denote the unit vectors in $\sigma$- and 
+$\tau$-direction and the asterisk is used for complex conjugation.  
+The action for the field $\phi$ is 
+\begin{equation}
+S_\phi   
+\; =   \sum_x \!\Big(  M_\phi^2 \, |\phi_x|^2  + \lambda_\phi |\phi_x|^4  -
+\sum_{\nu = 1}^4 \!
+\big[  e^{-\mu_\phi  \delta_{\nu, 4} } \, \phi_x^\star \, U_{x,\nu} \,\phi_{x+\widehat{\nu}} 
+\, + \, 
+e^{\mu_\phi \delta_{\nu, 4}} \, \phi_x^\star \, 
+U_{x-\widehat{\nu}, \nu}^\star \, \phi_{x-\widehat{\nu}}  \big] \!  \Big) .
+\label{matteraction}  
+\end{equation}
+By $M_\phi^2$  we denote the combination $8 + m_\phi^2$, where $m_\phi$ is the bare mass
+parameter of the field $\phi$ and $\mu_\phi$ is the chemical potential, which favors forward
+hopping in time-direction (= 4-direction). We also allow for a quartic self interaction of the scalar fields and 
+the corresponding coupling is denoted as $\lambda_\phi$. Note that for $\mu_\phi \neq 0$ (\ref{matteraction}) 
+is complex, i.e., in the conventional form  the theory has a complex action problem.
+
+The action for the field $\chi$ has the same form as (\ref{matteraction}) but with complex conjugate link 
+variables $U_{x,\nu}$ such that $\chi$ has opposite charge.  $M_\chi^2$, $\mu_\chi$ and $\lambda_\chi$  
+are used for the parameters of $\chi$. 
+
+The partition sum $Z = \int D[U] D[\phi,\chi] e^{-S_U - S_\chi - S_\phi}$  is obtained by
+integrating the Boltzmann factor over all field configurations. The measures are products over
+the measures for each individual degree of freedom.
+
+
+
+\vskip2mm
+\noindent  
+{\bf Dual representation:} A detailed derivation of the dual representation for the one flavor
+model is given in \cite{swa} and the two flavor version we consider here simply uses two copies
+of the representation of the matter fields. The dual variables for the first flavor will be denoted by 
+$j_{x,\nu},  \overline{j}_{x,\nu}$, while $l_{x,\nu}$ and $\overline{l}_{x,\nu}$ are used for the second flavor.
+The dual representation of the partition sum for scalar QED 
+with two flavors of matter fields is given by
+\begin{equation}
+\hspace*{-3mm} Z = \!\!\!\!\!\! \sum_{\{p,j,\overline{j},l,\overline{l} \}} \!\!\!\!\!\!  {\cal C}_g[p,j,l]  \;  {\cal C}_s  [j] \;   {\cal C}_s  [l] \;  {\cal W}_U[p] 
+\; {\cal W}_\phi \big[j,\overline{j}\,\big] \, {\cal W}_\chi \big[l,\overline{l}\,\big]  .
+\label{Zfinal}
+\end{equation} 
+The sum runs over all configurations of the dual variables: The occupation numbers 
+$p_{x,\sigma\tau} \in \mathds{Z}$ assigned to the plaquettes of the lattice and the flux variables  $j_{x,\nu},  l_{x,\nu} \in \mathds{Z}$ and
+$\overline{j}_{x,\nu},  \overline{l}_{x,\nu} \in \mathds{N}_0$ living on the links. The flux variables $j$ and $l$ are subject
+to the constraints ${\cal C}_s$,
+\begin{equation}
+ {\cal C}_s [j] \, = \, \prod_x \delta \! \left( \sum_\nu \partial_\nu j_{x,\nu}  \right)\;  , \; \;
+ {\cal C}_s [l] \, = \, \prod_x \delta \! \left( \sum_\nu \partial_\nu l_{x,\nu}  \right) , \;
+\label{loopconstU1}
+\end{equation}
+which enforce the conservation of $j$-flux and of $l$-flux at each site of the lattice
+(here $\delta(n)$ denotes the Kronecker delta $\delta_{n,0}$ and $\partial_\nu f_x \equiv 
+f_x - f_{x-\widehat{\nu}}$).
+Another constraint,
+\begin{equation}
+ {\cal C}_g [p,j,l]  \! =\!  \prod_{x,\nu} \! \delta  \Bigg( \!\sum_{\nu < \alpha}\! \partial_\nu p_{x,\nu\alpha}  
+- \!\sum_{\alpha<\nu}\! \partial_\nu p_{x,\alpha\nu} + j_{x,\nu} - l_{x,\nu} \! \Bigg)\! ,
+\label{plaqconstU1}  
+\end{equation}
+connects the plaquette occupation numbers $p$ with the $j$- and $l$-variables. 
+At every link it enforces the combined flux of the plaquette occupation 
+numbers  plus the difference of $j$- and $l$-flux residing on that link to vanish.  The
+fact that $j$- and $l$-flux enter with opposite sign is due to the opposite charge of the two 
+flavors.
+
+The constraints (\ref{loopconstU1}) and (\ref{plaqconstU1}) restrict the admissible
+flux and plaquette occupation numbers giving rise to an interesting geometrical
+interpretation: The $j$- and $l$-fluxes form closed oriented loops made of links. The integers
+$j_{x,\nu}$ and $l_{x,\nu}$ determine how often a link is run through by loop segments, with negative
+numbers indicating net flux in the negative direction. The flux conservation 
+(\ref{loopconstU1}) ensures that only closed loops appear. Similarly, the constraint 
+(\ref{plaqconstU1}) for the plaquette occupation numbers can be seen as a continuity
+condition for surfaces made of plaquettes. The surfaces are either closed
+surfaces without boundaries or open surfaces bounded by  $j$- or $l$-flux.
+
+The configurations of plaquette occupation numbers and fluxes in (\ref{Zfinal}) come with 
+weight factors 
+\begin{eqnarray}
+{\cal W}_U[p] & = & \!\! \! \prod_{x,\sigma < \tau} \! \! \!
+ I_{p_{x,\sigma\tau}}(\beta) \, ,
+\\   
+{\cal W}_\phi \big[j,\overline{j}\big] & = & 
+\prod_{x,\nu}\! \frac{1}{(|j_{x,\nu}|\! +\! \overline{j}_{x,\nu})! \, 
+\overline{j}_{x,\nu}!} 
+\prod_x e^{-\mu j_{x,4}}  P_\phi \left( f_x \right) ,
+\nonumber
+\end{eqnarray}
+with 
+\begin{equation}
+f_x \; = \; \sum_\nu\!\big[ |j_{x,\nu}|\!+\!  |j_{x-\widehat{\nu},\nu}|  \!+\!
+2\overline{j}_{x,\nu}\! +\! 2\overline{j}_{x-\widehat{\nu},\nu} \big] \; ,
+\end{equation}
+which is an even number. The $I_p(\beta)$
+in the weights  ${\cal W}_U$ are the modified Bessel functions and the $P_\phi (2n)$ in 
+${\cal W}_\phi$  are the integrals
+\begin{equation}
+P_\phi (2n)  \; = \;  \int_0^\infty dr \, r^{2n+1}
+\,  e^{-M_\phi^2\, r^2 - \lambda_\phi r^4} = \sqrt{\frac{\pi}{16 \lambda}}  \, \left(\frac{-\partial}{\partial M^2}\right)^{\!n} \;  
+e^{\, M^4 / 4 \lambda} \left[1- erf(M^2/2\sqrt{\lambda})\right] \; .
+\end{equation}
+These integrals are related to derivatives of the error function and we evaluate them numerically and
+pre-store them for the Monte Carlo simulation. The weight factors $ {\cal
+W}_\chi$ are the same as the $ {\cal W}_\phi$, only  the parameters $M_\phi^2$,
+$\lambda_\phi$, $\mu_\phi$ are replaced by  $M_\chi^2$, $\lambda_\chi$, $\mu_\chi$. All
+weight factors are real and positive and the partition sum (\ref{Zfinal}) thus  is
+accessible  to Monte Carlo techniques,  using the plaquette occupation numbers and the
+flux variables as the new degrees of freedom.