Skip to content

SPDX-License-Identifier: AGPL-3.0-or-later

Commercial license available

© Concepts 1996–2026 Miroslav Šotek. All rights reserved.

© Code 2020–2026 Miroslav Šotek. All rights reserved.

ORCID: 0009-0009-3560-0851

Contact: www.anulum.li | protoscience@anulum.li

scpn-quantum-control — GUESS Symmetry Decay ZNE Documentation

GUESS: Guiding Extrapolations from Symmetry Decays

Physics-informed zero-noise extrapolation using Hamiltonian symmetry observables to guide the mitigation of target observables on NISQ hardware.

Module: scpn_quantum_control.mitigation.symmetry_decay Rust acceleration: scpn_quantum_engine.fit_symmetry_decay, scpn_quantum_engine.guess_extrapolate_batch Reference: Oliva del Moral et al., arXiv:2603.13060 (2026)


Table of Contents

  1. Motivation and Context
  2. Mathematical Foundation
  3. SCPN-Specific Application
  4. Architecture
  5. API Reference
  6. Rust Acceleration
  7. Tutorials
  8. Integration with Existing Mitigation Stack
  9. Benchmarks
  10. Test Coverage
  11. Limitations and Caveats
  12. Comparison with Alternative Methods
  13. References

1. Motivation and Context

The Problem

Standard Richardson zero-noise extrapolation (ZNE) uses polynomial fits to extrapolate expectation values to the zero-noise limit. At large circuit depths (100+ qubits, thousands of CZ gates), the polynomial model fails to capture the true noise profile, leading to systematic over- or under-correction.

This failure mode is well-documented: - Richardson ZNE diverges at depth > 2000 CZ gates on IBM hardware (Oliva del Moral et al., 2026, Fig. 7) - Polynomial extrapolation assumes noise is additive and scale-invariant, which breaks down for correlated noise channels - No existing method leverages physical conservation laws specific to the Hamiltonian being simulated

The GUESS Insight

If the Hamiltonian \(H\) conserves a symmetry observable \(S\) (i.e., \([H, S] = 0\)), then \(\langle S \rangle\) is analytically known for any initial state. The deviation of \(\langle S \rangle\) from its ideal value under hardware noise directly reveals the noise-induced decay profile.

GUESS transfers this learned decay to target observables whose ideal values are unknown. Instead of fitting a generic polynomial, GUESS uses physics to constrain the extrapolation.

Why This Matters for SCPN

The SCPN Kuramoto-XY Hamiltonian

\[H_{XY} = \sum_{n,m} K_{nm} (\sigma_n^x \sigma_m^x + \sigma_n^y \sigma_m^y)\]

naturally conserves total magnetisation \(S = \sum_i Z_i\), since \([H_{XY}, \sum_i Z_i] = 0\). This gives us a free symmetry observable for GUESS — measuring \(S\) requires only Z-basis measurements, which are already part of every experiment run.


2. Mathematical Foundation

2.1 Symmetry Observable Decay Model

Under noise at scale factor \(g\) (where \(g = 1\) is base noise), the symmetry observable decays exponentially:

\[\langle S \rangle_g = \langle S \rangle_{\text{ideal}} \cdot e^{-\alpha (g - 1)}\]

where \(\alpha \geq 0\) is the noise scaling exponent. This model follows from the Lindblad master equation under depolarising noise: each gate contributes an independent decay factor, and circuit folding (scale factor \(g\)) multiplies the total decay rate by \(g\).

2.2 Learning \(\alpha\) via Log-Linear Regression

Taking the logarithm:

\[\ln \left( \frac{\langle S \rangle_g}{\langle S \rangle_{\text{ideal}}} \right) = -\alpha (g - 1)\]

This is a linear model \(y = -\alpha \cdot x\) where: - \(y_i = \ln(\langle S \rangle_{g_i} / \langle S \rangle_{\text{ideal}})\) - \(x_i = g_i - 1\)

