Understanding Grovers Algorithm and implementing an n bit implementation on IBM QASM
The goal of this lab day is understanding Grovers Algorithm and trying to implement an n bit search in Python to create a QASM definition that can be run on IBM's quantum computer (or simulator).
- Basic knowledge of Quantum Mechanics.
- free credentials for IBM Quantum Experience
- knowledge of Python.
- Original Grover article.
include "qelib1.inc";
qreg q[5];
creg c[5];
h q[1];
h q[2];
h q[2];
cx q[1],q[2];
h q[2];
h q[1];
h q[2];
x q[1];
x q[2];
h q[2];
cx q[1],q[2];
h q[2];
x q[1];
x q[2];
h q[1];
h q[2];
measure q[1] -> c[1];
measure q[2] -> c[2];