Update GUIDE.md
Browse files
GUIDE.md
CHANGED
|
@@ -1,120 +1,95 @@
|
|
| 1 |
# π Quantum Noise Robustness Benchmark Guide
|
| 2 |
|
| 3 |
Welcome to the **Quantum Noise Robustness Benchmark**.
|
| 4 |
-
This tool
|
| 5 |
|
| 6 |
---
|
| 7 |
|
| 8 |
## β οΈ Important: Demo Dataset Notice
|
| 9 |
|
| 10 |
-
This
|
| 11 |
|
| 12 |
-
- **Limited
|
| 13 |
-
- **
|
| 14 |
-
- **Goal**: Showcase
|
| 15 |
|
| 16 |
---
|
| 17 |
|
| 18 |
## π― 1. What is Being Predicted?
|
| 19 |
|
| 20 |
-
The model performs **multi-
|
| 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 |
-
|
| 28 |
-
**`error = noisy_expval - ideal_expval`**
|
| 29 |
|
| 30 |
-
|
| 31 |
|
| 32 |
---
|
| 33 |
|
| 34 |
## π§© 2. How the Model βSeesβ a Circuit
|
| 35 |
|
| 36 |
-
The model never simulates quantum states
|
| 37 |
-
It only uses **structural proxies**:
|
| 38 |
|
| 39 |
### πΉ Topology Features
|
| 40 |
-
- `adj_density` β how densely qubits are connected
|
| 41 |
-
- `adj_degree_mean`
|
| 42 |
|
| 43 |
-
### πΉ
|
| 44 |
-
- `depth`
|
| 45 |
-
- `
|
|
|
|
| 46 |
|
| 47 |
-
### πΉ QASM
|
| 48 |
-
- `qasm_length`
|
| 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 |
-
##
|
| 68 |
-
|
| 69 |
-
After clicking **"Train Multi-Output Regressor"** you get:
|
| 70 |
|
| 71 |
-
|
| 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 |
-
|
| 77 |
-
-
|
| 78 |
-
-
|
| 79 |
-
- Narrow spread = high precision
|
| 80 |
|
| 81 |
---
|
| 82 |
|
| 83 |
-
##
|
| 84 |
|
| 85 |
-
|
|
|
|
|
|
|
|
|
|
| 86 |
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
- **RΒ²** β coefficient of determination (1.0 = perfect fit, 0 = no better than mean)
|
| 90 |
|
| 91 |
-
|
|
|
|
|
|
|
| 92 |
|
| 93 |
---
|
| 94 |
|
| 95 |
-
## π§ͺ
|
| 96 |
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
-
|
| 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 |
-
## π¬
|
| 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 |
-
|
| 113 |
|
| 114 |
---
|
| 115 |
|
| 116 |
-
## π
|
| 117 |
|
| 118 |
-
- π€ **Hugging Face**: [
|
| 119 |
-
- π» **GitHub**: [
|
| 120 |
-
- π **
|
|
|
|
| 1 |
# π Quantum Noise Robustness Benchmark Guide
|
| 2 |
|
| 3 |
Welcome to the **Quantum Noise Robustness Benchmark**.
|
| 4 |
+
This tool demonstrates how Machine Learning can **predict the impact of noise** on quantum circuits using only structural and topological features β without running any expensive noisy simulations.
|
| 5 |
|
| 6 |
---
|
| 7 |
|
| 8 |
## β οΈ Important: Demo Dataset Notice
|
| 9 |
|
| 10 |
+
This Hub uses **v1.0.0-demo shards** of the QSBench dataset family.
|
| 11 |
|
| 12 |
+
- **Limited Scale**: Only a small subset of circuits is loaded for fast demonstration.
|
| 13 |
+
- **Complexity**: Predicting quantum observables from pure structure is a **non-trivial mapping**.
|
| 14 |
+
- **Goal**: Showcase the correlation between circuit topology and noise sensitivity β not to achieve production-level $R^2$ on a limited sample.
|
| 15 |
|
| 16 |
---
|
| 17 |
|
| 18 |
## π― 1. What is Being Predicted?
|
| 19 |
|
| 20 |
+
The model performs **multi-target regression** to estimate how much noise distorts the final signal.
|
| 21 |
|
| 22 |
+
### Targets (The Error Vector)
|
| 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 |
+
**Formula:** `error = noisy_expval - ideal_expval`
|
|
|
|
| 28 |
|
| 29 |
+
Unlike predicting the state itself, predicting the **error shift** allows us to understand the "noise fingerprint" left by the circuit's architecture.
|
| 30 |
|
| 31 |
---
|
| 32 |
|
| 33 |
## π§© 2. How the Model βSeesβ a Circuit
|
| 34 |
|
| 35 |
+
The model never simulates quantum states. It uses **structural proxies** to guess the noise impact:
|
|
|
|
| 36 |
|
| 37 |
### πΉ Topology Features
|
| 38 |
+
- `adj_density` β how densely qubits are connected (proxy for crosstalk risk).
|
| 39 |
+
- `adj_degree_mean` β average connectivity (proxy for entanglement speed).
|
| 40 |
|
| 41 |
+
### πΉ Complexity & Entanglement
|
| 42 |
+
- `depth` / `total_gates` β length of the decoherence window.
|
| 43 |
+
- `cx_count` / `two_qubit_gates` β the most noise-sensitive components in NISQ hardware.
|
| 44 |
+
- `gate_entropy` β measures circuit regularity vs. randomness.
|
| 45 |
|
| 46 |
+
### πΉ QASM Signals
|
| 47 |
+
- `qasm_length` & `gate_keyword_count` β capture the overall "instruction weight".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
---
|
| 50 |
|
| 51 |
+
## π€ 3. Technical Overview: The ML Pipeline
|
|
|
|
|
|
|
| 52 |
|
| 53 |
+
To handle the non-linear nature of quantum data, we use:
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
+
- **HistGradientBoostingRegressor**: A high-performance boosting algorithm designed for large tabular data.
|
| 56 |
+
- **MultiOutput Wrapper**: Ensures all three axes ($X, Y, Z$) are learned in a unified context.
|
| 57 |
+
- **Robust Preprocessing**: Median imputation for missing values and Standard Scaling for feature parity.
|
|
|
|
| 58 |
|
| 59 |
---
|
| 60 |
|
| 61 |
+
## π 4. Interpreting the Analytics
|
| 62 |
|
| 63 |
+
### A. Physics Emulation Plot (Crucial!)
|
| 64 |
+
- **Gray Points**: Actual simulated noisy values.
|
| 65 |
+
- **Red Points**: ML-predicted noisy values ($Ideal + Predicted Error$).
|
| 66 |
+
- **Insight**: If red points follow the trend of gray points, the model has successfully "learned" the physics of the noise channel without a simulator.
|
| 67 |
|
| 68 |
+
### B. Why is my $R^2$ near Zero?
|
| 69 |
+
Even with 200,000+ samples, structural metrics alone (like `depth` or `entropy`) provide a "complexity baseline" but do not capture specific gate rotation angles.
|
|
|
|
| 70 |
|
| 71 |
+
1. **The Result:** Standard regressors (Random Forest/XGBoost) will hit a performance ceiling near R2β0, as they see the circuit's skeleton but not its parameters.
|
| 72 |
+
|
| 73 |
+
2. **The Opportunity:** This makes QSBench the perfect playground for **Graph Neural Networks (GNN)** and **Geometric Deep Learning**, where models can integrate gate parameters as node features to break this "structural ceiling."
|
| 74 |
|
| 75 |
---
|
| 76 |
|
| 77 |
+
## π§ͺ 5. Experimentation Tips
|
| 78 |
|
| 79 |
+
- **Isolate Topology**: Select only `adj_*` features to see how much qubit mapping alone affects noise.
|
| 80 |
+
- **The "CX" Test**: Remove `cx_count` and see how much the MAE increases. This quantifies the "cost" of entanglement in your noise model.
|
| 81 |
+
- **Iteration Scaling**: Increase **Max Iterations** (400 -> 800) to see if the model can find deeper patterns in the demo data.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
---
|
| 84 |
|
| 85 |
+
## π¬ 6. Key Insight
|
|
|
|
|
|
|
|
|
|
| 86 |
|
| 87 |
+
> **Noise is not random.** It is a deterministic function of circuit complexity and hardware topology. Even without a quantum simulator, ML can "guess" the fidelity of a result just by looking at the circuit diagram.
|
| 88 |
|
| 89 |
---
|
| 90 |
|
| 91 |
+
## π 7. Project Resources
|
| 92 |
|
| 93 |
+
- π€ **Hugging Face**: [Datasets & Shards](https://huggingface.co/QSBench)
|
| 94 |
+
- π» **GitHub**: [Source Code & Tools](https://github.com/QSBench)
|
| 95 |
+
- π **Official Store**: [Get Full-Scale Datasets](https://qsbench.bgng.io)
|