CyberIntel ⬡ News
★ Saved ◆ Cyber Reads
← Back ◌ Quantum Computing Jul 20, 2025

How to fix AssertionError in Stim Sinter.collect?

Quantum Computing SE Archived Apr 17, 2026 ✓ Full text saved

I am running Sinter to find the logical error rate by running my .stim files. But I keep getting this error. I looked into another question posted in this platform regarding AssertionError , and the solution advised was to use a new version of stim stim~=1.16.dev . I tried it, and I also tried changing the versions of stim and sinter . But I still keep getting the same error message. What might me the problem, and how can I resolve this? AssertionError The above exception was the direct cause of

Full text archived locally
✦ AI Summary · Claude Sonnet


    How to fix AssertionError in Stim Sinter.collect? Ask Question Asked 9 months ago Modified today Viewed 235 times 0 I am running Sinter to find the logical error rate by running my .stim files. But I keep getting this error. I looked into another question posted in this platform regarding AssertionError, and the solution advised was to use a new version of stim stim~=1.16.dev. I tried it, and I also tried changing the versions of stim and sinter. But I still keep getting the same error message. What might me the problem, and how can I resolve this? AssertionError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/pritesht/.conda/envs/qec/bin/sinter", line 8, in <module> sys.exit(main()) ^^^^^^ File "/home/pritesht/.conda/envs/qec/lib/python3.11/site-packages/sinter/_command/_main.py", line 15, in main return main_collect(command_line_args=command_line_args[1:]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pritesht/.conda/envs/qec/lib/python3.11/site-packages/sinter/_command/_main_collect.py", line 329, in main_collect collect( File "/home/pritesht/.conda/envs/qec/lib/python3.11/site-packages/sinter/_collection/_collection.py", line 404, in collect for progress in iter_collect( File "/home/pritesht/.conda/envs/qec/lib/python3.11/site-packages/sinter/_collection/_collection.py", line 226, in iter_collect manager.process_message() File "/home/pritesht/.conda/envs/qec/lib/python3.11/site-packages/sinter/_collection/_collection_manager.py", line 385, in process_message raise RuntimeError(f'Worker failed: traceback={traceback}') from ex RuntimeError: Worker failed: traceback=Traceback (most recent call last): File "/home/pritesht/.conda/envs/qec/lib/python3.11/site-packages/sinter/_collection/_collection_worker_state.py", line 246, in run_message_loop did_some_work = self.do_some_work() ^^^^^^^^^^^^^^^^^^^ File "/home/pritesht/.conda/envs/qec/lib/python3.11/site-packages/sinter/_collection/_collection_worker_state.py", line 217, in do_some_work some_work_done = self.compiled_sampler.sample(self.current_task_shots_left) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pritesht/.conda/envs/qec/lib/python3.11/site-packages/sinter/_collection/_sampler_ramp_throttled.py", line 51, in sample result = self.sub_sampler.sample(actual_shots) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/pritesht/.conda/envs/qec/lib/python3.11/site-packages/sinter/_decoding/_stim_then_decode_sampler.py", line 216, in sample return AnonTaskStats( ^^^^^^^^^^^^^^ File "<string>", line 8, in __init__ File "/home/pritesht/.conda/envs/qec/lib/python3.11/site-packages/sinter/_data/_anon_task_stats.py", line 37, in __post_init__ assert isinstance(self.errors, int) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AssertionError ``` error-correctionstimsinter Share Improve this question Follow asked Jul 20, 2025 at 19:44 Pritesh Thakur 212 2 bronze badges Add a comment 1 Answer Sorted by: Highest score (default) Date modified (newest first) Date created (oldest first) 0 This was fixed in https://github.com/quantumlib/Stim/pull/965. This means that this error will be fixed at the next stable release of the stim package. If you cannot/do not want to wait for the next stable release, you can install one of the last pre-release that should include that fix with pip install stim==1.16.dev1751171094. You can also solve this error by downgrading numpy to version 2.2 (or at least <2.3) with pip install -U 'numpy<2.3'. Share Improve this answer Follow answered Jul 20, 2025 at 20:16 Adrien Suau 5,49025 25 silver badges 60 60 bronze badges I did that. This is what i have right now stim 1.16.dev1751171094 sinter 1.15.0 numpy 2.3.1 And still, I am getting the same error: assert isinstance(self.errors, int) ``` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` AssertionError Am I doing something wrong? Can you please help me fix this? –  Pritesh Thakur Commented Jul 20, 2025 at 22:04 Are you sure you are using the right python exacutable? Try downgrading numpy just to see if that works. –  Adrien Suau Commented Jul 21, 2025 at 5:07 1 Yes, later I tried using stim 1.15, and downgraded numpy to 2.2, and it worked. Thanks a lot. –  Pritesh Thakur Commented Jul 21, 2025 at 16:47 Add a comment Your Answer Sign up or log in Sign up using Google Sign up using Email and Password Post as a guest Name Email Required, but never shown Post Your Answer By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy. Start asking to get answers Find the answer to your question by asking. Ask question Explore related questions error-correctionstimsinter See similar questions with these tags. The Overflow Blog Human input needed: take our survey on AI agents Who needs VCs when you have friends like these? Related 1 How to train neural network decoder with stim? 1 stim: how to control sign of syndrome measurements 2 How to enable ignore_decomposition_failures in sinter.collect()? 1 Computing pseudo-threshold with sinter and stim 1 What is the right way to do Stim/sinter simulations using an HPC cluster? 4 How is stim validated 1 Fixed issue: Why does this valid-looking Stim circuit with multiple HERALDED_ERASE gates fail? 2 Why is there this Assertion Error with sinter.collect in the Stim tutorial? Where does it come from? 4 How is detector error model generated in Stim 1 How do I determine the number of cores to request while submitting Sinter jobs? Hot Network Questions Use of the phrase "cold on their heels" Can a constant current LED driver be used with 12V or 24V incandescent bulbs? DC/DC minimum load TPS5430 Within the theory of "three categories worlds" (things with time/space properties, time but no space, neither space nor time) could we conceive a 4th? What do the eigenvalues of a QFT matrix show If works do not contribute to salvation, how should Christians understand Jesus’ statement about “those who have done good”? How do I remember that Kiddush Levana is on daf mem bais? Dealing with incompatible output geometry after geospatial operations using WKBType checks in PyQGIS Are there any useful criteria for what constitutes using AI to make music? For a non-physicalist, is there a simple and operational definition of "material" and "physical"? Suspension in kiddie Balance Bike A question about outliers and the boxplot() function in R Complicated sum Derived projection formula holds for qcqs scheme Scientific book presentations and invited lectures: do you ask for compensation? Translate roman-numerals to integer Is it considered abuse when a parent demands that a young child give him a hug? Subtlety in Schrödinger vs Heisenberg picture What was the cause of 10 British warships disappearing, that Pierre Denys de Montfort attributed to colossal octopuses? Who was S. M. Kerawala? Reparametrized form of the Hamilton-Jacobi equation in classical mechanics Is there a way to just accept a portion of a bundle if the bundle includes DLC for a game I don't own? Cryptic Family Reunion at the Races A Nude in the Clouds? Question feed By continuing to use this website, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy. By exiting this window, default cookies will be accepted. To reject cookies, select an option from below. Customize settings Cookie Consent Preference Center When you visit any of our websites, it may store or retrieve information on your browser, mostly in the form of cookies. This information might be about you, your preferences, or your device and is mostly used to make the site work as you expect it to. The information does not usually directly identify you, but it can give you a more personalized experience. Because we respect your right to privacy, you can choose not to allow some types of cookies. Click on the different category headings to find out more and manage your preferences. Please note, blocking some types of cookies may impact your experience of the site and the services we are able to offer. Cookie Policy Accept all cookies Manage Consent Preferences Strictly Necessary Cookies Always Active These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information. Targeting Cookies Targeting Cookies These cookies are used to make advertising messages more relevant to you and may be set through our site by us or by our advertising partners. They may be used to build a profile of your interests and show you relevant advertising on our site or on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. Performance Cookies Performance Cookies These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance. Functional Cookies Functional Cookies These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly. Cookie List Clear checkbox label label Apply Cancel Consent Leg.Interest checkbox label label checkbox label label checkbox label label Necessary cookies only Confirm My Choices
    💬 Team Notes
    Article Info
    Source
    Quantum Computing SE
    Category
    ◌ Quantum Computing
    Published
    Jul 20, 2025
    Archived
    Apr 17, 2026
    Full Text
    ✓ Saved locally
    Open Original ↗