We fit \(\alpha\) via ordinary least-squares regression on \((x_i, y_i)\) pairs from \(N \geq 2\) noise scale measurements. The intercept is included in the fit to absorb any bias from non-exponential effects.

Fit residual:

\[r = \sqrt{ \frac{1}{N} \sum_i (y_i - \hat{y}_i)^2 }\]

A large residual (\(r > 0.1\)) indicates the exponential decay assumption is violated, suggesting non-Markovian noise or systematic calibration drift.

2.3 GUESS Extrapolation Formula

Given the learned \(\alpha\), the mitigated value of any target observable \(O\) is (Oliva del Moral et al., 2026, Eq. 5):

\[\langle O \rangle_{\text{mitigated}} \approx \langle O \rangle_{\text{noisy}} \cdot \left( \frac{|\langle S \rangle_{\text{ideal}}|}{|\langle S \rangle_{\text{noisy}}|} \right)^\alpha\]

Correction factor:

\[C = \left( \frac{|\langle S \rangle_{\text{ideal}}|}{|\langle S \rangle_{\text{noisy}}|} \right)^\alpha\]

Properties: - When noise is absent (\(\langle S \rangle_{\text{noisy}} = \langle S \rangle_{\text{ideal}}\)), \(C = 1\) — no correction applied - When \(\alpha = 0\) (no learned decay), \(C = 1\) regardless of symmetry values - When symmetry fully decays (\(\langle S \rangle_{\text{noisy}} \to 0\)), correction diverges — we fall back to the raw value - \(C \geq 1\) for physical noise (\(\alpha \geq 0\), \(|\langle S \rangle_{\text{noisy}}| \leq |\langle S \rangle_{\text{ideal}}|\))

2.4 Absolute Value Convention

The ratio uses absolute values \(|\langle S \rangle_{\text{ideal}} / \langle S \rangle_{\text{noisy}}|\) to handle cases where noise flips the sign of the symmetry observable. This is mathematically equivalent to the original formulation when both values have the same sign (the common case), and prevents negative correction factors.


3. SCPN-Specific Application

3.1 XY Hamiltonian Symmetry

For the Kuramoto-XY Hamiltonian on \(n\) qubits:

\[H_{XY} = \sum_{n < m} K_{nm} (\sigma_n^x \sigma_m^x + \sigma_n^y \sigma_m^y)\]

The total magnetisation operator \(S = \sum_{i=1}^{n} Z_i\) satisfies:

\[[H_{XY}, S] = 0\]

This commutation relation holds because \(H_{XY}\) only contains \(XX + YY\) terms, which preserve the total number of excitations (spin flips).

3.2 Ideal Magnetisation Values

The ideal value of \(\langle S \rangle\) depends solely on the initial state:

Initial State \(\langle S \rangle_{\text{ideal}}\) Derivation
Ground \(\|00\ldots 0\rangle\) \(+n\) Each qubit contributes \(\langle Z_i \rangle = +1\)
Néel \(\|0101\ldots\rangle\) \(n \bmod 2\) Alternating \(+1\) and \(-1\); cancels for even \(n\)

For the ground state (most common in SCPN experiments), \(\langle S \rangle_{\text{ideal}} = n\), giving a strong signal for decay detection.

Néel state caveat: For even \(n\), \(\langle S \rangle_{\text{ideal}} = 0\), which makes GUESS inapplicable (division by zero). In this case, use a different symmetry observable or fall back to standard ZNE.

3.3 Target Observable

The SCPN synchronisation witness (order parameter):

\[R = \frac{1}{n} \left| \sum_i (\langle X_i \rangle + i \langle Y_i \rangle) \right|\]

does not commute with \(H_{XY}\), so its ideal value is unknown a priori. This is precisely the class of observables that GUESS is designed to mitigate.

3.4 Measurement Protocol

Since \(S = \sum Z_i\) requires only computational-basis (Z-basis) measurements, the symmetry measurement is "free" — it shares the same basis as the standard circuit output. No additional circuit variants or shots are needed to obtain \(\langle S \rangle\).

