Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion algorithms/algebraic/discrete_log/discrete_log.qmod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
qfunc discrete_log_oracle(g_generator: int, x_element: int, N_modulus: int, x1: qbit[], x2: qbit[], output func_res: qbit[]) {
qfunc discrete_log_oracle(g_generator: int, x_element: int, N_modulus: int, x1: qbit[], x2: qbit[], output func_res: qnum) {
allocate(ceiling(log(N_modulus, 2)), func_res);
func_res ^= 1;
modular_exp(N_modulus, x_element, func_res, x1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
{
"constraints": {
"max_width": 13
"max_width": 13,
"max_gate_count": {},
"optimization_parameter": "no_opt"
},
"preferences": {
"machine_precision": 8,
"custom_hardware_settings": {
"basis_gates": [
"cx",
"u2",
"rx",
"t",
"rz",
"ry",
"sxdg",
"u1",
"u",
"tdg",
"z",
"r",
"s",
"h",
"cy",
"y",
"p",
"cz",
"x",
"sx",
"sdg",
"id"
],
"is_symmetric_connectivity": true
},
"debug_mode": true,
"synthesize_all_separately": false,
"optimization_level": 3,
"output_format": ["qasm"],
"pretty_qasm": true,
"transpilation_option": "auto optimize",
"timeout_seconds": 300,
"random_seed": 5814216
}
}
2 changes: 1 addition & 1 deletion algorithms/algebraic/discrete_log/discrete_log_large.qmod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
qfunc discrete_log_oracle(g_generator: int, x_element: int, N_modulus: int, x1: qbit[], x2: qbit[], output func_res: qbit[]) {
qfunc discrete_log_oracle(g_generator: int, x_element: int, N_modulus: int, x1: qbit[], x2: qbit[], output func_res: qnum) {
allocate(ceiling(log(N_modulus, 2)), func_res);
func_res ^= 1;
modular_exp(N_modulus, x_element, func_res, x1);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,45 @@
{
"constraints": {
"max_width": 22
"max_width": 23,
"max_gate_count": {},
"optimization_parameter": "no_opt"
},
"preferences": {
"machine_precision": 8,
"custom_hardware_settings": {
"basis_gates": [
"cx",
"u2",
"rx",
"t",
"rz",
"ry",
"sxdg",
"u1",
"u",
"tdg",
"z",
"r",
"s",
"h",
"cy",
"y",
"p",
"cz",
"x",
"sx",
"sdg",
"id"
],
"is_symmetric_connectivity": true
},
"debug_mode": true,
"synthesize_all_separately": false,
"optimization_level": 1,
"output_format": ["qasm"],
"pretty_qasm": true,
"transpilation_option": "auto optimize",
"timeout_seconds": 300,
"random_seed": 4274442387
}
}
72 changes: 36 additions & 36 deletions algorithms/aqc/solving_qlsp/solving_qlsp_with_aqc.ipynb

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@
"custom_hardware_settings": {
"basis_gates": [
"rx",
"h",
"rz",
"sx",
"cy",
"sdg",
"p",
"x",
"s",
"u",
"sdg",
"cy",
"sxdg",
"rz",
"cx",
"tdg",
"y",
"z",
"r",
"id",
"u1",
"t",
"h",
"sxdg",
"u1",
"z",
"ry",
"u",
"x",
"tdg",
"u2",
"cz"
"sx",
"id",
"cz",
"r"
],
"is_symmetric_connectivity": true
},
Expand All @@ -39,6 +39,6 @@
"pretty_qasm": true,
"transpilation_option": "auto optimize",
"timeout_seconds": 300,
"random_seed": 2572511402
"random_seed": 621833146
}
}
198 changes: 103 additions & 95 deletions algorithms/dqi/dqi_max_xorsat.ipynb

Large diffs are not rendered by default.

31 changes: 16 additions & 15 deletions algorithms/dqi/dqi_max_xorsat.synthesis_options.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,38 @@
"machine_precision": 8,
"custom_hardware_settings": {
"basis_gates": [
"u2",
"cy",
"rx",
"id",
"z",
"u",
"sxdg",
"rx",
"x",
"rz",
"sx",
"ry",
"z",
"t",
"p",
"u1",
"y",
"tdg",
"s",
"h",
"sx",
"cz",
"r",
"ry",
"cx",
"sdg",
"cz"
"tdg",
"s",
"cy",
"h",
"y",
"id",
"u2",
"p",
"rz"
],
"is_symmetric_connectivity": true
},
"debug_mode": true,
"synthesize_all_separately": false,
"optimization_level": 3,
"output_format": ["qasm"],
"pretty_qasm": true,
"transpilation_option": "auto optimize",
"timeout_seconds": 300,
"random_seed": 2676057990
"random_seed": 2724036560
}
}
4 changes: 2 additions & 2 deletions algorithms/qml/qgan/qgan_bars_and_strips.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -667,8 +667,8 @@
" return (samples.shape[0] - count_err) / samples.shape[0]\n",
"\n",
"\n",
"accuracy = evaluate_generator(samples=gen_data)\n",
"print(f\"Classically trained generator accuracy: {accuracy:.2%}%\")"
"accuracy_classical = evaluate_generator(samples=gen_data)\n",
"print(f\"Classically trained generator accuracy: {accuracy_classical:.2%}%\")"
]
},
{
Expand Down
1 change: 0 additions & 1 deletion algorithms/qml/qsvm/qsvm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@
" data2: CArray[CReal, feature_dimension],\n",
" qba: Output[QNum],\n",
"):\n",
"\n",
" allocate(ceiling(data1.len / 2), qba)\n",
" bloch_feature_map(data1, qba)\n",
" invert(lambda: bloch_feature_map(data2, qba))\n",
Expand Down
34 changes: 17 additions & 17 deletions algorithms/qml/qsvm/qsvm.synthesis_options.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@
"machine_precision": 8,
"custom_hardware_settings": {
"basis_gates": [
"h",
"ry",
"sxdg",
"u2",
"cy",
"sdg",
"u",
"u1",
"p",
"cx",
"t",
"cz",
"sx",
"y",
"rz",
"rx",
"t",
"x",
"tdg",
"p",
"z",
"sxdg",
"h",
"cy",
"u",
"r",
"rz",
"u1",
"sdg",
"s",
"u2",
"tdg",
"id",
"s"
"ry",
"x",
"cx",
"y"
],
"is_symmetric_connectivity": true
},
Expand All @@ -39,6 +39,6 @@
"pretty_qasm": true,
"transpilation_option": "auto optimize",
"timeout_seconds": 300,
"random_seed": 3405390845
"random_seed": 1598682726
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,6 @@
" reps: CInt,\n",
" qba: QArray[QBit],\n",
") -> None:\n",
"\n",
" power(\n",
" reps,\n",
" lambda: (\n",
Expand Down Expand Up @@ -308,7 +307,6 @@
"source": [
"@qfunc\n",
"def main(data1: CArray[CReal, N_DIM], data2: CArray[CReal, N_DIM], qba: Output[QNum]):\n",
"\n",
" allocate(data1.len, qba)\n",
" pauli_kernel(data1, PAULIS, AFFINES, CONNECTIVITY, REPS, qba)\n",
" invert(lambda: pauli_kernel(data2, PAULIS, AFFINES, CONNECTIVITY, REPS, qba))\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,24 @@
"custom_hardware_settings": {
"basis_gates": [
"p",
"id",
"t",
"u1",
"u",
"rx",
"cy",
"x",
"sdg",
"sxdg",
"id",
"cx",
"cz",
"u2",
"h",
"rz",
"ry",
"r",
"rx",
"rz",
"u1",
"u2",
"y",
"sx",
"x",
"u",
"cy",
"t",
"r",
"h",
"z",
"s",
"tdg"
Expand All @@ -39,6 +39,6 @@
"pretty_qasm": true,
"transpilation_option": "auto optimize",
"timeout_seconds": 300,
"random_seed": 3398128133
"random_seed": 962718680
}
}
8 changes: 4 additions & 4 deletions algorithms/qml/quantum_autoencoder/quantum_autoencoder.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1142,10 +1142,10 @@
" )\n",
"\n",
"\n",
"qmod_ae = create_model(main)\n",
"qmod_ae_alt = create_model(main)\n",
"\n",
"qprog_ae = synthesize(qmod_ae)\n",
"show(qprog_ae)"
"qprog_ae_alt = synthesize(qmod_ae_alt)\n",
"show(qprog_ae_alt)"
]
},
{
Expand Down Expand Up @@ -1210,7 +1210,7 @@
" super().__init__()\n",
"\n",
" self.qlayer = QLayer(\n",
" qprog_ae,\n",
" qprog_ae_alt,\n",
" execute,\n",
" post_process,\n",
" *args,\n",
Expand Down
4 changes: 1 addition & 3 deletions algorithms/qpe/qpe_for_matrix/qpe_for_matrix.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@
" ]\n",
")\n",
"\n",
"M_t = M.transpose()\n",
"\n",
"M = (M + M_t) / 2"
"M = (M + M.transpose()) / 2"
]
},
{
Expand Down
Loading