Lightweight Python client for QIntent, the native intent language powered by QDSV.
Project description
qdsv-qintent
Lightweight Python client for QIntent, the native intent language powered by QDSV.
QIntent lets you write declarative computational intent over state spaces, rows, predicates, ranking, and sampling without installing the QDSV runtime locally.
pip install qdsv-qintent
Developer Preview: the package is a client SDK. It does not include QDSV Runtime, CAP, QuEST, Aer, IBM adapters, lowering, noise mitigation internals, or crypto internals.
Quick Start
from qintent import QIntentClient
client = QIntentClient()
rows = [
{"candidate_index": 0, "score": 720, "risk_ok": True},
{"candidate_index": 1, "score": 910, "risk_ok": True},
{"candidate_index": 2, "score": 840, "risk_ok": False},
]
result = client.run(
'find_rows("candidate_index").where("score", ">=", 850).rank_by("score").top_k(5)',
rows=rows,
)
print(result["status"])
print(result["result"]["selected_rows"])
Python-like QIntent
source = """
x = domain(0, 15)
score = clip(round(max(x["score"], 0)), 0, 1000)
find(x).where(all([700 <= score <= 950, x not in [0, 1]])).rank_by(score).top_k(3)
"""
compiled = client.compile(source)
print(compiled["compiled_summary"])
Supported preview patterns include:
find_rows(...).where(...)find_rows(...).where_between(...)find_rows(...).where_all(...)find_rows(...).where_any(...)find_rows(...).rank_by(...).top_k(...)domain(...), range(...), find(...).where(...)field(variable, column)androw["column"]not,in,not in, chained comparisonsall([...]),any([...])abs(...),round(...),min(...),max(...),clip(...)
Methods
client.spec()
client.examples()
client.validate(source, rows=None, backend="logical")
client.compile(source, rows=None, backend="logical")
client.run(source, rows=None, backend="logical")
For a local Docker/private demo API:
client = QIntentClient.local()
CLI
qintent spec
qintent examples
qintent compile 'x = domain(0, 15); find(x).where(x in [3, 6, 9])'
qintent run 'find_rows("candidate_index").where("score", ">=", 850)' --rows candidates.csv
Environment variables:
QINTENT_API_URL=https://api.qdsv.cloud/api
QINTENT_API_KEY=...
QDSV_LICENSE_KEY=...
Public Preview Limits
The public preview intentionally exposes a stable subset. Advanced QDSV families such as crypto, sensing, AI semantic operations, hardware routing, and mitigation internals may compile or run only through Qruba full platform endpoints depending on your license.
Write QIntent locally. Execute on QDSV.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qdsv_qintent-0.1.1.tar.gz.
File metadata
- Download URL: qdsv_qintent-0.1.1.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8eff2108a92c762aa507d9220de65e7a9d27a5a40fd3cf2f08e8aa4ceb7936ae
|
|
| MD5 |
d09a1032a692fb7e4157daca54972cc6
|
|
| BLAKE2b-256 |
fa6c3166ece3d2340ef62edaa9c56c8fde811a15568a1121cf2ab5e20ec3c47f
|
File details
Details for the file qdsv_qintent-0.1.1-py3-none-any.whl.
File metadata
- Download URL: qdsv_qintent-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f3fb3e2e8adb78489e13a05e2ccccab7243dbdc1837e7308207bed691f816033
|
|
| MD5 |
8d153cd4fe08a7211686acbc74e585d9
|
|
| BLAKE2b-256 |
7523f53d7284671c2237c78c67a17e1aeb1b622b7a6134ad7777ced70a0350aa
|