https://github.com/rochisha0/qosf-task
Submission of Task 2 for the screening of QOSF Mentorship Program
https://github.com/rochisha0/qosf-task
pennylane qiskit quantum-computing
Last synced: 2 days ago
JSON representation
Submission of Task 2 for the screening of QOSF Mentorship Program
- Host: GitHub
- URL: https://github.com/rochisha0/qosf-task
- Owner: rochisha0
- Created: 2020-09-03T08:08:31.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-09-12T20:07:08.000Z (about 5 years ago)
- Last Synced: 2025-08-10T22:11:16.633Z (2 months ago)
- Topics: pennylane, qiskit, quantum-computing
- Language: Jupyter Notebook
- Homepage:
- Size: 313 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Submission of Task 2 and Task 3 for the screening of QOSF Mentorship Program
## Task 2
I have used `pennylane` with `qiskit` library plugin to solve the screening task.
#### The steps involved in the solution:
* Creating a parametrized circuit using RX and RY and CNOTs for creating `|01>` and `|10>` with eaual probability and and running it on a noisy simulator.
* Applied a parametrized RY gate and RX gate on first and second qubit respectively and measured the probability of the states.
* Started with chosing random parameters.
* Created a cost function which returns `((prob_00-0)**2 + (prob_01-0.5)**2 + (prob_10-0.5)**2 + (prob_11-0)**2)` where `prob_x` gives the probability of the given state
* Used a prebuilt `Gradient Descent Optimizer` in `pennylane` library to find the parameters for different number of measurements.
* Plotted the state probability for different number of measurements.#### Steps involved in the bonus question:
* I measured the expectation value of `X@X` for the state, where `@` is the `tensor product`.
* Then minimized `-1*expectation value` to find the parameter using `Gradient Descent`## Task 3
I have used `qiskit` library to solve the Task 3.
#### The steps involved in the solution
* Created `H`, `X`, `Y`, `Z`, `CNOT` gate using `RX`, `RZ`, `CZ`.
* Reduced the overhead by `Basic Swap`.## Note
If you want to evaluate with only one task, please go ahead with **Task2**.