Skip to content

Tropical TN MAP decoder has higher LER than BP+OSD due to MAP vs marginal inference #68

@ChanceSiyuan

Description

@ChanceSiyuan

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

  1. 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.

  2. 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.

  3. Multiple Solution Enumeration: Find top-k most likely solutions and vote on the observable. Computationally expensive.

  4. Hybrid Approach: Use tropical TN for the MAP solution, but use BP marginals for observable prediction.

Related Files

  • scripts/analyze_tropical_threshold.py - Current implementation
  • tropical_in_new/src/mpe.py - Tropical MPE inference
  • scripts/analyze_threshold.py - BP+OSD threshold analysis for comparison

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions