Quantum word embeddings
Can today's word embeddings survive the trip into a quantum computer? In Old Wine in New Bottles: Using Classical Word Embeddings in Gate-Based Quantum NLP Systems (Cavar, Parukola, Graves & Sparks, Indiana University, 2025), we showed that n-dimensional embeddings can be packed into just log2(n) qubits — or log2(n/2) by folding pairs of dimensions into complex amplitudes — and that word similarity survives the encoding nearly intact. This page runs that pipeline live in your browser, then lets you explore the actual experimental data.
The pipeline, live
state |a⟩ — one pixel per amplitude (sign as color when real; phase as hue when complex):
state |b⟩:
every measurement is one pixel — ancilla 0 in cyan, 1 in amber:
the estimate converging on the exact fidelity (cyan line), with its shrinking 95% interval:
The research data
The paper's experiments: 666 noun pairs from SimLex-999, embedded with GPT and VoyageAI models, amplitude-encoded, and measured with SWAP tests on a quantum simulator. Every point below is one word pair from those runs.
Notes
- Live embeddings use small in-browser models; the paper's experiments used GPT and VoyageAI embeddings via API. The 2026 state-of-the-art on-device embedding models (EmbeddingGemma-300m, Qwen3-Embedding) ship weights as single files far above the 25 MiB per-file limit of this site's host — the two models offered here are the strongest that physics and static hosting allow.
- Complex encodings halve the qubit count and state-preparation gates — the paper's central practical argument. Toggle the encoding above and watch the amplitude count and qubit readouts change.
- Based on joint work with Damir Cavar, Koushik Reddy Parukola, and James Bryan Graves (Indiana University); supported by the Center for Quantum Technologies (NSF #2224928). Code and data: NLQK.