Skip to content

Add Swift/Metal SL(2,C) LCT spatial visualizer for visionOS - #2

Merged
alok merged 9 commits into
mainfrom
codex/alok-781-lct-spatial
Jul 23, 2026
Merged

Add Swift/Metal SL(2,C) LCT spatial visualizer for visionOS#2
alok merged 9 commits into
mainfrom
codex/alok-781-lct-spatial

Conversation

@alok

@alok alok commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a reusable Swift package and an Apple Vision Pro app for interactively exploring SL(2,C) linear canonical transforms by direct manipulation — the spatial companion to the Python lct-activation study.

  • LCTSpatial (product 1): Complex32, arbitrary-rank ComplexField with a separable CPU reference LCT (including the centered finite-grid b = 0 branch √d·exp(iπcd·y²/n)·f(dy)), SL2CMatrix + SL2CConstraint (determinant lock with automatic pivot away from ill-conditioned denominators), mesh geometry, OBJ import, surface voxelization, and Atlas-style phase coloring (hue = phase, luminance = magnitude).
  • LCTSpatialMetal (product 2): GPU separable complex-field transformer (regular and b = 0 kernels) and a LowLevelMesh-backed RealityKit canonical preview.
  • LCTVision (app): volumetric visionOS explorer — four Argand-pad scrub controls for a, b, c, d with an AUTO-solved dependent coefficient, presets (Identity/Fourier/FrFT/Fresnel/Complex Lens), FrFT orbit animation, 42 ms-debounced true-field transforms, OBJ import, and side-by-side canonical preview vs. true sampled-field spectral cloud.
  • Root Package.swift makes the repo consumable as a Swift package.
  • Genuinely complex d with b = 0 is explicitly refused rather than silently projected — sampling f(dy) off the real grid would invent a contour.

Verification

  • swift test from repo root: 10/10 pass (CPU/Metal parity on FrFT and singular branches within 3e-4, determinant lock + pivot, Fourier impulse, OBJ voxelization).
  • uv run pytest: 162 passed, 3 skipped (Python side untouched; change is purely additive, +2.8k lines).
  • CI green on this branch.
  • visionOS 26.5 simulator: built, installed, launched, and visually inspected (see docs/guides walkthrough).

Companion guide

docs/guides/visionos-spatial-visualizer-dev-guide.md — an 8,900-word hand-build guide (math background from SL(2,R) metaplectic theory to the SL(2,C) boundary, every component with file:line citations, numerical-stability constants, all 10 tests, build/consume instructions).

Tracked in Linear: ALOK-781 (visualizer, Done), ALOK-808 (BayLearn 2026 abstract).

🤖 Generated with Claude Code

alok and others added 9 commits July 13, 2026 20:08
…lizer

8,900-word companion to the codex/alok-781-lct-spatial branch: SL(2,R)->SL(2,C)
background, the b=0 finite-grid branch, component-by-component walkthrough of
LCTSpatial/LCTSpatialMetal/LCTVision with file:line citations, numerical
stability constants, all 10 tests, and build/consumption instructions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Anonymized 2-page NeurIPS-2023-format abstract of the pre-registered LCT-layer
study: structure beats rank-1 factorization at matched parameters, buys
wall-clock at width >=1024, and never beats a matched narrower dense trunk;
the five-harness-bug audit is the methodology contribution. Deadline
2026-07-30 via CMT; tracked as Linear ALOK-808.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@alok
alok merged commit 8009254 into main Jul 23, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant