Skip to content

Commit c6e627d

Browse files
authored
Added benchmarks for optimal synthesis paper. (#301)
## Description This PR adds benchmarks for the optimal synthesis paper to the repo. If this should be handled another way, please tell me so and I will adapt accordingly. ## Checklist: <!--- This checklist serves as a reminder of a couple of things that ensure your pull request will be merged swiftly. --> - [x] The pull request only contains commits that are related to it. - [x] I have added appropriate tests and documentation. - [x] I have made sure that all CI jobs on GitHub pass. - [x] The pull request introduces no new warnings and follows the project's style guidelines.
2 parents 407caa5 + ff11bc6 commit c6e627d

28 files changed

+372
-0
lines changed

examples/grover/grover_3_0.qasm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
OPENQASM 2.0;
2+
include "qelib1.inc";
3+
gate cz_o0 q0,q1 { x q0; cz q0,q1; x q0; }
4+
gate ccz q0,q1,q2 { p(pi/4) q1; p(pi/4) q2; cx q1,q2; u(0,0,-pi/4) q2; cx q1,q2; u(0,0,0) q2; cx q1,q0; p(-pi/4) q0; p(pi/4) q2; cx q0,q2; u(0,0,pi/4) q2; cx q0,q2; u(0,-pi/2,0) q2; cx q1,q0; p(pi/4) q0; p(pi/4) q2; cx q0,q2; u(0,0,-pi/4) q2; cx q0,q2; u(0,0,0) q2; }
5+
gate cz_o0_139716235496752 q0,q1 { x q0; cz q0,q1; x q0; }
6+
gate gate_Q q0,q1,q2 { cz_o0 q2,q0; x q1; z q1; x q1; ccz q0,q1,q2; cz_o0_139716235496752 q2,q1; h q2; h q1; h q0; x q0; x q1; x q2; h q2; ccx q0,q1,q2; h q2; x q0; x q1; x q2; h q0; h q1; h q2; }
7+
qreg q[3];
8+
h q[0];
9+
h q[1];
10+
h q[2];
11+
gate_Q q[0],q[1],q[2];

examples/grover/grover_3_1.qasm

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
OPENQASM 2.0;
2+
include "qelib1.inc";
3+
gate cz_o0 q0,q1 { x q0; cz q0,q1; x q0; }
4+
gate gate_Q q0,q1,q2 { cz_o0 q0,q2; h q2; h q1; h q0; x q0; x q1; x q2; h q2; ccx q0,q1,q2; h q2; x q0; x q1; x q2; h q0; h q1; h q2; }
5+
qreg q[3];
6+
h q[0];
7+
h q[1];
8+
h q[2];
9+
gate_Q q[0],q[1],q[2];

examples/grover/grover_3_2.qasm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
OPENQASM 2.0;
2+
include "qelib1.inc";
3+
gate gate_Q q0,q1,q2 { z q0; x q1; z q1; x q1; h q2; h q1; h q0; x q0; x q1; x q2; h q2; ccx q0,q1,q2; h q2; x q0; x q1; x q2; h q0; h q1; h q2; }
4+
qreg q[3];
5+
h q[0];
6+
h q[1];
7+
h q[2];
8+
gate_Q q[0],q[1],q[2];

examples/grover/grover_3_3.qasm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
OPENQASM 2.0;
2+
include "qelib1.inc";
3+
gate ccz q0,q1,q2 { p(pi/4) q1; p(pi/4) q2; cx q1,q2; u(0,0,-pi/4) q2; cx q1,q2; u(0,0,0) q2; cx q1,q0; p(-pi/4) q0; p(pi/4) q2; cx q0,q2; u(0,0,pi/4) q2; cx q0,q2; u(0,-pi/2,0) q2; cx q1,q0; p(pi/4) q0; p(pi/4) q2; cx q0,q2; u(0,0,-pi/4) q2; cx q0,q2; u(0,0,0) q2; }
4+
gate ccz_o0 q0,q1,q2 { x q0; x q1; ccz q0,q1,q2; x q0; x q1; }
5+
gate cz_o0 q0,q1 { x q0; cz q0,q1; x q0; }
6+
gate gate_Q q0,q1,q2 { ccz_o0 q0,q2,q1; cz_o0 q2,q0; h q2; h q1; h q0; x q0; x q1; x q2; h q2; ccx q0,q1,q2; h q2; x q0; x q1; x q2; h q0; h q1; h q2; }
7+
qreg q[3];
8+
h q[0];
9+
h q[1];
10+
h q[2];
11+
gate_Q q[0],q[1],q[2];

examples/grover/grover_3_4.qasm

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
OPENQASM 2.0;
2+
include "qelib1.inc";
3+
gate cz_o0 q0,q1 { x q0; cz q0,q1; x q0; }
4+
gate gate_Q q0,q1,q2 { cz q0,q2; cz_o0 q2,q1; h q2; h q1; h q0; x q0; x q1; x q2; h q2; ccx q0,q1,q2; h q2; x q0; x q1; x q2; h q0; h q1; h q2; }
5+
qreg q[3];
6+
h q[0];
7+
h q[1];
8+
h q[2];
9+
gate_Q q[0],q[1],q[2];

examples/grover/grover_3_5.qasm

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
OPENQASM 2.0;
2+
include "qelib1.inc";
3+
gate ccz q0,q1,q2 { p(pi/4) q1; p(pi/4) q2; cx q1,q2; u(0,0,-pi/4) q2; cx q1,q2; u(0,0,0) q2; cx q1,q0; p(-pi/4) q0; p(pi/4) q2; cx q0,q2; u(0,0,pi/4) q2; cx q0,q2; u(0,-pi/2,0) q2; cx q1,q0; p(pi/4) q0; p(pi/4) q2; cx q0,q2; u(0,0,-pi/4) q2; cx q0,q2; u(0,0,0) q2; }
4+
gate ccz_o0 q0,q1,q2 { x q0; x q1; ccz q0,q1,q2; x q0; x q1; }
5+
gate gate_Q q0,q1,q2 { ccz_o0 q0,q2,q1; z q2; z q1; h q2; h q1; h q0; x q0; x q1; x q2; h q2; ccx q0,q1,q2; h q2; x q0; x q1; x q2; h q0; h q1; h q2; }
6+
qreg q[3];
7+
h q[0];
8+
h q[1];
9+
h q[2];
10+
gate_Q q[0],q[1],q[2];

examples/grover/grover_3_6.qasm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
OPENQASM 2.0;
2+
include "qelib1.inc";
3+
gate ccz q0,q1,q2 { p(pi/4) q1; p(pi/4) q2; cx q1,q2; u(0,0,-pi/4) q2; cx q1,q2; u(0,0,0) q2; cx q1,q0; p(-pi/4) q0; p(pi/4) q2; cx q0,q2; u(0,0,pi/4) q2; cx q0,q2; u(0,-pi/2,0) q2; cx q1,q0; p(pi/4) q0; p(pi/4) q2; cx q0,q2; u(0,0,-pi/4) q2; cx q0,q2; u(0,0,0) q2; }
4+
gate ccz_o0 q0,q1,q2 { x q0; x q1; ccz q0,q1,q2; x q0; x q1; }
5+
gate cz_o0 q0,q1 { x q0; cz q0,q1; x q0; }
6+
gate gate_Q q0,q1,q2 { ccz_o0 q2,q1,q0; x q2; cz_o0 q0,q2; x q2; h q2; h q1; h q0; x q0; x q1; x q2; h q2; ccx q0,q1,q2; h q2; x q0; x q1; x q2; h q0; h q1; h q2; }
7+
qreg q[3];
8+
h q[0];
9+
h q[1];
10+
h q[2];
11+
gate_Q q[0],q[1],q[2];

examples/grover/grover_3_7.qasm

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
OPENQASM 2.0;
2+
include "qelib1.inc";
3+
gate cz_o0 q0,q1 { x q0; cz q0,q1; x q0; }
4+
gate gate_Q q0,q1,q2 { cz_o0 q0,q2; h q2; h q1; h q0; x q0; x q1; x q2; h q2; ccx q0,q1,q2; h q2; x q0; x q1; x q2; h q0; h q1; h q2; }
5+
qreg q[3];
6+
h q[0];
7+
h q[1];
8+
h q[2];
9+
gate_Q q[0],q[1],q[2];

examples/grover/grover_3_8.qasm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
OPENQASM 2.0;
2+
include "qelib1.inc";
3+
gate gate_Q q0,q1,q2 { x q0; z q0; x q0; h q2; h q1; h q0; x q0; x q1; x q2; h q2; ccx q0,q1,q2; h q2; x q0; x q1; x q2; h q0; h q1; h q2; }
4+
qreg q[3];
5+
h q[0];
6+
h q[1];
7+
h q[2];
8+
gate_Q q[0],q[1],q[2];

examples/grover/grover_3_9.qasm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
OPENQASM 2.0;
2+
include "qelib1.inc";
3+
gate gate_Q q0,q1,q2 { cz q1,q2; x q1; z q1; x q1; h q2; h q1; h q0; x q0; x q1; x q2; h q2; ccx q0,q1,q2; h q2; x q0; x q1; x q2; h q0; h q1; h q2; }
4+
qreg q[3];
5+
h q[0];
6+
h q[1];
7+
h q[2];
8+
gate_Q q[0],q[1],q[2];

0 commit comments

Comments
 (0)