Angle Encoding: From Quantum to Geometric Applications
- Angle encoding is a method that maps numerical data to rotations or angles, enabling structured control in quantum circuits, transformer models, and geometric learning.
- It leverages angular periodicity and algebraic constraints to encode positional, feature, or optical functions, thereby optimizing computational and physical costs.
- Practical studies demonstrate its effectiveness in quantum machine learning, numerical integration, object detection, and metasurface design with improved efficiency and accuracy.
Searching arXiv for papers on angle encoding across quantum computing, transformers, vision, and related domains. Searching arXiv for “angle encoding” and related recent work. Angle encoding denotes a class of representations in which information is mapped to angles, rotations, or angle-dependent responses. The term is used in several technically distinct literatures. In quantum machine learning, it usually denotes mapping real-valued features to single-qubit rotations; in quantum algorithms for numerical integration, it denotes the angle map that determines amplitude-oracle complexity; in Transformers, it denotes positional information injected as rotations in embedding space; in detection and geometric learning, it denotes angular descriptors or angle-label parameterizations; and in metasurfaces it denotes the encoding of multiple optical functions into one device, selected by illumination angle (Sammartino, 3 Jun 2026, Yu et al., 4 Jun 2025, 1711.02265).
1. Core idea and domain-specific meanings
Across these settings, the common motif is that an angle is used as a structured, often periodic control variable. What changes from field to field is the object being rotated, the algebra that constrains the rotation, and the computational or physical cost of realizing it.
| Domain | Encoded quantity | Representative formulation |
|---|---|---|
| Quantum feature maps | Classical feature vector | |
| QAE-based integration | Grid function values | |
| Rotary positional encoding | Position coordinates | |
| Point-cloud GNNs | Edge geometry | |
| Arbitrary-oriented detection | OBB orientation | |
| Angle-multiplexed metasurfaces | Optical function under incidence angle | depends on illumination angle |
The shared name can obscure substantial differences. In some settings angle encoding is a data-loading primitive; in others it is a complexity invariant, a positional symmetry mechanism, a way to avoid boundary discontinuity, or a physical multiplexing principle. A recurring implication is that angle encoding is valuable when angular structure matches the symmetry, topology, or hardware constraints of the problem, and much less so when that structure is absent.
2. Quantum-state and feature encodings
In quantum machine learning, angle encoding maps each real feature to the angle of a single-qubit rotation, typically about a Pauli axis. A standard layer uses
while dense-angle encoding packs two features per qubit through
Data re-uploading repeats the same angle block between trainable layers, enlarging the accessible Fourier spectrum without increasing qubit count. In the survey taxonomy, standard angle encoding uses qubits, single-qubit rotations, 0 two-qubit gates in the encoding layer, and depth 1; dense-angle encoding uses 2 and depth 3 (Sammartino, 3 Jun 2026).
This shallow structure is the basis of its NISQ appeal. The same survey gives an encoding-layer fidelity lower bound
4
and identifies a practical crossover at 5 below which amplitude encoding is viable. For 6, shallow angle-based encodings consistently outperform amplitude encoding in practice, despite amplitude encoding’s exponential qubit advantage. The survey also emphasizes the Fourier viewpoint: if a feature 7 is injected 8 times through a Pauli rotation, then the accessible per-dimension frequencies satisfy 9, so re-uploading directly controls expressivity (Sammartino, 3 Jun 2026).
Empirical studies treat the embedding itself as a hyperparameter rather than a fixed preprocessing step. In variational quantum classifiers trained on Wine and Diabetes, the choice of rotation gates in the encoding layer materially changed classification performance: under identical topologies, the difference between the best and worst models ranged from 0 to 1, with differences reaching up to 2, and the best Wine result was angle encoding with 3, 4 layers, and no re-uploading at 5 (Tudisco et al., 1 Aug 2025). In QCNNs trained on downsampled MNIST and Fashion-MNIST under depolarizing noise, angle encoding used the canonical patchwise map
6
and on aggressively downsampled 7 inputs it attained higher accuracy and remained comparatively robust as noise increased; at 8, however, a hybrid phase/angle scheme could overtake it under moderate noise (Feng, 14 Dec 2025). In SPATE, angle encoding appears as the fixed baseline of local single-qubit rotations applied after standardization; it performed well on Circles, but on Moons its encoder-level geometry was weak, with 9 versus 0 for SPATE (Innan et al., 13 Apr 2026).
A different quantum meaning appears in quantum signal processing. There, angle encoding is the angle-finding problem: choosing rotation angles so that interleaved signal-independent and signal-dependent gates synthesize a target polynomial transformation of a unitary. The orthogonal-polynomial formulation derives explicit expressions for Hermite, Jacobi, and Rogers–Szegő families and shows that 1 rotation angles are required to encode a sequence of polynomials up to degree 2 (Bernard et al., 6 May 2026). This use of the term is not feature embedding but analytic synthesis of a polynomial basis through rotation parameters.
3. Angle maps in quantum algorithms for integration and similarity
For numerical integration by quantum amplitude estimation, angle encoding becomes an operator-level description of the amplitude oracle. On the uniform grid 3 and with bit-string index 4, the angle map is
5
equivalently
6
The encoding operator 7 applies 8 to an ancilla conditioned on the index register, and the QAE oracle is
9
The ancilla-1 marginal equals the left quadrature sum,
0
The paper defines the hierarchy
1
with membership checkable classically in 2 time by the Walsh–Hadamard transform. For 3, the encoding operator factorizes into
4
so the number of controlled-5 gates is
6
This interpolates between the affine 7 regime with 8 gates and the generic 9 regime with 0 gates. Combining this structure with classical discretization for 1 yields total gate count
2
and for 3,
4
which is asymptotically better than classical Monte Carlo for every 5. The paper also proves an unconditional separation: 6 contains functions of Sobolev regularity 7 for which the quantum oracle cost is 8, whereas classical deterministic or randomized quadrature requires 9. Experiments on SpinQ Triangulum and IBM Kingston at 0 showed that circuits inside the predicted hierarchy executed successfully, whereas circuits exceeding the Triangulum coherence budget failed as predicted (Chinesta et al., 27 Apr 2026).
A second algorithmic use appears in approximate cosine similarity estimation via an angle-encoding Hadamard test. For normalized 1 with entries in 2, each component is encoded as
3
and similarly for 4. Each index 5 uses a two-qubit Hadamard-test circuit for
6
so
7
Summing the elementwise estimators and approximating the square-root term produces
8
The design point is constant circuit depth with respect to vector dimension, full parallelizability across coordinates, and width 9 qubits. The manuscript states that the induced bias is non-negative, but the supplied correction via Cauchy–Schwarz gives
0
so the estimator is conservative or exact in special cases. In numerical experiments on random normalized vectors, RMSE decreased from 1 at 2 to 3 at 4 (Ohno, 17 Apr 2026).
These results sharpen a frequent misconception: in quantum settings, angle encoding does not automatically imply efficient data loading. In integration, the relevant question is not whether a function can be written through angles, but whether its angle map has low multilinear degree; in similarity estimation, shallow angle circuits are obtained only by trading compact width for larger qubit footprint.
4. Positional angle encoding in attention architectures
In Transformers, angle encoding most prominently appears as Rotary Positional Encoding. RoPE rotates query and key embeddings so that attention depends on relative position:
5
with
6
ComRoPE generalizes this by defining the rotation through trainable skew-symmetric angle matrices,
7
The central theorem is that, for 8, the rotation difference can be represented by the location difference if and only if the generators pairwise commute:
9
This commutativity condition is presented as the algebraic requirement for preserving the RoPE Equation and therefore offset invariance. Two sufficient constructions are given. ComRoPE-AP uses block-diagonal angle matrices in which each axis controls a disjoint subset of blocks; ComRoPE-LD uses linearly dependent blocks of the form 0 (Yu et al., 4 Jun 2025).
The practical objective is to expand the transformation space beyond hand-crafted 1D rotations while retaining relative-position robustness. In the reported ImageNet-1K experiments, ComRoPE-LD surpassed LieRE by 2 at training resolution and by 3 at higher resolution. On MS COCO object detection with a ViT-S backbone, ComRoPE-LD achieved 4, slightly above LieRE at 5 and APE at 6, while using roughly half the extra parameters of LieRE; ComRoPE variants also converged faster than APE, by approximately 7 fewer iterations. The implementation computes matrix exponentials of small 8 blocks, with block size 9 and 0 giving the best accuracy under acceptable overhead. The same paper notes that the current overhead of torch.matrix_exp remains a limitation (Yu et al., 4 Jun 2025).
Here the central controversy is not whether rotations help, but which algebraic constraints are necessary. Standard RoPE uses fixed frequencies, LieRE trains skew-symmetric blocks without enforcing commutativity, and ComRoPE argues that pairwise commutativity is essential for exact offset-invariant behavior in multi-axis settings.
5. Angular representations in geometric learning and detection
In 3D point-cloud detection with graph neural networks, angle encoding is used to construct rotation-invariant edge features from point normals and relative displacement. For an edge 1 with normals 2 and relative vector 3, the paper defines
4
and
5
The best-performing edge descriptor is the hybrid
6
On the KITTI subset used in the study, Angle + Relative outperformed the relative baseline for Cars by 7 mAP on Easy, 8 on Moderate, and 9 on Hard, while adding only about 00 s total time over Relative (Ansari et al., 2021).
In arbitrary-oriented object detection, the main difficulty is angle periodicity, ambiguity, and boundary discontinuity. MGAR addresses this through coarse-grained angle classification and fine-grained angle regression under a long-side-based 01 convention. With
02
the model predicts the coarse class and then regresses a transformed residual 03, decoding through
04
An IoU-aware FAR-Loss uses
05
On HRSC2016, MGAR with 06 reached 07, 08, and 09, versus 10, 11, and 12 for a regression-only baseline; it also reduced angle-head thickness by about 13 relative to CSL and was fastest on Jetson AGX Xavier among the compared methods (Wang et al., 2022).
A closely related classification-based formulation is DCL, which replaces one-hot angle bins by Binary Coded Labels or Gray Coded Labels. With angular range 14 and bin width 15, the number of angle channels becomes
16
so prediction-layer thickness drops from
17
to
18
ADARSW reweights the angle loss through
19
with 20 for elongated objects and 21 for square-like ones. The reported effect is approximately 22 faster training than CSL, with DCL increasing mAP23 on DOTA from about 24 for regression to 25 for BCL and 26 for GCL, and to 27 and 28 with ADARSW (Yang et al., 2020).
Directional encoding on the sphere introduces a different geometric problem: Cartesian coordinate charts distort 29 through pole singularities, seams, and area nonuniformity. The hash-sphere construction addresses this by encoding directions on a hierarchical geodesic grid derived from recursive icosahedral subdivision, interpolating learnable per-vertex features with spherical barycentric weights based on spherical triangle areas. The resulting directional encoding
30
extends to a 31D spatio-directional encoding for signals on 32, using joint interpolation over 33 spatial voxel corners and 34 directional vertices per level. In neural path guiding, this encoding outperformed the state of the art by up to a factor of 35 in variance reduction for the same number of samples, and equal-time comparisons reached approximately 36 variance reduction in challenging scenes (Weier et al., 5 Mar 2026).
Taken together, these literatures show that angular representations are used for two rather different purposes: to gain invariance to rigid rotations and periodicity, and to respect non-Euclidean topology such as 37. Misunderstanding these as the same problem often leads to ineffective Cartesian parameterizations or unstable boundary-sensitive losses.
6. Physical realizations, system constraints, and open questions
In optics, angle encoding becomes a physical multiplexing principle. Angle-multiplexed metasurfaces are designed so that under illumination at one incident angle they impose one complex wavefront and under another angle they impose a different independent wavefront. The demonstrated reflective devices use amorphous-silicon U-shaped meta-atoms on a square lattice of 38 nm, above a spacer and aluminum mirror, and are optimized at 39 nm for TE polarization. Full-wave simulation matches target phase pairs by minimizing
40
A grating demonstration produced 41 deflection under 42 incidence and 43 under 44 incidence, with measured deflection efficiencies of 45 and 46 relative to a flat Al mirror. A 47 mm 48 49 mm hologram projected a Caltech logo at 50 and an LMI logo at 51, with a continuous scan showing the image morphing between the two holograms (1711.02265).
In atomic metrology, angle information can also be encoded in intrinsic sensor observables rather than prepared as an input state. In the Bell–Bloom all-optical scalar atomic magnetometer, the polar angle 52 between the magnetic field and the probe beam is inferred from the DC probe transmission
53
while a frequency-modulated probe induces a light-shift channel
54
With a measurement time of 55 ms, the reported polar-angle sensitivity is better than 56 at optimal orientation, and the accuracy is better than 57 over most of the 58 to 59 range; with two orthogonal sensors, azimuthal angle measurement is also exhibited (Zhang et al., 2020).
System constraints matter even when angle encoding is algorithmically simple. Hybriqu Encoder isolates the classical stage that converts features to rotation angles, using the mapping 60 for angle encoding with 61 gates and a Rust SIMD kernel that processes four double-precision rotations at once on AVX-class lanes. On Apple Silicon, pure angle encoding is reported as 62 faster at 63 qubits, and end-to-end Python-versus-Rust batching gave speedups from about 64 at batch size 65 to roughly 66 to 67 at batch size 68. The same work emphasizes that kernels applying rotations to the entire state vector become memory-bound, so SIMD improves the compute-bound encoding stage more than the subsequent full state update (Syah et al., 7 Apr 2026).
Several open problems recur across these fields. In QAE-based integration, the upper bound 69 is tight at 70, but tightness for 71 remains open (Chinesta et al., 27 Apr 2026). In generalized RoPE, stricter or weaker alternatives to pairwise commutativity remain to be characterized (Yu et al., 4 Jun 2025). In directional encodings, the trade-off between spherical fidelity, hash collisions, and runtime is still being optimized (Weier et al., 5 Mar 2026). In quantum machine learning, angle encoding remains the default robust choice on NISQ hardware, but its periodicity, feature collisions, and qubit scaling continue to motivate dense-angle, re-uploaded, hybrid, and temporally augmented variants (Sammartino, 3 Jun 2026).
Angle encoding is therefore best understood not as a single method but as a recurrent design principle: using angular degrees of freedom to exploit periodicity, relative-position symmetries, rotation invariance, manifold structure, or hardware-native control. Its effectiveness depends less on the presence of an angle than on whether the induced angular algebra matches the geometry and cost model of the task.