quantum_info 模块
pyqpanda3.quantum_info 模块提供核心的量子信息原语:量子态表示、量子信道表示、分析度量和矩阵操作的实用类。
概述
该模块按以下领域组织:
- 量子态 -- 通过
StateVector和DensityMatrix表示纯态和混合态。 - 量子信道 -- 完全正保迹映射的五种等价表示:
Kraus、Chi、Choi、SuperOp和PTM。 - 幺正操作 -- 通过
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_distance、hellinger_fidelity、KL_divergence |
| Matrix | 通用复数 Matrix 类 |
| StateVector | 纯量子态表示 |
| DensityMatrix | 混合量子态表示 |
| Unitary | 从量子线路提取的幺正算符 |
| QuantumChannel | Chi、Choi、SuperOp、PTM、Kraus 信道表示 |