Skip to content

【代码贡献】新增 VQLS 变分量子线性求解器 - #79

Open
tokenjunkielabs wants to merge 15 commits into
OriginQ:developfrom
woahwhattheheck:zz-cinderline/origin-vqls-20260920
Open

tokenjunkielabs wants to merge 15 commits into
OriginQ:developfrom
woahwhattheheck:zz-cinderline/origin-vqls-20260920

Conversation

@tokenjunkielabs

Copy link
Copy Markdown

关联 #13(2026 本源杯开源创新赛道|代码贡献)。

新增 Variational Quantum Linear Solver (VQLS) 模块,用于 2^n 维线性系统:

  • 实现尺度不变的全局 VQLS 目标 C(theta)=1-|<b|A|x(theta)>|^2/<x(theta)|A^H A|x(theta)>;
  • 支持自定义 state_fn,使 PyQPanda3 模拟器或真实硬件适配器可以直接提供参数化量子态;
  • 提供内置 RY + CNOT-ring 硬件高效参考 ansatz;
  • 使用 SPSA,每次参数更新只需要两次目标函数评估,适合 shot-based 后端;
  • 恢复归一化量子态缺失的经典解幅度,并返回原始线性系统 residual norm;
  • 对矩阵维度、奇异矩阵、非有限输入、ansatz 维度与优化器参数进行显式校验;
  • 导出公开 VQLS API,更新英文 README,并提供 2x2 线性系统可运行示例。

Owner branch: woahwhattheheck/pyqpanda-algorithm:zz-cinderline/origin-vqls-20260920
Current head: 9fc787b
Target: develop.

本提交未运行测试,因此不声明本地或托管测试绿色。

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