12.2 Quantum GANs in PennyLane
In this section, we are going to train a purely quantum GAN that will learn a one-qubit state. In our previous counterfeiting example, we imagined ourselves as behaving like a GAN in order to replicate some training data (a banknote) to produce fake banknotes that, ideally, would get closer and closer to the real thing in each iteration. In this case, our training data will be a one-qubit state, characterized by some amplitudes, and the job of our QGAN will be to replicate that state without the generator having direct access to it. Our dataset, then, will consist of multiple copies of a one-qubit state, and our goal will be to train a generator able to prepare that state (or something very close to it).
To learn more…
Notice that this setting does not violate the no-cloning theorem that we proved in Section 1.4.5. We will have multiple copies of the same quantum state and we will perform operations on them, including measuring them (and, hence...