qalgora-Q Docs Hub量子文档 ✦ Ask AI✦ 问问文档

Error Mitigation & Suppression

◐ Design-level API
This page documents qalgora-Q API design, architecture, or adaptation workflows. Code examples illustrate intended usage and are not guaranteed to run in the current reference implementation.

Two families of techniques fight hardware noise: suppression reduces errors as the circuit runs, and mitigation corrects results afterwards.

Suppression (during execution)

  • Dynamical decoupling — insert pulse sequences on idle qubits to cancel dephasing.
  • Pauli twirling — randomize coherent errors into a stochastic, averageable form.

Mitigation (after execution)

  • ZNE (zero-noise extrapolation) — run at amplified noise, extrapolate to zero.
  • PEC (probabilistic error cancellation) — invert a learned noise model (needs noise learning).
  • TREX (Twirled Readout Error eXtinction) / readout — correct measurement bias (see readout mitigation).

One knob: resilience level

import qalgora
# resilience_level rolls up the techniques above into one setting
# PEC (level 3) needs a noise_model obtained from noise learning
energy = qalgora.observe(ansatz, hamiltonian, theta,
                         resilience_level=3,                 # 3 = PEC
                         noise_model=model).expectation()    # 0=none ... 3=most
Backend-dependent — not guaranteed in the reference build
resilience_level is a backend-dependent option; the supported mitigation techniques vary by target backend, and the current reference build does not guarantee support for these hardware error-mitigation workflows. PEC (level 3) requires a noise_model obtained from noise learning.
LevelApplies
0No mitigation
1Readout mitigation + twirling
2+ ZNE
3+ PEC (most accurate, most expensive)
Cost trade-off
Higher resilience means more circuit executions. PEC in particular scales sharply with noise — use it for small, high-value estimations.

误差缓解与误差抑制

◐ 设计接口
本页描述的是 qalgora-Q 的接口设计、架构设计或适配工作流。相关代码用于说明预期用法,当前参考实现不保证可以直接运行。

两类技术对抗硬件噪声:抑制在线路运行期间减少误差,缓解在运行结束后对结果进行修正。

抑制(执行期间)

  • 动力学解耦 — 在空闲量子比特上插入脉冲序列,以消除退相位。
  • Pauli 扭曲(twirling) — 将相干误差随机化为可统计平均的随机形式。

缓解(执行之后)

  • ZNE(零噪声外推)— 在放大噪声下运行,再外推至零噪声。
  • PEC(概率性误差消除)— 对已学习的噪声模型取逆(需要 噪声学习)。
  • TREX(Twirled Readout Error eXtinction)/ 读出 — 修正测量偏差(参见 读出误差缓解)。

一个旋钮:韧性等级

import qalgora
# resilience_level rolls up the techniques above into one setting
# PEC (level 3) needs a noise_model obtained from noise learning
energy = qalgora.observe(ansatz, hamiltonian, theta,
                         resilience_level=3,                 # 3 = PEC
                         noise_model=model).expectation()    # 0=none ... 3=most
后端相关·参考实现不保证
resilience_level 是后端相关选项;不同目标后端支持的缓解技术可能不同;当前参考实现不保证支持这些硬件误差缓解流程。PEC(level 3)需配合噪声学习得到的 noise_model
等级应用技术
0不启用缓解
1读出误差缓解 + 扭曲(twirling)
2+ ZNE
3+ PEC(精度最高,开销最大)
成本权衡
韧性等级越高,所需线路执行次数越多。PEC 的开销尤其随噪声急剧增加 — 建议仅用于规模较小、价值较高的期望值估计。