Skip to main content
Glama
LuuOW

qrouter

by LuuOW

qrouter

Quantum natural-language retrieval for scientific knowledge.

A research artifact: route queries to relevant text by encoding both as quantum states (DisCoCat tensor diagrams compiled to variational circuits) and ranking via Born-rule overlap. Classically simulable now; designed to also run on Quantinuum H-series and (with embedding) Xanadu photonic processors.

Live demo: https://qrouter.ask-meridian.uk

$ curl 'https://qrouter.ask-meridian.uk/rank?q=photons+going+through+barriers&top_k=3'

See docs/deploy.md for the hosting architecture (systemd + Cloudflare Tunnel on a shared VM) and how to flip the server between stub and lambeq backends.

Status

Working name. Day-1 scaffold. Not a product. Not stable. Not even opinionated yet.

What this is and is not

Is: an experiment in whether compositional quantum-semantic structure (à la Coecke et al.) gives meaningfully different retrieval behavior than classical dense embeddings — particularly on small corpora where the geometric structure matters more than scale.

Is not: a faster retriever, a better embedder, or anything you should use in production. Quantum circuit simulation is slower than cosine(a, b) on classical hardware. The point is whether the structure matters, not whether it's fast.

Stack

  • Python 3.12+

  • lambeq — DisCoCat parsing + circuit compilation

  • PennyLane — variational quantum circuits + autodiff

  • JAX — gradients (lambeq supports this backend)

  • pytest, ruff

  • uv for env management

First-week plan

  1. Day 1-2: read Coecke "Mathematical Foundations of QNLP" (2020) + Lorenz et al. "QNLP in Practice" (2023). Run lambeq's MNIST tutorial.

  2. Day 3-4: 50 arXiv quant-ph abstracts → DisCoCat parses → simulated circuits → pairwise Born-rule overlap → toy retrieval demo.

  3. Day 5-6: wire to MCP stdio so qrouter is callable from Claude / Cursor / Windsurf as a tool.

  4. Day 7: decide — go deeper into pure QNLP, or branch toward photonic reservoir front-end.

References

  • Coecke, B., de Felice, G., Meichanetzidis, K., Toumi, A. (2020). Foundations for Near-Term Quantum Natural Language Processing.

  • Lorenz, R., Pearson, A., Meichanetzidis, K., Kartsaklis, D., Coecke, B. (2023). QNLP in Practice: Running Compositional Models of Meaning on a Quantum Computer. JAIR 76.

  • Quantinuum lambeq: https://github.com/CQCL/lambeq

License

MIT (see LICENSE).

A
license - permissive license
-
quality - not tested
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/LuuOW/qrouter'

If you have feedback or need assistance with the MCP directory API, please join our Discord server