Hi! Here I present a solution to TASK 3 for the QOSF Mentorship Program.
You can find the solution in the jupyter notebook QOSF Screening Task.ipynb
. You can also click here to open the notebook in nbviewer online if some markdowns have not been rendered properly.
The quantum simulator has the following features:
- Does custom initialization of any number of qubits
- Creates and applies multiple single/multi-qubit paramteric and unparametric gates on all or some user selected qubits
- Allows the usage of global parameters
- Creates and applies controlled gates of any original unitary gate including swap. The number of control qubits can vary from 1 to n-1
- Does multishot measurement of all or some user selected qubits of the system and allows to plot the result
- Displays the circuit diagram for any circuit input
The notebook also contains examples where the usage of almost all of these features has been shown. It also includes the implementation of some algorithms to show how all the features can be used collectively.
Thank you!