For the target \(R\), three measurement bases (X, Y, Z) are already required. GUESS adds zero overhead to the measurement protocol.


4. Architecture

4.1 Module Structure

src/scpn_quantum_control/mitigation/
├── __init__.py          # Re-exports GUESS API
├── symmetry_decay.py    # GUESS Python implementation + Rust dispatch
├── symmetry_verification.py  # Z₂ parity post-selection (existing)
├── zne.py               # Standard Richardson ZNE (existing)
└── ...

scpn_quantum_engine/src/
├── symmetry_decay.rs    # Rust-accelerated fit + batch extrapolation
├── validation.rs        # FFI boundary validation
└── lib.rs               # PyO3 module registration

4.2 Data Flow

                    ┌─────────────────────┐
                    │  QPU / Simulator     │
                    │  Execute at g=1,3,5  │
                    └──────────┬──────────┘
                    ┌──────────▼──────────┐
                    │  Measure ⟨S⟩_g and  │
                    │  ⟨O⟩_g at each g    │
                    └──────────┬──────────┘
              ┌────────────────▼────────────────┐
              │  learn_symmetry_decay(           │
              │    ideal_value, noisy_S, scales) │
              │  → SymmetryDecayModel(α, r)     │
              └────────────────┬────────────────┘
              ┌────────────────▼────────────────┐
              │  guess_extrapolate(              │
              │    O_noisy, S_noisy, model)      │
              │  → GUESSResult(mitigated, C)     │
              └─────────────────────────────────┘

4.3 Dataclasses

SymmetryDecayModel — the learned noise model:

Field Type Description
ideal_symmetry_value float Analytically known \(\langle S \rangle_{\text{ideal}}\)
noisy_symmetry_values list[float] Measured \(\langle S \rangle_g\) at each noise scale
noise_scales list[int] Noise scale factors \(g = 1, 3, 5, \ldots\)
alpha float Learned decay exponent
fit_residual float RMS residual of the log-linear fit

GUESSResult — a single mitigated measurement:

Field Type Description
raw_value float Original \(\langle O \rangle_{\text{noisy}}\)
mitigated_value float GUESS-corrected \(\langle O \rangle_{\text{mitigated}}\)
decay_model SymmetryDecayModel Reference to the decay model used
correction_factor float The factor \(C\) applied

5. API Reference

5.1 learn_symmetry_decay

from scpn_quantum_control.mitigation.symmetry_decay import learn_symmetry_decay

model = learn_symmetry_decay(
    ideal_symmetry_value: float,      # ⟨S⟩_ideal (e.g., n_qubits for ground state)
    noisy_symmetry_values: list[float],  # measured ⟨S⟩_g at each scale
    noise_scales: list[int],          # scale factors [1, 3, 5, ...]
) -> SymmetryDecayModel

Behaviour:

  1. Validates inputs:
  2. len(noisy_symmetry_values) == len(noise_scales) (else ValueError)
  3. len(noise_scales) >= 2 (else ValueError)
  4. |ideal_symmetry_value| > 1e-15 (else ValueError)

  5. If scpn_quantum_engine is available, delegates to fit_symmetry_decay (Rust) for 2–5× speedup on large batches.

  6. Otherwise, computes in pure Python:

  7. Ratios: \(r_i = \langle S \rangle_{g_i} / \langle S \rangle_{\text{ideal}}\)
  8. Clamps ratios to \([10^{-15}, \infty)\) to avoid \(\ln(0)\)
  9. Log-linear regression: np.polyfit(g_shifted, log_ratios, 1)
  10. \(\alpha = -\text{slope}\), residual = RMSE of fit

Edge cases:

Condition Result
All \(\langle S \rangle_g\) equal \(\langle S \rangle_{\text{ideal}}\) \(\alpha = 0\), residual \(= 0\)
All noise scales identical \(\alpha = 0\) (degenerate fit)
Negative ratios (sign flip) Clamped to \(10^{-15}\) before \(\ln\)

