A quantum generative adversarial network to generate 2-qubit states. Modeled off of Dallaire-Demers and Killoran (2018). Specifically, I copied the ansatz architecture from Fig. 7:
My working notes from attempting to build this: https://postulate.us/@laura/quantum
I did this when I was 15, when I was just starting out in QC. I barely knew NumPy, didn't know what an expectation value was, and was struggling hard to make sense of any quantum code. I ended up piecing this together by combing through various PennyLane docs and diagrams. But this is to say, my implementation is not very in-depth or particularly thoughtful. I hope you keep the context in mind as you look through my notebook.
I make some incorrect claims in my notebook: QNN != PQC. They do not literally refer to the same thing. From my (incomplete) understanding now, quantum neural networks refer to a specific class of algorithms modeled off of classical NNs. Parametrized quantum circuits are any circuits that contain parametrized gates. PQCs can be QNNs but they can also be variational quantum algorithms (VQAs) or many other things. In this case, the QGAN is both a QNN and a PQC.