Skip to content

Normalize two-qubit noise rates to signed principal angles - #795

Merged
ciaranra merged 3 commits into
devfrom
codex/signed-two-qubit-noise-angles
Sep 19, 2026
Merged

ciaranra merged 3 commits into
devfrom
codex/signed-two-qubit-noise-angles

Conversation

@qciaran

@qciaran qciaran commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Direct calls to GeneralNoiseModel::p2_angle_error_rate currently evaluate unsigned angles using the positive coefficients and their unreduced magnitude. For example, 7*pi/4 gets a different rate from the equivalent -pi/4 rotation.

Reduce the noise-model input into (-pi, pi] before selecting the asymmetric coefficients and applying magnitude/power scaling. Full turns use the zero-angle offset average, and both half-turn endpoints use the positive branch. Gate storage remains unchanged. The existing gate-processing path already supplies signed angles; this makes the public rate API follow the same convention.

Add regression coverage for unsigned inputs, multiple turns, asymmetric coefficients, quadratic scaling, tiny signed angles, and values adjacent to the half-turn boundary. Also clarify the matching neo range and test its wrapped-angle behavior.

Validation:

  • cargo test --locked --offline -p pecos-engines --lib: 179 passed.
  • cargo test --locked --offline -p pecos-neo --lib noise::two_qubit::tests: 20 passed.
  • cargo fmt --all -- --check.
  • cargo clippy --locked --offline -p pecos-engines -p pecos-neo --all-targets -- -D warnings.

@qciaran
qciaran requested a review from ciaranra as a code owner September 18, 2026 17:42
@ciaranra
ciaranra merged commit 2622315 into dev Sep 19, 2026
89 checks passed
@ciaranra
ciaranra deleted the codex/signed-two-qubit-noise-angles branch September 19, 2026 19:54
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