-
Notifications
You must be signed in to change notification settings - Fork 171
Description
I am encountering an issue when using Stim 1.15.0 (latest from PyPI) together with Sinter 1.15.0 (also from PyPI). Even a minimal test circuit causes Sinter to crash with an AssertionError.
Here’s the environment I’m using:
- Linux, Red Hat 9, supercomputer cluster
- Python 3.11.13 (conda-forge)
- stim 1.15.0
- sinter 1.15.0
- pymatching 2.2.2
Minimal test using Stim (Python):
import stim
circuit = stim.Circuit('H 0\nCNOT 0 1\nM 0 1\n')
try:
samples = circuit.sample(10)
print('sample() works, shape:', samples.shape)
except Exception as e:
print('sample() failed:', e)Result:
sample() failed: 'stim._stim_sse2.Circuit' object has no attribute 'sample'
Minimal test using Sinter (CLI):
sinter collect --circuits test_circuit.stim --decoders pymatching --max_batch_size 1 --processes 1 --max_shots 10
Result:
AssertionError: assert isinstance(self.errors, int)
Additional context:
I have tried:
Downgrading to stim 1.15.0 + sinter 1.15.0 → breaks as above.
Upgrading to stim 1.16.dev (from GitHub) → gives .sample() in Stim, but then mismatches Sinter (no public dev version available).
As far as I can tell, the latest public releases of Stim and Sinter are not currently compatible. It seems sinter 1.15.0 still depends on stim’s .sample() method, which only exists in the dev branch, and there’s no way to get a matching sinter dev build.
Questions:
- What versions of Stim and Sinter are expected to work together?
- Is there any way to install a matching Sinter dev version to go with stim 1.16.dev?
- For Stim standalone, should we switch to .compile_sampler().sample() when .sample() is missing?
Thank you very much for your help!