Skip to content

Instantly share code, notes, and snippets.

@brianlechthaler
Created December 21, 2020 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brianlechthaler/6fecec9a22c3aae3f249633206c21796 to your computer and use it in GitHub Desktop.
Save brianlechthaler/6fecec9a22c3aae3f249633206c21796 to your computer and use it in GitHub Desktop.
grover n=2 a=11 in QASM v2
OPENQASM 2.0;
include "qelib1.inc";
qreg q[2];
creg c[2];
reset q[0];
reset q[1];
h q[0];
h q[1];
h q[1];
cx q[0],q[1];
h q[0];
h q[1];
x q[0];
h q[1];
x q[1];
h q[1];
cx q[0],q[1];
x q[0];
h q[1];
h q[0];
x q[1];
h q[1];
measure q[0] -> c[0];
measure q[1] -> c[1];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment