English

PhasorFlow: A Python Library for Unit Circle Based Computing

Machine Learning 2026-03-19 v2 Artificial Intelligence

Abstract

We present PhasorFlow, an open-source Python library introducing a computational paradigm operating on the S1S^1 unit circle. Inputs are encoded as complex phasors z=eiθz = e^{i\theta} on the NN-Torus (TN\mathbb{T}^N). As computation proceeds via unitary wave interference gates, global norm is preserved while individual components drift into CN\mathbb{C}^N, allowing algorithms to natively leverage continuous geometric gradients for predictive learning. PhasorFlow provides three core contributions. First, we formalize the Phasor Circuit model (NN unit circle threads, MM gates) and introduce a 22-gate library covering Standard Unitary, Non-Linear, Neuromorphic, and Encoding operations with full matrix algebra simulation. Second, we present the Variational Phasor Circuit (VPC), analogous to Variational Quantum Circuits (VQC), enabling optimization of continuous phase parameters for classical machine learning tasks. Third, we introduce the Phasor Transformer, replacing expensive QKTVQK^TV attention with a parameter-free, DFT-based token mixing layer inspired by FNet. We validate PhasorFlow on non-linear spatial classification, time-series prediction, financial volatility detection, and neuromorphic tasks including neural binding and oscillatory associative memory. Our results establish unit circle computing as a deterministic, lightweight, and mathematically principled alternative to classical neural networks and quantum circuits. It operates on classical hardware while sharing quantum mechanics' unitary foundations. PhasorFlow is available at https://github.com/mindverse-computing/phasorflow.

Keywords

Cite

@article{arxiv.2603.15886,
  title  = {PhasorFlow: A Python Library for Unit Circle Based Computing},
  author = {Dibakar Sigdel and Namuna Panday},
  journal= {arXiv preprint arXiv:2603.15886},
  year   = {2026}
}