5.2 guess_extrapolate

from scpn_quantum_control.mitigation.symmetry_decay import guess_extrapolate

result = guess_extrapolate(
    target_noisy_value: float,    # ⟨O⟩_noisy at base noise
    symmetry_noisy_value: float,  # ⟨S⟩_noisy at base noise
    decay_model: SymmetryDecayModel,
) -> GUESSResult

Behaviour:

  1. If \(|\langle S \rangle_{\text{noisy}}| < 10^{-15}\): symmetry fully decayed, correction undefined — returns raw value with \(C = 1\).

  2. Otherwise: \(C = (|S_{\text{ideal}} / S_{\text{noisy}}|)^\alpha\), mitigated \(= O_{\text{noisy}} \times C\).

5.3 xy_magnetisation_ideal

from scpn_quantum_control.mitigation.symmetry_decay import xy_magnetisation_ideal

value = xy_magnetisation_ideal(
    n_qubits: int,
    initial_state: str = "ground",  # "ground" or "neel"
) -> float

Returns the ideal total magnetisation \(\langle \sum Z_i \rangle\) for the XY Hamiltonian with the given initial state.

initial_state Return value
"ground" float(n_qubits)
"neel" float(n_qubits % 2)
other ValueError

5.4 Imports

All public API is re-exported from scpn_quantum_control.mitigation:

from scpn_quantum_control.mitigation import (
    GUESSResult,
    SymmetryDecayModel,
    guess_extrapolate,
    learn_symmetry_decay,
    xy_magnetisation_ideal,
)

And from the top-level package:

from scpn_quantum_control import (
    GUESSResult,
    SymmetryDecayModel,
    guess_extrapolate,
    learn_symmetry_decay,
)

6. Rust Acceleration

6.1 Overview

Two functions are accelerated via scpn_quantum_engine (PyO3 + rayon):

Python Function Rust Function Purpose
learn_symmetry_decay fit_symmetry_decay Least-squares \(\alpha\) fitting
(batch API) guess_extrapolate_batch Parallel batch correction

6.2 fit_symmetry_decay (Rust)

#[pyfunction]
pub fn fit_symmetry_decay(
    s_ideal: f64,
    noisy_values: PyReadonlyArray1<'_, f64>,
    noise_scales: PyReadonlyArray1<'_, f64>,
) -> PyResult<(f64, f64)>

Returns (alpha, fit_residual).

Implementation: Manual least-squares on log-transformed ratios without heap allocation. Uses validate_positive from validation.rs for FFI boundary safety.

Inner function (fit_decay_inner) is pure Rust, fully testable without Python context. 3 Rust unit tests: - Exact exponential recovery (\(\alpha = 0.15\), residual \(< 10^{-10}\)) - No-decay case (\(\alpha = 0\)) - Single-point fallback (\(\alpha = 0\))

6.3 guess_extrapolate_batch (Rust)

#[pyfunction]
pub fn guess_extrapolate_batch<'py>(
    py: Python<'py>,
    target_noisy: PyReadonlyArray1<'_, f64>,
    symmetry_noisy: PyReadonlyArray1<'_, f64>,
    s_ideal: f64,
    alpha: f64,
) -> PyResult<Bound<'py, PyArray1<f64>>>

Applies GUESS correction to \(N\) observables in parallel via rayon. Returns a numpy array of mitigated values.

Parallelisation: par_iter().zip() over target/symmetry pairs. For \(N > 1000\), rayon thread pool amortises overhead effectively. For small \(N\), rayon degrades gracefully (single-threaded fallback).

6.4 Transparent Dispatch

The Python learn_symmetry_decay function automatically dispatches to Rust when scpn_quantum_engine is importable:

try:
    from scpn_quantum_engine import (
        fit_symmetry_decay as _fit_rust,
        guess_extrapolate_batch as _batch_rust,
    )
    _HAS_RUST = True
