arXiv:2603.15886cs.LGcs.AI2026-03被引 2

用复数相位在圆上计算,实现轻量级类量子算法

PhasorFlow: A Python Library for Unit Circle Based Computing

  • 将输入编码为复数相位,通过单位酉门进行连续几何梯度计算
  • 提出可训练的相位电路模型,支持金融波动检测等新任务
  • 无需参数的傅里叶注意力层,适合经典硬件上的高效推理

我们提出 PhasorFlow,一个开源的 Python 库,用于在 $S^1$ 单位圆上进行计算。输入以复数相位 $z=e^{iϕ}$ 形式编码于 $N$-环面 ($\mathbb{T}^N$);随着计算通过酉波干涉门进行,全局范数保持不变,而分量漂移至 $\mathbb{C}^N$,使算法能利用连续几何梯度。PhasorFlow 有三项贡献:第一,形式化了相位电路模型($N$ 线程,$M$ 门),并提供包含标准酉、非线性、神经形态和编码操作的 22 种门库,支持完整矩阵代数模拟;第二,引入变分相位电路(VPC),一种类似变分量子电路的原生相位分类器;第三,提出相位变换器模块与大相位模型(LPM),以无参数 DFT 令牌混合层替代 $QK^TV$ 注意力。我们在金融波动检测、神经形态联想记忆、神经绑定、周期发现及算法逻辑等独特任务上验证了该框架。这使得单位圆计算成为一种确定性、轻量级的经典硬件范式。代码地址:https://github.com/mindverse-computing/phasorflow。

原文摘要 · Abstract (English)

We present PhasorFlow, an open-source Python library for computing on the $S^1$ unit circle. Inputs are encoded as complex phasors $z=e^{iϕ}$ on the $N$-torus ($\mathbb{T}^N$); as computation proceeds through unitary wave-interference gates, global norm is preserved while components drift into $\mathbb{C}^N$, letting algorithms leverage continuous geometric gradients. PhasorFlow makes three contributions. First, we formalize the Phasor Circuit model ($N$ threads, $M$ gates) with a 22-gate library spanning standard-unitary, non-linear, neuromorphic, and encoding operations under full matrix-algebra simulation. Second, we introduce the Variational Phasor Circuit (VPC), a trainable phase-native classifier analogous to variational quantum circuits. Third, we introduce the Phasor Transformer block and Large Phasor Model (LPM), replacing $QK^TV$ attention with a parameter-free DFT token-mixing layer. We validate the framework on financial volatility detection, neuromorphic associative memory, neural binding, period finding, and algorithmic logic applications that are unique to the library. This positions unit-circle computing as a deterministic, lightweight paradigm on classical hardware. Available at https://github.com/mindverse-computing/phasorflow.

相位计算轻量模型经典硬件傅里叶变换

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。