What it does

Measurements in, decoder data back out

RSMP stores a reversible, circuit-derived representation. Unpacking with the original circuit recovers the measurement stream and derives detector and observable outputs.

Public contests

Need a dataset contestants cannot score from directly?

RSMP is intentionally lossless and private. For public decoder benchmarks, use rstim export_decoder_dataset instead: publish only contestant inputs, and keep the answer bundle private.

Two public dataset modes

Detector mode publishes detector-event rows in shots.b8 and keeps logical answers in private answers.b8.

Blinded measurement mode publishes raw measurement rows, privately randomizes the logical state with mask bits, and scores against private answers.b8.

Run it

Pack and verify

rstim pack_samples --circuit circuit.stim --in samples.b8 --in_format b8 --out samples.rsmp
rstim unpack_samples --circuit circuit.stim --in samples.rsmp --verify_only

Measured result

88.02% smaller than raw b8

Pinned surface-code case: d=11, 100 rounds, 1,024 shots.

FormatBytesShare of raw
Raw b81,552,384100.00%
Direct Zstandard325,56520.97%
RSMP v1186,02811.98%
RSMP v1 measured compression summary
How the reversible transform works

Measurements are XORed with a noiseless reference and separated into detector syndromes plus free coordinates. The decoder rebuilds the same transform from the circuit.

Scope and limits

RSMP v1 requires the original circuit, does not support sweep-bit circuits, and provides sequential rather than random shot access. Large-scale sizes are projections, not measurements.

Evidence and format references