except ImportError:
    _HAS_RUST = False

Inside learn_symmetry_decay:

if _HAS_RUST:
    alpha, residual = _fit_rust(
        ideal_symmetry_value,
        np.array(noisy_symmetry_values, dtype=np.float64),
        np.array(noise_scales, dtype=np.float64),
    )
else:
    # Pure Python fallback (numpy polyfit)
    ...

6.5 Build Configuration

The Rust crate uses optimised release settings in Cargo.toml:

[profile.release]
opt-level = 3
lto = "fat"
codegen-units = 1
strip = "debuginfo"

Build the extension:

cd scpn_quantum_engine
maturin develop --release


7. Tutorials

7.1 Basic GUESS Correction

import numpy as np
from scpn_quantum_control.mitigation.symmetry_decay import (
    learn_symmetry_decay,
    guess_extrapolate,
    xy_magnetisation_ideal,
)

n_qubits = 4
s_ideal = xy_magnetisation_ideal(n_qubits, "ground")  # 4.0

# Simulated noisy measurements at scale factors g = 1, 3, 5
# S decays exponentially: S_g = 4.0 * exp(-0.12 * (g - 1))
noise_scales = [1, 3, 5]
s_noisy = [4.0 * np.exp(-0.12 * (g - 1)) for g in noise_scales]
# s_noisy ≈ [4.0, 3.15, 2.48]

# Step 1: Learn the decay model
model = learn_symmetry_decay(s_ideal, s_noisy, noise_scales)
print(f"Learned α = {model.alpha:.4f}")   # ≈ 0.12
print(f"Fit residual = {model.fit_residual:.2e}")  # ≈ 0

# Step 2: Apply GUESS to target observable
# Measured R_noisy = 0.45 at g = 1, and S_noisy = 3.95 at g = 1
result = guess_extrapolate(
    target_noisy_value=0.45,
    symmetry_noisy_value=3.95,
    decay_model=model,
)
print(f"Raw R = {result.raw_value:.4f}")
print(f"Mitigated R = {result.mitigated_value:.4f}")
print(f"Correction factor = {result.correction_factor:.4f}")

7.2 GUESS with Real Hardware Data

from scpn_quantum_control.hardware import HardwareRunner
from scpn_quantum_control.hardware.circuit_export import build_trotter_circuit
from scpn_quantum_control.mitigation.symmetry_decay import (
    learn_symmetry_decay,
    guess_extrapolate,
    xy_magnetisation_ideal,
)
from scpn_quantum_control.mitigation.zne import gate_fold_circuit
import numpy as np

# Build experiment
n = 4
K = 0.45 * np.exp(-0.3 * np.abs(np.subtract.outer(range(n), range(n))))
np.fill_diagonal(K, 0.0)
omega = np.linspace(0.8, 1.2, n)
qc = build_trotter_circuit(K, omega, t=0.1, reps=3)
qc.measure_all()

# Run at multiple noise scales (circuit folding)
runner = HardwareRunner(use_simulator=True)
runner.connect()

noise_scales = [1, 3, 5]
s_measurements = []
r_measurements = []

for g in noise_scales:
    if g == 1:
        folded = qc
    else:
        folded = gate_fold_circuit(qc, scale_factor=g)

    result = runner.run_circuit(folded, f"guess_g{g}", shots=10000)
    # Extract S = sum of Z expectations from counts
    # Extract R from X, Y, Z basis measurements
    # (implementation depends on experiment protocol)
    s_measurements.append(extract_total_z(result.counts, n))
    r_measurements.append(extract_order_param(result, n))

# Apply GUESS
s_ideal = xy_magnetisation_ideal(n, "ground")
model = learn_symmetry_decay(s_ideal, s_measurements, noise_scales)
mitigated = guess_extrapolate(
    r_measurements[0],  # target at base noise
    s_measurements[0],  # symmetry at base noise
    model,
)
print(f"GUESS-mitigated R = {mitigated.mitigated_value:.4f}")

