Skip to content

Commit 26c7e2e

Browse files
Adam GitterNadavClassiq
authored andcommitted
updating qmod file for LCU
1 parent 4967a61 commit 26c7e2e

File tree

3 files changed

+55
-6
lines changed

3 files changed

+55
-6
lines changed

tutorials/advanced_tutorials/linear_combination_of_unitaries/linear_combination_of_unitaries.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,15 +290,15 @@
290290
},
291291
{
292292
"cell_type": "code",
293-
"execution_count": 14,
293+
"execution_count": 1,
294294
"id": "03804a1a",
295295
"metadata": {},
296296
"outputs": [
297297
{
298298
"name": "stdout",
299299
"output_type": "stream",
300300
"text": [
301-
"Opening: https://platform.classiq.io/circuit/2sDUbWQbPKHeoBcPvYjOS9PajN8?version=0.66.0\n"
301+
"Opening: https://platform.classiq.io/circuit/2sqWYKfPmYSb9oL9myDA0jJsCye?version=0.66.1\n"
302302
]
303303
}
304304
],

tutorials/advanced_tutorials/linear_combination_of_unitaries/linear_combination_of_unitaries.qmod

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
qfunc lcu_controllers(controller: qnum, psi: qnum) {
1+
qfunc prepare(controller: qnum) {
2+
inplace_prepare_state([0.5, 0.25, 0.25, 0], 0.01, controller);
3+
}
4+
5+
qfunc select(controller: qnum, psi: qnum) {
26
control (controller == 0) {
37
apply_to_all(IDENTITY, psi);
48
}
@@ -16,8 +20,8 @@ qfunc main(output controller: qnum, output psi: qnum) {
1620
allocate(2, psi);
1721
allocate(2, controller);
1822
within {
19-
inplace_prepare_state([0.5, 0.25, 0.25, 0], 0.01, controller);
23+
prepare(controller);
2024
} apply {
21-
lcu_controllers(controller, psi);
25+
select(controller, psi);
2226
}
2327
}
Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,46 @@
1-
{}
1+
{
2+
"constraints": {
3+
"max_gate_count": {},
4+
"optimization_parameter": "no_opt"
5+
},
6+
"preferences": {
7+
"machine_precision": 8,
8+
"custom_hardware_settings": {
9+
"basis_gates": [
10+
"y",
11+
"r",
12+
"z",
13+
"ry",
14+
"id",
15+
"u2",
16+
"x",
17+
"tdg",
18+
"cx",
19+
"sdg",
20+
"cy",
21+
"rx",
22+
"cz",
23+
"u1",
24+
"t",
25+
"p",
26+
"sx",
27+
"s",
28+
"sxdg",
29+
"u",
30+
"rz",
31+
"h"
32+
],
33+
"is_symmetric_connectivity": true
34+
},
35+
"debug_mode": true,
36+
"synthesize_all_separately": false,
37+
"optimization_level": 3,
38+
"output_format": [
39+
"qasm"
40+
],
41+
"pretty_qasm": true,
42+
"transpilation_option": "auto optimize",
43+
"timeout_seconds": 300,
44+
"random_seed": 2240489887
45+
}
46+
}

0 commit comments

Comments
 (0)