Skip to content

feat: extend inject_noise with Y_ERROR, Z_ERROR, DEPOLARIZE2#11

Merged
DeDuckProject merged 1 commit intomasterfrom
feat/extended-noise-models
Apr 1, 2026
Merged

feat: extend inject_noise with Y_ERROR, Z_ERROR, DEPOLARIZE2#11
DeDuckProject merged 1 commit intomasterfrom
feat/extended-noise-models

Conversation

@DeDuckProject
Copy link
Copy Markdown
Owner

Replaces broken with_noise() fallback with proper circuit rewriting using circuit.flattened() + stim.gate_data(). Single-qubit noise is now inserted after all unitary gates (both 1q and 2q), fixing a bug where data qubits in surface code circuits received no noise at all (they only participate in 2-qubit CX gates, not single-qubit gates).

Also removes the opinionated (0, 0.5] probability restriction — stim validates ranges itself.

Replaces broken with_noise() fallback with proper circuit rewriting
using circuit.flattened() + stim.gate_data(). Single-qubit noise is
now inserted after all unitary gates (both 1q and 2q), fixing a bug
where data qubits in surface code circuits received no noise at all
(they only participate in 2-qubit CX gates, not single-qubit gates).

Also removes the opinionated (0, 0.5] probability restriction — stim
validates ranges itself.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@DeDuckProject DeDuckProject merged commit e98d90d into master Apr 1, 2026
6 checks passed
@DeDuckProject DeDuckProject deleted the feat/extended-noise-models branch April 1, 2026 09:03
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.

1 participant