API Reference

exception qintent.QIntentAPIError

Bases: QIntentError

Raised when a transport error prevents calling the API.

class qintent.QIntentClient(api_url: str | None = None, api_key: str | None = None, *, timeout: float = 30.0, license_key: str | None = None, sdk_name: str = 'qdsv-qintent')

Bases: object

Lightweight client for QIntent public API endpoints.

The SDK does not embed the QDSV runtime. It sends QIntent source to a QDSV API and returns the compiled or executed response.

cancel_hardware_job(job_id: str, *, reason: str = 'user_requested_from_sdk') dict[str, Any]
capabilities() dict[str, Any]

Return the canonical operation and ScoreModel capability contract.

compile(source: str, *, rows: Sequence[Mapping[str, Any]] | None = None, backend: str = 'quest', backend_mode: str | None = None, shots: int = 256) dict[str, Any]
compile_hardware(source: str, *, rows: Sequence[Mapping[str, Any]] | None = None) dict[str, Any]

Compile QIntent for IBM hardware without submitting a job.

examples() list[dict[str, Any]]
execute(source: str, *, rows: Sequence[Mapping[str, Any]] | None = None, backend: str = 'quest', backend_mode: str | None = None, shots: int = 256) dict[str, Any]
explain(source: str, *, rows: Sequence[Mapping[str, Any]] | None = None, backend: str = 'quest', backend_mode: str | None = None, shots: int = 256) dict[str, Any]

Return a Semantic Execution Passport for the declared QIntent source.

hardware_job(job_id: str, *, live_poll: bool = True) dict[str, Any]

Return the current state and public evidence for a submitted job.

classmethod local(*, api_url: str = 'http://localhost:18080/api', api_key: str | None = None, timeout: float = 30.0, license_key: str | None = None) QIntentClient

Create a client for the local Docker/private demo API.

static read_csv(path: str | Path) list[dict[str, Any]]
run(source: str, *, rows: Sequence[Mapping[str, Any]] | None = None, backend: str = 'quest', backend_mode: str | None = None, shots: int = 256) dict[str, Any]
spec() dict[str, Any]
submit_hardware(source: str, *, rows: Sequence[Mapping[str, Any]] | None = None, backend_name: str = 'least_busy', instance: str | None = None, shots: int = 1024, mode: str = 'amplified_oracle', optimization_level: int = 1) dict[str, Any]

Preflight and submit the same canonical QIntent program to IBM.

validate(source: str, *, rows: Sequence[Mapping[str, Any]] | None = None, backend: str = 'quest', backend_mode: str | None = None, shots: int = 256) dict[str, Any]
exception qintent.QIntentError

Bases: Exception

Base exception for the QIntent SDK.

exception qintent.QIntentHTTPError(status_code: int, payload: Any)

Bases: QIntentError

Raised when the API returns an HTTP error response.

Client

class qintent.client.QIntentClient(api_url: str | None = None, api_key: str | None = None, *, timeout: float = 30.0, license_key: str | None = None, sdk_name: str = 'qdsv-qintent')

Bases: object

Lightweight client for QIntent public API endpoints.

The SDK does not embed the QDSV runtime. It sends QIntent source to a QDSV API and returns the compiled or executed response.

cancel_hardware_job(job_id: str, *, reason: str = 'user_requested_from_sdk') dict[str, Any]
capabilities() dict[str, Any]

Return the canonical operation and ScoreModel capability contract.

compile(source: str, *, rows: Sequence[Mapping[str, Any]] | None = None, backend: str = 'quest', backend_mode: str | None = None, shots: int = 256) dict[str, Any]
compile_hardware(source: str, *, rows: Sequence[Mapping[str, Any]] | None = None) dict[str, Any]

Compile QIntent for IBM hardware without submitting a job.

examples() list[dict[str, Any]]
execute(source: str, *, rows: Sequence[Mapping[str, Any]] | None = None, backend: str = 'quest', backend_mode: str | None = None, shots: int = 256) dict[str, Any]
explain(source: str, *, rows: Sequence[Mapping[str, Any]] | None = None, backend: str = 'quest', backend_mode: str | None = None, shots: int = 256) dict[str, Any]

Return a Semantic Execution Passport for the declared QIntent source.

hardware_job(job_id: str, *, live_poll: bool = True) dict[str, Any]

Return the current state and public evidence for a submitted job.

classmethod local(*, api_url: str = 'http://localhost:18080/api', api_key: str | None = None, timeout: float = 30.0, license_key: str | None = None) QIntentClient

Create a client for the local Docker/private demo API.

static read_csv(path: str | Path) list[dict[str, Any]]
run(source: str, *, rows: Sequence[Mapping[str, Any]] | None = None, backend: str = 'quest', backend_mode: str | None = None, shots: int = 256) dict[str, Any]
spec() dict[str, Any]
submit_hardware(source: str, *, rows: Sequence[Mapping[str, Any]] | None = None, backend_name: str = 'least_busy', instance: str | None = None, shots: int = 1024, mode: str = 'amplified_oracle', optimization_level: int = 1) dict[str, Any]

Preflight and submit the same canonical QIntent program to IBM.

validate(source: str, *, rows: Sequence[Mapping[str, Any]] | None = None, backend: str = 'quest', backend_mode: str | None = None, shots: int = 256) dict[str, Any]