AI Navigate

PhasorFlow: A Python Library for Unit Circle Based Computing

arXiv cs.LG / 3/18/2026

📰 NewsTools & Practical UsageModels & Research

Key Points

  • PhasorFlow formalizes the Phasor Circuit model with N unit circle threads and a 22-gate library spanning Standard Unitary, Non-Linear, Neuromorphic, and Encoding operations, with full matrix algebra simulation.
  • It encodes inputs as complex phasors on the unit circle and uses unitary wave interference gates to preserve global norm while allowing components to drift into C^N, enabling continuous geometric gradients for learning.
  • The Variational Phasor Circuit (VPC) enables optimization of continuous phase parameters for classical machine learning tasks, analogous to Variational Quantum Circuits.
  • The Phasor Transformer provides a parameter-free, DFT-based token mixing layer that replaces expensive QK^T V attention, inspired by FNet.
  • PhasorFlow demonstrates applications across non-linear spatial classification, time-series prediction, financial volatility detection, and neuromorphic tasks including neural binding and oscillatory associative memory, positioning unit-circle computing as a lightweight, principled alternative to classical neural networks and quantum circuits on classical hardware.

Abstract

We present PhasorFlow, an open-source Python library introducing a computational paradigm operating on the S^1 unit circle. Inputs are encoded as complex phasors z = e^{i\theta} on the N-Torus (\mathbb{T}^N). As computation proceeds via unitary wave interference gates, global norm is preserved while individual components drift into \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 (N unit circle threads, M 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 QK^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.