Skip to content

Remove extra over-mixing checks#1014

Closed
abbrazi wants to merge 1 commit intoquantumlib:mainfrom
abbrazi:remove-extra-over-mixing-checks
Closed

Remove extra over-mixing checks#1014
abbrazi wants to merge 1 commit intoquantumlib:mainfrom
abbrazi:remove-extra-over-mixing-checks

Conversation

@abbrazi
Copy link
Copy Markdown
Contributor

@abbrazi abbrazi commented Dec 2, 2025

When processing DEP1 instructions in the ErrorAnalyzer, p > 0.75 is checked in:

a) undo_DEPOLARIZE1 and
b) depolarize1_probability_to_independent_per_channel_probability

Likewise, p > 0.9375 is checked in:

c) undo_DEPOLARIZE2 and
d) depolarize2_probability_to_independent_per_channel_probability

I removed checks (a) and (c). I also added tests for checks (b) and (d).

Let me know if this was intentional.

Signed-off-by: Abbas Bracken Ziad abbas.ziad25@imperial.ac.uk

When processing DEP1 instructions in the ErrorAnalyzer, p > 0.75 is checked in:

a) undo_DEPOLARIZE1 and
b) depolarize1_probability_to_independent_per_channel_probability

Likewise, p > 0.9375 is checked in:

c) undo_DEPOLARIZE2 and
d) depolarize2_probability_to_independent_per_channel_probability

I removed checks (a) and (c). I also added tests for checks (b) and (d).

Let me know if this was intentional.

Signed-off-by: Abbas Bracken Ziad <abbas.ziad25@imperial.ac.uk>
@Strilanc
Copy link
Copy Markdown
Collaborator

Good eye and the change looks correct but unfortunately the redundant check was intentional, in order to give a better error message.

Python users will more easily understand what to do in response to Can't analyze over-mixing DEPOLARIZE1 errors (probability > 3/4). than when told depolarize1_probability_to_independent_per_channel_probability with p>0.75.

@Strilanc Strilanc closed this Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants