Skip to content

Commit 466c3a4

Browse files
committed
Documented and improved classical shadows on correct branch.
1 parent fb82248 commit 466c3a4

File tree

5 files changed

+953
-0
lines changed

5 files changed

+953
-0
lines changed

community/paper_implementation_project/classical_shadows/classical_shadows.ipynb

Lines changed: 893 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"friendly_name": "Classical Shadows",
3+
"description": "Classical shadows algorithm demonstrated on a bell state.",
4+
"qmod_type": ["algorithms"],
5+
"problem_domain_tags": [],
6+
"level": ["basic", "demos"]
7+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
qfunc unitary_application(state: qbit[]) {
2+
H(state[0]);
3+
}
4+
5+
qfunc main(output qarr: qbit[]) {
6+
prepare_bell_state(0, qarr);
7+
unitary_application(qarr);
8+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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+
"x",
11+
"cy",
12+
"y",
13+
"z",
14+
"ry",
15+
"sx",
16+
"u2",
17+
"s",
18+
"tdg",
19+
"rx",
20+
"h",
21+
"cz",
22+
"id",
23+
"rz",
24+
"sxdg",
25+
"r",
26+
"u1",
27+
"sdg",
28+
"u",
29+
"p",
30+
"t",
31+
"cx"
32+
],
33+
"is_symmetric_connectivity": true
34+
},
35+
"debug_mode": true,
36+
"synthesize_all_separately": false,
37+
"optimization_level": 3,
38+
"output_format": ["qasm"],
39+
"pretty_qasm": true,
40+
"transpilation_option": "auto optimize",
41+
"timeout_seconds": 300,
42+
"random_seed": 3766126510
43+
}
44+
}

tests/resources/timeouts.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ bitwise_xor_integer_example.qmod: 10
4949
block_encoding.qmod: 300
5050
bpde.ipynb: 600
5151
bpde.qmod: 10
52+
classical_shadows.ipynb: 300
5253
classiq_chemistry_application.ipynb: 80
5354
classiq_discrete_quantum_walk.ipynb: 300
5455
classiq_iQuHack_2025_final.ipynb: 200

0 commit comments

Comments
 (0)