Add strip_undecomposable_errors=False to decomposition#218
Merged
noajshu merged 4 commits intoquantumlib:mainfrom Mar 20, 2026
Merged
Add strip_undecomposable_errors=False to decomposition#218noajshu merged 4 commits intoquantumlib:mainfrom
strip_undecomposable_errors=False to decomposition#218noajshu merged 4 commits intoquantumlib:mainfrom
Conversation
LalehB
reviewed
Mar 20, 2026
Collaborator
LalehB
left a comment
There was a problem hiding this comment.
Just wanted to say, you might want to add it to the readme as well to let other users know this is available
Contributor
Author
|
Good catch! I will update that now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The decomposer code written by Oscar is very nice because it is quite careful not to make any mistakes. For instance in a situation like this:
if we label D0 as X and D1 as Z type, it will raise a ValueError due to D1 not appearing on its own in the error model. This prevents at least one possible issue, which is putting the logical flip (if present) onto the wrong component.
Anyways, sometimes we want to produce an error model anyways, and we don't care about these errors. In these situations we may as well strip such undecomposable errors entirely.
Alternative considered: we could also try harder to decompose them and workaround the lack of a single error with that component's worth of symptoms in the DEM. I tried this first but I feel it is somewhat higher risk since it could be silently failing and putting badly-decomposed errors into the DEM. So I think the best practice should be to strip them out entirely.