Skip to content

Commit

Permalink
Merge pull request #22 from sebastiaanbrand/qasm-file-renaming
Browse files Browse the repository at this point in the history
circuits slash r corrected
  • Loading branch information
MarinusVanDijk authored Jul 20, 2024
2 parents 5f06dad + 8a30a31 commit bcfc7fc
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 118 deletions.
36 changes: 18 additions & 18 deletions qasm/circuits/qft_n4.qasm
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
// quantum Fourier transform
OPENQASM 2.0;
include "qelib1.inc";
qreg q[4];
creg c[4];
x q[0];
x q[2];
barrier q;
h q[0];
cu1(pi/2) q[1],q[0];
h q[1];
cu1(pi/4) q[2],q[0];
cu1(pi/2) q[2],q[1];
h q[2];
cu1(pi/8) q[3],q[0];
cu1(pi/4) q[3],q[1];
cu1(pi/2) q[3],q[2];
h q[3];
// quantum Fourier transform
OPENQASM 2.0;
include "qelib1.inc";
qreg q[4];
creg c[4];
x q[0];
x q[2];
barrier q;
h q[0];
cu1(pi/2) q[1],q[0];
h q[1];
cu1(pi/4) q[2],q[0];
cu1(pi/2) q[2],q[1];
h q[2];
cu1(pi/8) q[3],q[0];
cu1(pi/4) q[3],q[1];
cu1(pi/2) q[3],q[2];
h q[3];
196 changes: 98 additions & 98 deletions qasm/circuits/vqe_n4.qasm
Original file line number Diff line number Diff line change
@@ -1,98 +1,98 @@
OPENQASM 2.0;
include "qelib1.inc";
qreg q[4];
creg meas[4];
sx q[0];
rz(5.0300511584448) q[0];
sx q[0];
rz(3*pi) q[0];
rz(2.61519568487349) q[0];
sx q[1];
rz(5.36606826220224) q[1];
sx q[1];
rz(3*pi) q[1];
rz(0.667082990176662) q[1];
cx q[0],q[1];
sx q[0];
rz(4.09739784898316) q[0];
sx q[0];
rz(3*pi) q[0];
rz(1.92219255913748) q[0];
sx q[2];
rz(3.20626074964735) q[2];
sx q[2];
rz(3*pi) q[2];
rz(0.571219981217032) q[2];
cx q[1],q[2];
sx q[1];
rz(4.79016360412963) q[1];
sx q[1];
rz(3*pi) q[1];
rz(0.438232887845333) q[1];
cx q[0],q[1];
sx q[0];
rz(4.57437876552885) q[0];
sx q[0];
rz(3*pi) q[0];
rz(1.86112525741656) q[0];
sx q[3];
rz(6.18865431978628) q[3];
sx q[3];
rz(3*pi) q[3];
rz(0.576182260790784) q[3];
cx q[2],q[3];
sx q[2];
rz(4.49858795091057) q[2];
sx q[2];
rz(3*pi) q[2];
rz(0.917799481623813) q[2];
cx q[1],q[2];
sx q[1];
rz(5.60829568567739) q[1];
sx q[1];
rz(3*pi) q[1];
rz(0.145928275357359) q[1];
cx q[0],q[1];
sx q[0];
rz(3.34595826021666) q[0];
sx q[0];
rz(3*pi) q[0];
rz(0.956972379417358) q[0];
sx q[3];
rz(4.05651598094723) q[3];
sx q[3];
rz(3*pi) q[3];
rz(1.15095967544708) q[3];
cx q[2],q[3];
sx q[2];
rz(3.76888634073298) q[2];
sx q[2];
rz(3*pi) q[2];
rz(1.90865844345986) q[2];
cx q[1],q[2];
sx q[1];
rz(6.12260448652247) q[1];
sx q[1];
rz(3*pi) q[1];
rz(0.30684599582304) q[1];
sx q[3];
rz(4.75710778753287) q[3];
sx q[3];
rz(3*pi) q[3];
rz(0.535717334235832) q[3];
cx q[2],q[3];
sx q[2];
rz(6.17521515476781) q[2];
sx q[2];
rz(3*pi) q[2];
rz(2.1495814494341) q[2];
sx q[3];
rz(5.68124782361394) q[3];
sx q[3];
rz(3*pi) q[3];
rz(1.38277984079156) q[3];
barrier q[0],q[1],q[2],q[3];
measure q[0] -> meas[0];
measure q[1] -> meas[1];
measure q[2] -> meas[2];
measure q[3] -> meas[3];
OPENQASM 2.0;
include "qelib1.inc";
qreg q[4];
creg meas[4];
sx q[0];
rz(5.0300511584448) q[0];
sx q[0];
rz(3*pi) q[0];
rz(2.61519568487349) q[0];
sx q[1];
rz(5.36606826220224) q[1];
sx q[1];
rz(3*pi) q[1];
rz(0.667082990176662) q[1];
cx q[0],q[1];
sx q[0];
rz(4.09739784898316) q[0];
sx q[0];
rz(3*pi) q[0];
rz(1.92219255913748) q[0];
sx q[2];
rz(3.20626074964735) q[2];
sx q[2];
rz(3*pi) q[2];
rz(0.571219981217032) q[2];
cx q[1],q[2];
sx q[1];
rz(4.79016360412963) q[1];
sx q[1];
rz(3*pi) q[1];
rz(0.438232887845333) q[1];
cx q[0],q[1];
sx q[0];
rz(4.57437876552885) q[0];
sx q[0];
rz(3*pi) q[0];
rz(1.86112525741656) q[0];
sx q[3];
rz(6.18865431978628) q[3];
sx q[3];
rz(3*pi) q[3];
rz(0.576182260790784) q[3];
cx q[2],q[3];
sx q[2];
rz(4.49858795091057) q[2];
sx q[2];
rz(3*pi) q[2];
rz(0.917799481623813) q[2];
cx q[1],q[2];
sx q[1];
rz(5.60829568567739) q[1];
sx q[1];
rz(3*pi) q[1];
rz(0.145928275357359) q[1];
cx q[0],q[1];
sx q[0];
rz(3.34595826021666) q[0];
sx q[0];
rz(3*pi) q[0];
rz(0.956972379417358) q[0];
sx q[3];
rz(4.05651598094723) q[3];
sx q[3];
rz(3*pi) q[3];
rz(1.15095967544708) q[3];
cx q[2],q[3];
sx q[2];
rz(3.76888634073298) q[2];
sx q[2];
rz(3*pi) q[2];
rz(1.90865844345986) q[2];
cx q[1],q[2];
sx q[1];
rz(6.12260448652247) q[1];
sx q[1];
rz(3*pi) q[1];
rz(0.30684599582304) q[1];
sx q[3];
rz(4.75710778753287) q[3];
sx q[3];
rz(3*pi) q[3];
rz(0.535717334235832) q[3];
cx q[2],q[3];
sx q[2];
rz(6.17521515476781) q[2];
sx q[2];
rz(3*pi) q[2];
rz(2.1495814494341) q[2];
sx q[3];
rz(5.68124782361394) q[3];
sx q[3];
rz(3*pi) q[3];
rz(1.38277984079156) q[3];
barrier q[0],q[1],q[2],q[3];
measure q[0] -> meas[0];
measure q[1] -> meas[1];
measure q[2] -> meas[2];
measure q[3] -> meas[3];
2 changes: 1 addition & 1 deletion qasm/simple_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class QASMParser {
case ins_type::classical_cond:
parse_error("Classical conditioning currently unsupported");
default:
parse_error("Unsupported instruction type");
parse_error("Unsupported instruction type (" + line + ")");
}
}

Expand Down
2 changes: 1 addition & 1 deletion qasm/test/test_sim_qasm.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@


TOLERANCE = 1e-6
SIM_QASM = './build/qasm/sim_qasm'
SIM_QASM = './build/qasm/run_qasm_on_qmdd'
QASM_DIR = 'qasm/circuits/'


Expand Down

0 comments on commit bcfc7fc

Please sign in to comment.