QSBench commited on
Commit
b6043a3
Β·
verified Β·
1 Parent(s): 4021001

Create GUIDE.md

Browse files
Files changed (1) hide show
  1. GUIDE.md +120 -0
GUIDE.md ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 🌌 Quantum Noise Robustness Benchmark Guide
2
+
3
+ Welcome to the **Quantum Noise Robustness Benchmark**.
4
+ This tool shows how well Machine Learning can **predict the impact of noise** on quantum circuits using only structural and topological features β€” without running any noisy simulation.
5
+
6
+ ---
7
+
8
+ ## ⚠️ Important: Demo Dataset Notice
9
+
10
+ This Space uses the **demo shard** of the QSBench Amplitude Damping dataset.
11
+
12
+ - **Limited size**: Only a small subset of circuits is loaded for fast demonstration.
13
+ - **Impact**: Results may vary depending on the random split and selected features.
14
+ - **Goal**: Showcase how circuit structure correlates with noise-induced errors β€” not achieve production-level accuracy.
15
+
16
+ ---
17
+
18
+ ## 🎯 1. What is Being Predicted?
19
+
20
+ The model performs **multi-output regression** and predicts **three error values** simultaneously:
21
+
22
+ ### Targets
23
+ - **`error_Z_global`** β€” deviation in Z-basis expectation value
24
+ - **`error_X_global`** β€” deviation in X-basis expectation value
25
+ - **`error_Y_global`** β€” deviation in Y-basis expectation value
26
+
27
+ These errors are calculated as:
28
+ **`error = noisy_expval - ideal_expval`**
29
+
30
+ The goal is to estimate **how much noise distorts** the observable without actually applying the noise channel.
31
+
32
+ ---
33
+
34
+ ## 🧩 2. How the Model β€œSees” a Circuit
35
+
36
+ The model never simulates quantum states or noise.
37
+ It only uses **structural proxies**:
38
+
39
+ ### πŸ”Ή Topology Features
40
+ - `adj_density` β€” how densely qubits are connected
41
+ - `adj_degree_mean` / `adj_degree_std` β€” average and variability of connectivity
42
+
43
+ ### πŸ”Ή Gate Structure & Complexity
44
+ - `depth`, `total_gates`, `cx_count`, `two_qubit_gates`
45
+ - `gate_entropy` β€” measure of randomness vs regularity
46
+
47
+ ### πŸ”Ή QASM-derived Signals
48
+ - `qasm_length`, `qasm_line_count`, `qasm_gate_keyword_count`
49
+
50
+ These features capture **entanglement potential** and **circuit complexity** β€” the main factors that determine noise sensitivity.
51
+
52
+ ---
53
+
54
+ ## πŸ€– 3. Model Overview
55
+
56
+ The system uses:
57
+
58
+ ### MultiOutput HistGradientBoostingRegressor
59
+ - Fast and accurate gradient boosting
60
+ - Predicts all three errors (`Z`, `X`, `Y`) at once
61
+ - Pipeline includes median imputation + standard scaling
62
+
63
+ This is currently the strongest and fastest model for tabular quantum data.
64
+
65
+ ---
66
+
67
+ ## πŸ“Š 4. Understanding the Results
68
+
69
+ After clicking **"Train Multi-Output Regressor"** you get:
70
+
71
+ ### A. Predicted vs True Error (three plots)
72
+ - Each point = one circuit
73
+ - Red dashed line = perfect prediction
74
+ - The tighter the points around the line β†’ the better the model
75
+
76
+ ### B. Residual Distribution
77
+ - Shows prediction errors (`True - Predicted`)
78
+ - Centered around zero = unbiased model
79
+ - Narrow spread = high precision
80
+
81
+ ---
82
+
83
+ ## πŸ“‰ 5. Metrics Explained
84
+
85
+ For each basis (**Z**, **X**, **Y**) the model reports:
86
+
87
+ - **MAE** β€” average absolute error (in expectation value units)
88
+ - **RMSE** β€” root mean squared error (penalizes large mistakes)
89
+ - **RΒ²** β€” coefficient of determination (1.0 = perfect fit, 0 = no better than mean)
90
+
91
+ Higher RΒ² and lower MAE/RMSE = better noise robustness prediction.
92
+
93
+ ---
94
+
95
+ ## πŸ§ͺ 6. Experimentation Tips
96
+
97
+ Try these experiments to understand the model better:
98
+
99
+ - Use **only topology features** (`adj_*`) β†’ isolate structural effect
100
+ - Remove `cx_count` β†’ see how much two-qubit gates matter
101
+ - Increase **Max Iterations** to 600–800 for more stable predictions
102
+ - Change **Test Split** and re-train several times β†’ check robustness
103
+ - Compare results with and without `gate_entropy`
104
+
105
+ ---
106
+
107
+ ## πŸ”¬ 7. Key Insight
108
+
109
+ > Noise does not appear randomly β€” it leaves clear fingerprints in circuit structure.
110
+ Even without running expensive noisy simulations, features like connectivity, depth, and gate counts already contain enough signal to predict how much the expectation values will be distorted.
111
+
112
+ This demonstrates the power of **structure-aware** quantum machine learning for noise benchmarking.
113
+
114
+ ---
115
+
116
+ ## πŸ”— 8. Project Resources
117
+
118
+ - πŸ€— **Hugging Face**: [https://huggingface.co/QSBench](https://huggingface.co/QSBench)
119
+ - πŸ’» **GitHub**: [https://github.com/QSBench](https://github.com/QSBench)
120
+ - 🌐 **Website**: [https://qsbench.github.io](https://qsbench.github.io)