Skip to content

Optimization: Profile and reduce per-shot overhead in sinter’s Fusion Blossom integration #1106

Description

@MCarlomagno

Sinter’s FusionBlossomCompiledDecoder.decode_shots_bit_packed accepts a batch of shots but processes them individually in Python. For each shot, it:

  • Unpacks detector bits and constructs a SyndromePattern.
  • Calls solve() and subgraph().
  • Computes the observable prediction and packs it through np.binary_repr, a list and a NumPy array.
  • Clears the solver for reuse.

The per-shot conversions and allocations look worth profiling. Their contribution to total decoding time has not yet been isolated.

Our sinter experiment records timing differences between PyMatching and Fusion Blossom: a controlled Fusion Blossom comparison measured default-to-fast latency ratios of 2.33–3.18× after changing the pointer/locking feature bundle, with identical predictions on all 170,000 saved shots. This measures a setting effect, the reproduction package documents the conditions and limitations.

I’d like to start with a focused profile of the existing integration, followed by a small optimization such as replacing the string-based prediction packing. Validation would use the same Fusion Blossom version and build, saved shots, and timing boundary before and after the change, checking every prediction for equality.

Would a profiling result and patch along those lines be useful?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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