cs.LGMar 16, 2026

PhasorFlow: A Python Library for Unit Circle Based Computing

Authors: Dibakar SigdelNamuna Panday

Organizations: Mindverse Computing LLC, Lynnwood, WA 98087

Abstract

We present PhasorFlow, an open-source Python library for computing on the S1S^1 unit circle. Inputs are encoded as complex phasors z=eiφz=e^{iφ} on the NN-torus (TN\mathbb{T}^N); as computation proceeds through unitary wave-interference gates, global norm is preserved while components drift into CN\mathbb{C}^N, letting algorithms leverage continuous geometric gradients. PhasorFlow makes three contributions. First, we formalize the Phasor Circuit model (NN threads, MM 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 QKTVQK^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.

Explore similar work

Mar 18, 2026cs.LG

Variational Phasor Circuits for Phase-Native Brain-Computer Interface Classification

We present the Variational Phasor Circuit (VPC), a deterministic classical learning architecture on the continuous S1S^1 unit-circle manifold. Inspired by variational quantum circuits, VPC replaces dense weight matrices with trainable phase shifts, local unitary mixing, and structured interference in the ambient complex space, giving a unified method for binary and multi-class classification of spatially distributed signals. We evaluate VPC on real motor-imagery electroencephalography (EEG) from the PhysioNet Motor Movement/Imagery database (10 subjects, Common Spatial Pattern features, subject-wise cross-validation), where it attains a mean decoding accuracy of 0.600.60 -- the highest among standard brain--computer-interface baselines (linear discriminant analysis, logistic regression, RBF-SVM, and a multilayer perceptron) -- using an order of magnitude fewer parameters and the lowest cross-subject variance. We also characterize capacity honestly: with phase-only shifts and unitary mixing, VPC realizes a linear decision function in a fixed cosine/sine feature lifting, well matched to the largely separable band-power structure of EEG but unable to represent parity-type functions, a ceiling that depth does not raise. These results position unit-circle phase interference as a parameter-efficient alternative to dense neural computation for signal classification, and motivate VPC both as a standalone classifier and a front-end for hybrid phasor-quantum systems.
Dibakar Sigdel
Mar 18, 2026cs.LG

The Phasor Transformer: Resolving Attention Bottlenecks on the Unit Circle

Transformer models have redefined sequence learning, yet dot-product self-attention introduces a quadratic token-mixing bottleneck for long-context time-series. We introduce the Phasor Transformer block, a phase-native alternative representing sequence states on the unit-circle manifold S1S^1. Each block combines lightweight trainable phase-shifts with parameter-free Discrete Fourier Transform (DFT) token coupling, achieving global O(NlogN)\mathcal{O}(N\log N) mixing without explicit attention maps. Stacking these blocks defines the Large Phasor Model (LPM). We validate LPM on autoregressive time-series prediction over synthetic multi-frequency benchmarks against honest baselines: it beats a zero-parameter persistence baseline and, with the corrected gradient path, improves monotonically with depth before saturating, while remaining competitive-but-not-superior to self-attention at a fraction of the parameter count. Our results establish an explicit efficiency--accuracy frontier, showing that scalable temporal modeling in oscillatory domains can emerge from geometry-constrained phase computation with deterministic global coupling.
Dibakar Sigdel
Aug 7, 2026cs.PF

Classical SU(2)\mathrm{SU}(2) Models Match or Exceed Shallow Variational Quantum Circuits on Vision Benchmarks

Quaternion-valued neural networks and variational quantum circuits (VQCs) both derive local transformations from SU(2)\mathrm{SU}(2) geometry, yet their performance on classical supervised learning remains poorly understood. We compare real-valued, quaternion-valued, and quantum classification heads on identical frozen features across MNIST, FashionMNIST, and CIFAR-10. CIFAR-10 uses a learned 16-dimensional bottleneck and frozen ImageNet-pretrained ResNet18 features to separate architecture from representation quality. Quaternion classifiers match or approach real-valued baselines while outperforming shallow VQCs. On MNIST and FashionMNIST, quaternion networks nearly equal real-valued MLPs, whereas product-state VQCs show lower accuracy and higher cost. On CIFAR-10, quaternion networks retain 94--97% of real-valued performance and remain stable under a 32-fold increase in dimensionality. Product-state circuits underperform quaternion classifiers, while entanglement gives modest grayscale gains but reverses under pretrained CNN features (9.25 pp degradation vs.\ product-state). Fubini--Study/QFI natural gradients improve geometric alignment but not short-horizon loss reduction vs.\ Adam. A Friedman test on five-seed MNIST detects model differences (χ2=12.796χ^2=12.796, p=0.0051p=0.0051, n=5n=5), with Wilcoxon tests yielding large effect sizes (d>5d>5) for QuatNet vs.\ quantum comparisons. For FashionMNIST and CIFAR-10, large effects (d>2.0d>2.0) are the primary statistic given n=3n=3. These results indicate that quaternion networks provide efficient, stable SU(2)\mathrm{SU}(2) alternatives to shallow VQCs on tasks lacking intrinsic quantum structure. Shared local SU(2)\mathrm{SU}(2) geometry and shallow entanglement are insufficient, within the regime studied, to confer practical quantum advantage. Conclusions are limited to shallow, measurement-limited circuits on such tasks.
Christopher Fulton, Irene Tsapara, Lawrence Fulton