Condition errors on noiseless qubits#446
Merged
Merged
Conversation
TargetedNoiseRule class is appended to the code, and implmented is_targeted_noisy_op
The implementation follows `NoiseRule.noisy_operation` for now
…getedNoiseRule` An `immunize_qubits` function is appended and called in `_inplace_append_noisy_moment`. Detailed implementation is remain incomplete.
tests are added to noise_model_test.py for TargetedNoiseRule, the behavior of immunize_qubits is still remain incomplete.
…AULI_CHANNEL_2 tests are modified to cover new written code, need further refactor to make the code cleaner
1 task
perlinm
marked this pull request as draft
April 13, 2026 23:43
# Conflicts: # src/qldpc/circuits/noise_model.py
1 task
This reverts commit 70d051c.
perlinm
marked this pull request as ready for review
July 7, 2026 14:12
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.
(AI-assisted summary:)
Adds per-qubit immunity (
immune_qubits+immunize_gates) alongside broadened multi-qubit noise support inNoiseModel.New capabilities
noisy_circuit(..., immune_qubits=..., immunize_gates=True/False)— declare qubits immune to noise;immunize_gates=True(default) drops any noise on gates that touch an immune qubit;immunize_gates=Falsesupports proper PauliChannel conditioning viaPauliChannel.conditioned_on(...)(a new public method).PauliChannel— sparse multi-qubit Pauli channel usable directly inNoiseRule(after=...)or auto-wrapped from aMapping[str, float | Iterable[float]].API changes
NoiseRule.afteris nowPauliChannel | Mapping | stim.Circuit | None. Rules cannot combineafter-noise withreadout_error/reset_error.PAULI_CHANNEL_1/2emission when arity ≤ 2;CORRELATED_ERRORchain for higher arities.OP_TYPES/BROADCAST_1Q_NOISE/BROADCAST_2Q_NOISEnow derived fromstim.gate_data().Correctness fixes (from review):
MXX/MYY/MZZsplitter now correctly per-pair (was per-target)insert_ticks=FalseunconditionalNoiseModel(was scattered acrossNoiseRule/_immunize_noise).