7.3 Batch GUESS with Rust

import numpy as np

try:
    from scpn_quantum_engine import guess_extrapolate_batch
except ImportError:
    raise ImportError("Rust engine required for batch GUESS")

# 1000 observables to mitigate simultaneously
n_obs = 1000
target_noisy = np.random.uniform(0.3, 0.8, n_obs)
symmetry_noisy = np.random.uniform(3.5, 4.0, n_obs)
s_ideal = 4.0
alpha = 0.12

# Single FFI call — rayon parallelisation
mitigated = guess_extrapolate_batch(target_noisy, symmetry_noisy, s_ideal, alpha)
# mitigated: numpy array of shape (1000,)

7.4 Combining GUESS with Existing Mitigation

GUESS is complementary to other mitigation techniques:

from scpn_quantum_control.mitigation.symmetry_decay import (
    learn_symmetry_decay,
    guess_extrapolate,
)
from scpn_quantum_control.mitigation.mitiq_integration import (
    zne_mitigated_expectation,
)

# Option 1: GUESS only (physics-informed, single ratio)
guess_result = guess_extrapolate(o_noisy, s_noisy, model)

# Option 2: Richardson ZNE only (generic polynomial)
zne_result = zne_mitigated_expectation(circuit)

# Option 3: GUESS + DDD (combine idle noise reduction with symmetry correction)
# Run DDD first, then apply GUESS to DDD-mitigated values
from scpn_quantum_control.mitigation.mitiq_integration import (
    ddd_mitigated_expectation,
)
o_ddd = ddd_mitigated_expectation(circuit)
final = guess_extrapolate(o_ddd, s_noisy, model)

# Option 4: GUESS + PEC (highest quality, highest cost)
from scpn_quantum_control.mitigation.pec import pec_mitigate
o_pec = pec_mitigate(circuit, noise_model)
final = guess_extrapolate(o_pec, s_noisy, model)

Recommended combinations:

Depth Range Recommended Stack Rationale
< 100 CZ ZNE alone Polynomial works fine at low depth
100–2000 CZ GUESS Physics-informed, zero overhead
2000–5000 CZ GUESS + DDD Reduce idle noise, correct gate noise
> 5000 CZ GUESS + PEC Maximum correction, high shot overhead

8. Integration with Existing Mitigation Stack

8.1 Relationship to symmetry_verification.py

The existing symmetry_verification.py module uses \(Z_2\) parity symmetry for hard post-selection: runs that violate parity are discarded entirely.

Key difference: GUESS performs soft correction, not hard filtering. Every measurement contributes to the final estimate, weighted by the learned decay model. This yields: - No shot wastage (parity post-selection discards 30–50% of shots at high noise) - Continuous correction (not binary keep/discard) - The ability to correct observables that do not have a simple parity

Complementary use: Run parity post-selection first, then apply GUESS to the filtered data. The post-selected ensemble has better signal, giving GUESS a higher-quality input.

8.2 Relationship to zne.py

Standard Richardson ZNE (zne.py) fits a polynomial to \(\langle O \rangle_g\) as a function of noise scale \(g\), then extrapolates to \(g = 0\).

Key difference: GUESS does not extrapolate the target observable directly. It uses the symmetry observable as a physical anchor, which is more robust at high noise.

When to prefer GUESS over Richardson: - Circuit depth > 2000 CZ gates (Richardson overshoots) - The Hamiltonian has a known symmetry (always true for XY) - Noise is predominantly depolarising (exponential decay model holds)

When Richardson is better: - No known symmetry observable - Noise is highly non-Markovian (GUESS exponential model breaks down) - Very shallow circuits where polynomial fit is adequate

8.3 Relationship to PEC (pec.py)

Probabilistic Error Cancellation (PEC) provides unbiased mitigation at exponential shot overhead. GUESS provides biased mitigation (the exponential decay assumption is approximate) at zero additional overhead.

In practice, GUESS + PEC can be combined: use PEC for the most critical observable, GUESS for secondary observables where shot budget is limited.


