# Game formulation of Quantum GAN

Quantum Generative Adversarial Network (QuGAN) generates a desired quantum state via a minimax game between generator and discriminator (equivalently, it's optimizing a trace distance between parameterized quantum state and the desired quantum state).

In what situation this formulation of QuGAN may be advantageous than other standard methods, e.g. generating the same desired quantum state via optimization of fidelity between two states? Perhaps, the issue can simply be reduced down to "fidelity vs trace distance" problem, and therefore my second question naturally asks then why this game formulation would be a better idea than just optimizing trace distance by taking its gradient?

Suppose $$\sigma$$ is a state and that you are trying to teach a generator to produce samples drawn from $$\sigma_{gen}$$ that closely resemble the statistics of samples drawn from $$\sigma$$. In a way, the implicit goal of the QGAN is precisely to minimize trace distance $$\lVert \sigma - \sigma_{gen}\rVert_1$$.
This is analogous to the goal of a classical GAN: As a generative model, the goal is to model an underlying distribution $$p(x)$$ over some set of objects $$x$$. If you come up with some model distribution $$p_{gen}(x)$$ then total variation distance $$\lVert p- p_{gen}\rVert_1 = 0$$ tells you that you've perfectly described the input distribution, and you can now sample from $$p_{gen}$$ to generate examples $$x$$ that appear to have come from $$p$$.
In both classical and quantum cases, we are limited in our ability to directly compute $$\lVert p - p_{gen} \rVert_1$$. If the state space is very large ($$x$$ are 256x256 images or $$\sigma$$ is high-dimensional), it will be very hard to directly compute this distance given query access to $$p$$ alone. Of course a naive upper limit is the number of queries needed to model $$p$$ with good precision, after which you have the distribution and there's no need to try to train something to output $$p_{gen}$$. The goal of (Q)GAN is to get a decently good model for $$p$$ while staying well below this kind of upper limit on samples.
• Thanks for the comment. Instead of directly computing the trace distance between the two states, don't we only need to consider minimizing the trace distance by taking derivatives of the trace distance wrt parameters $\theta$ of $\rho_{gen}(\theta)$? And I believe that this derivative will have a close-analytic form. So I'm still confused why the QGAN is better than exploiting the gradient-descent algorithm to optimize for the trace distance. Commented Mar 18, 2022 at 7:08
• Sure, sounds like you're describing something similar to maximum likelihood estimation. There won't be closed-form derivatives for this in the general case - maybe in your case if there are then MLE is a better approach. But consider something like 256x256 images of human faces: One doesn't have a prior guess as to how many dimensions $\theta$ is, or how $p_{gen}$ needs to depend on $\theta$ for that kind of distribution in image-space. This is one case where GANs make sense, and suggests analogous kinds of situations for QGANs with quantum data. Commented Mar 18, 2022 at 13:22
• Thanks for the comment. I agree with you on the first part. But I think the gradient will always have a close form, which can be found here: math.stackexchange.com/questions/2571260/…. (In our case, we assume $\sigma$ does not depend on $t$). So regarding what you mentioned about the dimension, I’m still not clear why dimensions matter here. In fact, even if dimension of $\theta$ is huge, the generator step in the QGAN will also minimize for Tr$(D\rho_{gen}(\theta))$ wrt $\theta$, which also considers the dimension of $\theta$. Commented Mar 18, 2022 at 18:32
• That formula you provide requires knowledge of $\rho$ to compute - specifically, the ability to diagonalize $\rho - \rho_{gen}(\theta)$. If you have access to $\rho$ such that you can compute $(\rho - \rho_{gen}(\theta)^\dagger \partial_\theta (\rho - \rho_{gen}(\theta)) + \text{h.c.}$ then your problem is already solved. Commented Mar 18, 2022 at 18:51