Skip to content

Commit

Permalink
fix to decimal_precision dqi
Browse files Browse the repository at this point in the history
  • Loading branch information
orsa-classiq committed Nov 26, 2024
1 parent 4649623 commit 18ae771
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion algorithms/dqi/dqi_max_xorsat.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@
" execution_preferences=ExecutionPreferences(num_shots=10000),\n",
")\n",
"\n",
"write_qmod(qmod, \"dqi_max_xorsat\", decimal_precision=8)\n",
"write_qmod(qmod, \"dqi_max_xorsat\", decimal_precision=20)\n",
"qprog = synthesize(qmod)\n",
"show(qprog, display_url=False)"
]
Expand Down
22 changes: 11 additions & 11 deletions algorithms/dqi/dqi_max_xorsat.qmod
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ qfunc _dicke_split_cycle_shift_expanded___0(qvar: qbit[6]) {
qvar -> {qvar___0_0, qvar___1_0, qvar___2_0, qvar___3_0, qvar___4_0, qvar___5_0};
} apply {
control (qvar___0_0) {
RY(2.30052398, qvar___1_0);
RY(2.300523983021863, qvar___1_0);
}
}
}
Expand All @@ -102,7 +102,7 @@ qfunc _dicke_split_cycle_shift_expanded___0(qvar: qbit[6]) {
result__temp___0 = qvar___0_1 & qvar___1_1;
} apply {
control (result__temp___0) {
RY(1.91063324, qvar___2_1);
RY(1.9106332362490186, qvar___2_1);
}
}
}
Expand All @@ -122,7 +122,7 @@ qfunc _dicke_split_cycle_shift_expanded___1(qvar: qbit[5]) {
qvar -> {qvar___0_2, qvar___1_2, qvar___2_2, qvar___3_2, qvar___4_2};
} apply {
control (qvar___0_2) {
RY(2.21429744, qvar___1_2);
RY(2.214297435588181, qvar___1_2);
}
}
}
Expand All @@ -142,7 +142,7 @@ qfunc _dicke_split_cycle_shift_expanded___1(qvar: qbit[5]) {
result__temp___1 = qvar___0_3 & qvar___1_3;
} apply {
control (result__temp___1) {
RY(1.77215425, qvar___2_3);
RY(1.7721542475852274, qvar___2_3);
}
}
}
Expand All @@ -161,7 +161,7 @@ qfunc _dicke_split_cycle_shift_expanded___2(qvar: qbit[4]) {
qvar -> {qvar___0_4, qvar___1_4, qvar___2_4, qvar___3_4};
} apply {
control (qvar___0_4) {
RY(2.0943951, qvar___1_4);
RY(2.0943951023931957, qvar___1_4);
}
}
}
Expand All @@ -180,7 +180,7 @@ qfunc _dicke_split_cycle_shift_expanded___2(qvar: qbit[4]) {
result__temp___2 = qvar___0_5 & qvar___1_5;
} apply {
control (result__temp___2) {
RY(1.57079633, qvar___2_5);
RY(1.5707963267948968, qvar___2_5);
}
}
}
Expand All @@ -198,7 +198,7 @@ qfunc _dicke_split_cycle_shift_expanded___3(qvar: qbit[3]) {
qvar -> {qvar___0_6, qvar___1_6, qvar___2_6};
} apply {
control (qvar___0_6) {
RY(1.91063324, qvar___1_6);
RY(1.9106332362490186, qvar___1_6);
}
}
}
Expand All @@ -216,7 +216,7 @@ qfunc _dicke_split_cycle_shift_expanded___3(qvar: qbit[3]) {
result__temp___3 = qvar___0_7 & qvar___1_7;
} apply {
control (result__temp___3) {
RY(1.23095942, qvar___2_7);
RY(1.2309594173407747, qvar___2_7);
}
}
}
Expand All @@ -233,7 +233,7 @@ qfunc _dicke_split_cycle_shift_expanded___4(qvar: qbit[2]) {
qvar -> {qvar___0_8, qvar___1_8};
} apply {
control (qvar___0_8) {
RY(1.57079633, qvar___1_8);
RY(1.5707963267948968, qvar___1_8);
}
}
}
Expand Down Expand Up @@ -574,8 +574,8 @@ qfunc dqi_max_xor_sat_expanded___0(output y: qbit[6], output solution: qbit[6])
k_num_errors: qnum<2, False, 0>;
prepare_amplitudes([
0.0,
0.70710678,
0.70710678,
0.7071067811865475,
0.7071067811865477,
0.0
], 0, k_num_errors);
k_unary: qbit[3];
Expand Down

0 comments on commit 18ae771

Please sign in to comment.