Skip to content

Commit 7b379ed

Browse files
committed
Restore prepare-state .qmod for walkthrough
1 parent 7e61669 commit 7b379ed

File tree

3 files changed

+80
-0
lines changed

3 files changed

+80
-0
lines changed

tutorials/basic_tutorials/prepare_state/prepare_state.ipynb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@
129129
],
130130
"source": [
131131
"qprog = synthesize(main)\n",
132+
"write_qmod(main, \"prepare_state\")\n",
132133
"show(qprog)"
133134
]
134135
},
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
qfunc main(output io: qbit[]) {
2+
prepare_state([
3+
0,
4+
0.002,
5+
0.004,
6+
0.006,
7+
0.0081,
8+
0.0101,
9+
0.0121,
10+
0.0141,
11+
0.0161,
12+
0.0181,
13+
0.0202,
14+
0.0222,
15+
0.0242,
16+
0.0262,
17+
0.0282,
18+
0.0302,
19+
0.0323,
20+
0.0343,
21+
0.0363,
22+
0.0383,
23+
0.0403,
24+
0.0423,
25+
0.0444,
26+
0.0464,
27+
0.0484,
28+
0.0504,
29+
0.0524,
30+
0.0544,
31+
0.0565,
32+
0.0585,
33+
0.0605,
34+
0.0625
35+
], 0.01, io);
36+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
{
2+
"constraints": {
3+
"optimization_parameter": "no_opt"
4+
},
5+
"preferences": {
6+
"machine_precision": 8,
7+
"custom_hardware_settings": {
8+
"basis_gates": [
9+
"cy",
10+
"rx",
11+
"cx",
12+
"x",
13+
"sxdg",
14+
"u2",
15+
"id",
16+
"cz",
17+
"r",
18+
"h",
19+
"u1",
20+
"t",
21+
"u",
22+
"rz",
23+
"sdg",
24+
"y",
25+
"p",
26+
"sx",
27+
"s",
28+
"ry",
29+
"tdg",
30+
"z"
31+
],
32+
"is_symmetric_connectivity": true
33+
},
34+
"debug_mode": true,
35+
"synthesize_all_separately": false,
36+
"optimization_level": 3,
37+
"output_format": ["qasm"],
38+
"pretty_qasm": true,
39+
"transpilation_option": "auto optimize",
40+
"timeout_seconds": 300,
41+
"random_seed": 3686255877
42+
}
43+
}

0 commit comments

Comments
 (0)