Skip to content

quantum_info 模块

pyqpanda3.quantum_info 模块提供核心的量子信息原语:量子态表示、量子信道表示、分析度量和矩阵操作的实用类。

概述

该模块按以下领域组织:

  • 量子态 -- 通过 StateVectorDensityMatrix 表示纯态和混合态。
  • 量子信道 -- 完全正保迹映射的五种等价表示:KrausChiChoiSuperOpPTM
  • 幺正操作 -- 通过 Unitary 从量子线路提取幺正矩阵。
  • 矩阵工具 -- 具有代数运算的通用复数 Matrix 类。
  • 分析函数 -- 概率分布之间的统计距离度量:Hellinger 距离、Hellinger 保真度和 KL 散度。

此模块中的所有类都在 pyqpanda3.quantum_info 命名空间下暴露。

python
from pyqpanda3.quantum_info import (
    StateVector, DensityMatrix, Unitary, Matrix,
    Kraus, Chi, Choi, SuperOp, PTM,
    hellinger_distance, hellinger_fidelity, KL_divergence,
)

子主题

主题说明
分析距离度量:hellinger_distancehellinger_fidelityKL_divergence
Matrix通用复数 Matrix
StateVector纯量子态表示
DensityMatrix混合量子态表示
Unitary从量子线路提取的幺正算符
QuantumChannelChi、Choi、SuperOp、PTM、Kraus 信道表示

Released under the MIT License.