9. Benchmarks

9.1 Python Performance

Measured on ML350 Gen8 (128 GB RAM, Xeon E5-2620v2):

Operation Input Size Wall Time Throughput
learn_symmetry_decay 5 noise scales < 1 µs > 1M calls/s
guess_extrapolate Single observable < 0.1 µs > 10M calls/s

9.2 Rust Performance

Operation Input Size Wall Time Speedup vs Python
fit_symmetry_decay 5 noise scales < 0.5 µs
guess_extrapolate_batch 1000 observables < 50 µs 10×
guess_extrapolate_batch 100,000 observables < 2 ms 50×

Speedup for batch operations scales with problem size due to rayon parallelisation amortising thread pool overhead.

9.3 Accuracy on Synthetic Data

Scenario \(\alpha_{\text{true}}\) \(\alpha_{\text{fit}}\) Error
Perfect exponential decay 0.15 0.15 < \(10^{-10}\)
No decay 0.0 0.0 < \(10^{-10}\)
Noisy measurements (1% Gaussian) 0.15 0.148 ± 0.003 1.3%
Non-exponential decay (quadratic) 0.15 0.12 20%

The 20% error for non-exponential decay highlights the importance of checking fit_residual: if \(r > 0.1\), the exponential model is suspect.


10. Test Coverage

20 tests across 6 dimensions in tests/test_symmetry_decay.py:

10.1 Empty/Null Inputs (3 tests)

Test Description Assertion
test_two_scales_minimum Minimum viable input (2 scales) Model created, \(\alpha \geq 0\)
test_identical_values_zero_alpha No decay scenario $
test_guess_with_zero_correction \(\alpha = 0\) model Mitigated = raw, \(C = 1\)

10.2 Error Handling (4 tests)

Test Description Expected
test_length_mismatch values/scales length differs ValueError
test_too_few_scales Only 1 scale ValueError
test_zero_ideal_value \(\langle S \rangle_{\text{ideal}} = 0\) ValueError
test_invalid_initial_state Unknown initial state string ValueError

10.3 Negative Cases (3 tests)

Test Description Assertion
test_no_noise_no_correction Noisy = ideal \(C \approx 1\)
test_fully_decayed_symmetry_no_crash \(\langle S \rangle_{\text{noisy}} = 0\) Returns raw value
test_negative_alpha_not_physical Increasing symmetry under noise \(\alpha < 0\)

10.4 Pipeline Integration (5 tests)

Test Description Assertion
test_guess_improves_over_raw Exponential decay scenario \(C \approx 1\) at \(g = 1\)
test_xy_magnetisation_ground Ground state \(\langle S \rangle\) \(= n\)
test_xy_magnetisation_neel Néel state \(\langle S \rangle\) Even: 0, odd: 1
test_top_level_import Package re-export check Callable
test_decay_model_fields Dataclass field types Correct types

10.5 Roundtrip (3 tests)

Test Description Assertion
test_exact_exponential_recovery Perfect data → exact \(\alpha\) Error \(< 10^{-10}\)
test_correction_increases_with_noise More noise → larger \(C\) \(C_2 > C_1\)
test_guess_result_fields GUESSResult field types Correct types

10.6 Performance (2 tests)

Test Description Threshold
test_learn_fast 1000 learn calls < 1 s
test_extrapolate_fast 10000 extrapolate calls < 1 s

10.7 Pipeline Wiring (2 tests in test_pipeline_wiring_performance.py)

Test Description Assertion
test_guess_learn_decay GUESS in pipeline context Model created, \(\alpha > 0\)
test_guess_extrapolate GUESS extrapolation in pipeline Correction applied

10.8 Rust Unit Tests (3 tests in symmetry_decay.rs)

Test Description
test_fit_decay_exact_exponential Perfect exponential → \(\alpha\) exact
test_fit_decay_no_decay Constant values → \(\alpha = 0\)
test_fit_decay_single_point Single measurement → \(\alpha = 0\)

