In this repository, you will find my code submission to the QOSF Mentorship Program Fall 2020. The one I have decided to submit is #1. I decided to work in this particular task because I have a lot fun seeing how the optimization evolves tweaking variables and parameters. Sounds like a lot of fun right? 😝
For this version of the repository the master branch
correspond precisely to Task #1. I do have the intention to solve the other task and add in their own branch for this same repository. So if you would like to see all the solutions (my solutions with my own style and approach) you have to stay tuned to this repository. 😎
🌟 Bonus feature: I am also planning to include a julia
version of all the code, wherever possible of course.
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:
Even blocks
Odd blocks
The angles
Report with a plot, as a function of the number of layers, L, the minimum distance
Where
Bonus question:
Try using other gates for the parametrized gates and see what happens.
I have included a utils.py
file that contains all of the classes, functions, objects, and imports required for notebooks to run properly.
As a user, you are just required to provide the parameters needs to initialize the simulations. For a detailed description of the parameters take a look at the Notebooks.
For Task #1, I have defined a simulation
class that, among other parameters, receives the maximum number of layers that the user wants to include in the simulation. This class prepares the necessary circuits which are later executed. A optimization
class has also been define to tune the variational parameters of the circuits. Proper handling and execution of all simulations is already provided within the Notebooks. 👍
Nothing out of the ordinary is required for you to run the Notebooks, just make sure you have qiskit and qiskit[visualization] installed. Regarding specific requirements for your OS you can check the following link:
https://qiskit.org/documentation/install.html
To the Quantum Open Source Foundation and its fantastic staff for organizing this event!