You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: llm_experience.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,3 +51,24 @@ This document records specific technical protocols, lessons learned, and advance
51
51
52
52
2.**Fair Comparison**:
53
53
* Ensure "apples-to-apples" settings (e.g., same precision `complex128`) to support valid performance claims.
54
+
55
+
## Noise Modeling and Mitigation
56
+
57
+
1.**Readout Error Handling**:
58
+
* The `circuit_with_noise(c, noise_conf)` function internally applies general quantum noise (Kraus channels specified in `nc`) to gates, but it does **not** automatically apply readout error configuration (`readout_error`) encoded in `NoiseConf`.
59
+
***Protocol**: You must **explicitly** pass the readout error when calling `circuit.sample()`. Example:
* Failing to do so will result in noiseless measurements even if`readout_error`is present in`NoiseConf`.
64
+
65
+
2. **Readout Error Format**:
66
+
* When adding readout noise via `NoiseConf.add_noise("readout", errors)`, the expected formatfor each qubit's error is `[p(0|0), p(1|1)]` (a list of two probabilities), **not** the full $2 \times 2$ confusion matrix.
67
+
***Pitfall**: Passing a full matrix like `[[0.9, 0.1], [0.1, 0.9]]` can cause unexpected `TypeError` during internal matrix construction (e.g., `1-list` error).
68
+
***Protocol**: Specify readout error as`[0.9, 0.9]` which implies $p(0|0)=0.9$and$p(1|1)=0.9$.
69
+
70
+
3. **Circuit Expectation with Noise**:
71
+
* The `Circuit.expectation` method supports `noise_conf`as a keyword argument (e.g., `c.expectation(..., noise_conf=conf, nmc=1000)`). This is often cleaner than calling `tc.noisemodel.expectation_noisfy(c, ...)` directly.
72
+
73
+
4. **Multi-Qubit Thermal Noise**:
74
+
* The `thermalrelaxationchannel` returns single-qubit Kraus operators. To apply thermal noise to multi-qubit gates (like CNOT), you generally cannot simply pass the single-qubit channel to `add_noise("cnot", ...)` because of dimension mismatch.
0 commit comments