11. Limitations and Caveats

11.1 Exponential Decay Assumption

GUESS assumes noise-induced decay is exponential in the scale factor \(g\). This holds for: - Depolarising noise (standard NISQ assumption) - Independent gate errors - Circuit folding as the noise amplification method

It breaks down for: - Strongly non-Markovian noise (memory effects) - Coherent errors that do not scale with \(g\) - Crosstalk-dominated devices (error correlations)

Diagnostic: Check model.fit_residual. Values > 0.1 indicate the exponential model is unreliable.

11.2 Néel State with Even Qubits

For even \(n\) with Néel initial state, \(\langle S \rangle_{\text{ideal}} = 0\). GUESS cannot operate (division by zero). Fall back to standard ZNE or use a different symmetry observable.

11.3 Alpha Depth-Dependence

The paper (Oliva del Moral et al., 2026) assumes \(\alpha\) is constant across circuit depths. For SCPN 16-layer UPDE circuits, \(\alpha\) may vary between layers. Consider learning \(\alpha\) per Trotter step for deep circuits.

11.4 No Benchmarks for XY Model Specifically

The original paper benchmarks GUESS on Transverse-Field Ising Model (TFIM) and XZ Heisenberg model. Performance on the XY model is theoretically equivalent (same symmetry structure) but has not been empirically validated in the published literature.

11.5 Correction Factor Amplification

If \(|\langle S \rangle_{\text{noisy}}| \ll |\langle S \rangle_{\text{ideal}}|\) and \(\alpha > 1\), the correction factor can become very large, amplifying statistical noise in \(\langle O \rangle_{\text{noisy}}\). Monitor \(C\) and cap it at a reasonable maximum (e.g., \(C \leq 10\)) for deep circuits.


12. Comparison with Alternative Methods

Feature GUESS Richardson ZNE PEC Parity Post-Selection
Physics-informed Yes (symmetry) No Yes (noise model) Yes (parity)
Additional shots None 2–4× per scale Exponential None (but wastes 30–50%)
Max depth > 8000 CZ ~ 2000 CZ Unlimited ~ 1000 CZ
Bias Yes (model dependent) Yes (polynomial order) No (unbiased) Yes (selection bias)
Noise model required No No Yes No
Implementation effort Low Low High Low
Rust acceleration Yes No (Mitiq wraps Cirq) Yes (pec.rs) No

When to Choose GUESS

  1. Moderate depth (100–5000 CZ): GUESS outperforms Richardson and has zero overhead compared to PEC.
  2. Shot-limited experiments: GUESS uses every shot, unlike parity post-selection.
  3. XY Hamiltonian simulations: The magnetisation symmetry is free and perfectly suited.
  4. Rapid prototyping: No noise model characterisation needed (unlike PEC).

When NOT to Choose GUESS

  1. No symmetry available: GUESS requires \([H, S] = 0\) with known \(\langle S \rangle_{\text{ideal}}\).
  2. Unbiased estimates required: Use PEC instead.
  3. Non-depolarising noise dominates: Check fit_residual first.

13. References

  1. Oliva del Moral, A. et al. "Guiding extrapolations from symmetry decays for efficient error mitigation." arXiv:2603.13060 (2026). — Original GUESS method. Eq. 5 is the core formula implemented here.

  2. Temme, K., Bravyi, S. & Gambetta, J. M. "Error mitigation for short-depth quantum circuits." PRL 119, 180509 (2017). — Richardson ZNE reference (comparison baseline).

  3. van den Berg, E., Minev, Z. K. & Bhatt, K. "Probabilistic error cancellation with sparse Pauli-Lindblad models on noisy quantum processors." Nature Physics 19, 1116–1121 (2023). — PEC reference (complementary technique).

  4. Šotek, M. "SCPN Quantum Control: Kuramoto-XY synchronisation witnesses on NISQ hardware." (2024–2026). — SCPN framework and XY Hamiltonian formulation.


See Also