-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Summary
The tropical tensor network decoder in scripts/analyze_tropical_threshold.py performs exact MAP (Maximum A Posteriori) inference to find the most likely error pattern. However, for quantum error correction, this approach yields higher logical error rates compared to BP+OSD.
Benchmark Results (d=3, 500 samples)
| Error Rate | BP+OSD LER | Tropical MAP LER |
|---|---|---|
| 0.001 | 0.00% | 1.40% |
| 0.003 | 0.60% | 2.20% |
| 0.005 | 1.00% | 3.40% |
| 0.007 | 5.40% | 11.00% |
| 0.010 | 6.00% | 9.20% |
| 0.015 | 12.00% | 17.80% |
Root Cause
The fundamental issue is that MAP decoding finds the most likely error pattern, but QEC requires the most likely observable value.
When multiple error patterns satisfy the syndrome:
- Some patterns predict observable = 0
- Others predict observable = 1
- The MAP pattern (highest individual probability) may predict the wrong observable
- Even when the total probability mass favors the correct observable
Example
For a syndrome with two valid solutions:
- Solution A: P=0.4, predicts obs=0
- Solution B: P=0.3, predicts obs=1
- Solution C: P=0.3, predicts obs=1
MAP picks Solution A (obs=0), but the correct answer is obs=1 (total probability 0.6 vs 0.4).
Why BP+OSD Works Better
BP computes marginal probabilities that account for ALL possible error patterns weighted by their probabilities. The soft XOR computation in observable prediction naturally handles this probabilistic weighting. OSD then finds a valid solution guided by these marginals.
Potential Improvements
-
Marginal MAP for Observable: Modify the factor graph to marginalize over error variables and compute P(obs=0|syndrome) vs P(obs=1|syndrome) directly. This requires sum-product (not max-product) for the observable variable.
-
Observable-Constrained MAP Comparison: Run MAP twice with hard constraints (obs=0 and obs=1), compare partition functions. Initial attempts had issues with assignment recovery in the tropical TN code.
-
Multiple Solution Enumeration: Find top-k most likely solutions and vote on the observable. Computationally expensive.
-
Hybrid Approach: Use tropical TN for the MAP solution, but use BP marginals for observable prediction.
Related Files
scripts/analyze_tropical_threshold.py- Current implementationtropical_in_new/src/mpe.py- Tropical MPE inferencescripts/analyze_threshold.py- BP+OSD threshold analysis for comparison
References
- Branch:
fix/tropical - Related to tropical tensor network integration from PR Add standalone tropical tensor network package #51