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.
| Format | Bytes | Share of raw |
|---|---|---|
| Raw b8 | 1,552,384 | 100.00% |
| Direct Zstandard | 325,565 | 20.97% |
| RSMP v1 | 186,028 | 11.98% |

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.