Hello! This is my application to the Quantum Open Source Foundation's mentorship program. Of the 4 tasks, I decided to do task 1 using the Pennylane library.
The task_1.html file is an HTML export of Task 1.ipynb
You can also see the notebook at nbviewer in here
Implement, on a quantum simulator of your choice, the following 4 qubits state
Where the number of layers, denoted with L, has to be considered as a parameter. We call ¨Layer¨ the combination of 1 yellow + 1 green block, so, for example, U1 + U2 is a layer. The odd/even variational blocks are given by:
The angles
Report with a plot, as a function of the number of layers, L, the minimum distance
Where
The code for the problem and other experiments can be found in Task 1.ipynb. The required plot of loss vs. layer is:
Here, we can see that as we increase the number of layers, the loss decreases. After 8 layers, we seem to have settled on the optimal loss. This seems to be the case irrespective of the value of the vector we want to predict.