# Objective function of Quantum GAN in the paper "Quantum generative adversarial networks"

In this paper about Quantum GANs, the authors do not explain clearly how do they have the equation


from

$$V(\vec{\theta}_D, \vec{\theta}_D)= \frac{1}{\Lambda} \sum_{\lambda=1}^{\Lambda} \Pr\Big[ ( D(\vec{\theta}_D,|\lambda\rangle, R(|\lambda\rangle)) = |\operatorname{real}\rangle ) \\\cap ( D(\vec{\theta}_D,|\lambda\rangle, G(\vec{\theta}_G,|\lambda,z\rangle)) =|\operatorname{fake}\rangle ) \Big] .$$

They suggested that it relate to classical case, but I still don't know the key point.

Hope to see some ideas from you. Thanks!

In essence, we want to maximize the probability that the discriminator $$D$$ outputs the state $$\left|\textrm{Real}\right\rangle$$ on training data $$R$$ and $$\left|\textrm{Fake}\right\rangle$$ when given a state from the generator $$G$$. This roughly matches the interpretation of the optimization problem over the constructed $$\left\langle Z\right\rangle$$ expectation value. In hindsight, it would have made more sense to use the union operator $$\cup$$ in Eq. 3 instead of the intersection operator $$\cap$$. It might also have been worth to comment that we did not use log probabilities (which would be interesting to do along with an analysis of the sampling complexity).
Additionally, the “$$\phi$$” terms of Eq. 11 may be somewhat confusing. This relative frequency is a free parameter in the construction. I presumed the cost function should be normalized over the relative frequency using the training data $$R$$ and using the generator $$G$$. This is an artefact of an earlier derivation where $$R$$ and $$G$$ were inputs on different channels of $$D$$ and the which-path information had to be erased. Leaving it in the single channel formulation has the advantage of preventing pathological cases where the cost function would only be measured on $$R$$ (or $$G$$). As told in the main text, the simple case where $$R$$ and $$G$$ are picked at random corresponds to $$\phi = \frac{\pi}{4}$$.