Each word becomes a squeezing + displacement on a bosonic mode, then a beam-splitter mixes them. Ranking is closed-form Gaussian-state fidelity (Banchi-Braunstein-Pirandola).
phase-space (q, p) → Wigner quasi-probability · drag to rotate · the same gates run on the HF Space
what is this?
photon-route is a research artifact exploring whether semantic retrieval can run in the continuous-variable (CV) photonic regime — the regime that real photonic hardware (Xanadu Borealis, fiber-loop reservoirs, coherent Ising machines) actually operates in.
Each document is encoded as a Gaussian state over N bosonic modes via a Strawberry Fields program: words contribute squeezing and displacement operations, then a beam-splitter network mixes the modes. Query and document fidelity is computed in closed form using the thewalrus implementation of the Banchi-Braunstein-Pirandola formula.
Three swappable encoders share the same fidelity scoring. v1 uses Strawberry Fields to run an N-mode Gaussian program with SHA-256-derived parameters. sha_init is a pure-numpy port of the same gates (no SF at deploy time). trained swaps the SHA-256 lookup for a learned table fit by InfoNCE + Bhattacharyya-coefficient surrogate fidelity on a small arXiv quant-ph eval set. Toggle compare to see the three side by side.
Source · github.com/LuuOW/photon-route