QGI-dev/q-prime-demo
0
Q-Prime Demo
Live playground for the QGI Q-Prime quantum-structured embedding model.
Paste two policy clauses, hit Compare, and the demo hits QGI's managed API to return:
- Relevance — which clause applies.
- Conflict (signed) — the interference signal $\mathrm{polarity}(a,b)\cdot\langle a\,|\,b\rangle$. Positive means reinforcement; negative means contradiction.
- Overlap — the same inner product without the polarity sign.
- Predicate extraction — condition components.
- Born-rule classifier — $\arg\max_c |\langle c\,|\,\psi\rangle|^2$ against a small default label set (you can edit the labels).
This Space calls the Q-Prime API and does not run any model locally. A valid QGI_API_KEY must be set as a Space Secret by QGI staff; community forks will see a waitlist page.
How it works
- You type two clauses (and optionally a set of zero-shot labels).
- The Space calls
POST https://api.qgi.dev/v1/qprime/embedwithtasks=[relevance,conflict,overlap,predicate,classify]. - The returned signals are rendered as coloured signed-similarity meters.
Rate limits
Demo is rate-limited per browser session. For programmatic use, request an evaluation API key via the Request access button on the Q-Prime model card.
Run locally (QGI staff only)
export QGI_API_KEY=sk-... # evaluation or staff key
export QGI_API_URL=https://api.qgi.dev/v1/qprime/embed
pip install -r requirements.txt
python app.pyLicense
Demo code: MIT. Q-Prime model: QGI Commercial Model License v1.0.
Contact
contact@qgi.dev · qgi.dev
