qbraid-core 0.3.3__tar.gz → 0.3.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {qbraid_core-0.3.3/qbraid_core.egg-info → qbraid_core-0.3.4}/PKG-INFO +1 -1
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/pyproject.toml +1 -1
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/runtime/client.py +12 -1
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/runtime/schemas/__init__.py +6 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/runtime/schemas/device.py +38 -1
- {qbraid_core-0.3.3 → qbraid_core-0.3.4/qbraid_core.egg-info}/PKG-INFO +1 -1
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/LICENSE +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/MANIFEST.in +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/README.md +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/docs/_static/favicon.ico +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/docs/_static/logo.png +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/docs/api/qbraid_core.rst +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/docs/api/qbraid_core.services.rst +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/docs/conf.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/docs/index.rst +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/__init__.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/_build_info.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/_compat.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/_import.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/_version.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/annotations.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/client.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/config.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/context.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/decimal.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/diagnostics/__init__.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/diagnostics/auth.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/diagnostics/config.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/diagnostics/environments.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/diagnostics/jupyterlab.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/diagnostics/models.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/diagnostics/network.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/diagnostics/runner.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/diagnostics/system.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/exceptions.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/py.typed +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/registry.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/retry.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/__init__.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/agents/__init__.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/agents/client.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/agents/constants.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/agents/discovery.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/agents/exceptions.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/agents/hooks.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/agents/launcher.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/agents/messaging.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/agents/opencode_api.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/agents/permission_hook.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/agents/permissions.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/agents/registry.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/agents/schemas.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/agents/transcripts.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/agents/types.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/compute/__init__.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/compute/client.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/compute/exceptions.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/compute/schemas.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/compute/ssh.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/environments/__init__.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/environments/client.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/environments/create.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/environments/exceptions.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/environments/kernels.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/environments/magic.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/environments/packages.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/environments/paths.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/environments/preflight.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/environments/python.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/environments/registry.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/environments/schema.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/environments/state.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/environments/sync_progress.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/environments/utils/__init__.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/environments/validate.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/environments/venv.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/projects/__init__.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/projects/client.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/projects/exceptions.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/quantum/__init__.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/quantum/runner.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/runtime/__init__.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/runtime/exceptions.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/runtime/schemas/enums.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/runtime/schemas/group.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/runtime/schemas/job.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/runtime/schemas/result.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/skills/__init__.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/skills/client.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/skills/exceptions.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/skills/schemas.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/storage/__init__.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/storage/disk_usage_client.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/storage/exceptions.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/services/storage/types.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/sessions.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/system/__init__.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/system/exceptions.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/system/executables.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/system/filemanager.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/system/generic.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/system/magic/__init__.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/system/magic/manager.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/system/magic/qbraid_magic.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/system/packages.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core/system/versions.py +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core.egg-info/SOURCES.txt +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core.egg-info/dependency_links.txt +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core.egg-info/requires.txt +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/qbraid_core.egg-info/top_level.txt +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/setup.cfg +0 -0
- {qbraid_core-0.3.3 → qbraid_core-0.3.4}/tests/test_mypy_call_arg_validation.py +0 -0
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "qbraid-core"
|
|
7
|
-
version = "0.3.
|
|
7
|
+
version = "0.3.4"
|
|
8
8
|
authors = [{name = "qBraid Development Team"}, {email = "contact@qbraid.com"}]
|
|
9
9
|
description = "Python library with core abstractions for software development in the qBraid ecosystem."
|
|
10
10
|
readme = "README.md"
|
|
@@ -15,7 +15,7 @@ from qbraid_core.exceptions import RequestsApiError
|
|
|
15
15
|
from qbraid_core.registry import register_client
|
|
16
16
|
|
|
17
17
|
from .exceptions import QuantumRuntimeServiceRequestError
|
|
18
|
-
from .schemas.device import PlatformDevice, RuntimeDevice, RuntimeProvider
|
|
18
|
+
from .schemas.device import DeviceCalibration, PlatformDevice, RuntimeDevice, RuntimeProvider
|
|
19
19
|
from .schemas.group import GroupJob
|
|
20
20
|
from .schemas.job import (
|
|
21
21
|
JobRequest,
|
|
@@ -313,6 +313,17 @@ class QuantumRuntimeClient(QbraidClientV1):
|
|
|
313
313
|
f"Failed to retrieve device '{device_qrn}': {err}"
|
|
314
314
|
) from err
|
|
315
315
|
|
|
316
|
+
def get_device_calibrations(self, device_qrn: str) -> Optional[DeviceCalibration]:
|
|
317
|
+
"""Returns calibration data for a device, or None if unavailable."""
|
|
318
|
+
try:
|
|
319
|
+
response = self.session.get(f"/devices/{device_qrn}/calibrations")
|
|
320
|
+
resp_data = response.json().get("data")
|
|
321
|
+
if resp_data is None:
|
|
322
|
+
return None
|
|
323
|
+
return DeviceCalibration.model_validate(resp_data)
|
|
324
|
+
except RequestsApiError:
|
|
325
|
+
return None
|
|
326
|
+
|
|
316
327
|
def create_job(self, request: JobRequest) -> RuntimeJob:
|
|
317
328
|
"""Submits a new quantum job."""
|
|
318
329
|
try:
|
|
@@ -6,10 +6,13 @@ Pydantic schemas for the qBraid Runtime API.
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
from .device import (
|
|
9
|
+
DeviceCalibration,
|
|
9
10
|
DevicePricing,
|
|
10
11
|
DeviceVerification,
|
|
12
|
+
EdgeEntry,
|
|
11
13
|
PlatformDevice,
|
|
12
14
|
ProviderLogo,
|
|
15
|
+
QubitCalibration,
|
|
13
16
|
RuntimeDevice,
|
|
14
17
|
RuntimeProvider,
|
|
15
18
|
)
|
|
@@ -32,10 +35,13 @@ from .result import BatchResult, Result
|
|
|
32
35
|
__all__ = [
|
|
33
36
|
"GroupJob",
|
|
34
37
|
"GroupStatus",
|
|
38
|
+
"DeviceCalibration",
|
|
35
39
|
"DevicePricing",
|
|
36
40
|
"DeviceVerification",
|
|
41
|
+
"EdgeEntry",
|
|
37
42
|
"PlatformDevice",
|
|
38
43
|
"ProviderLogo",
|
|
44
|
+
"QubitCalibration",
|
|
39
45
|
"RuntimeDevice",
|
|
40
46
|
"RuntimeProvider",
|
|
41
47
|
"DeviceStatus",
|
|
@@ -12,7 +12,7 @@ from decimal import Decimal
|
|
|
12
12
|
from enum import Enum
|
|
13
13
|
from typing import TYPE_CHECKING, Any, Literal, Optional, Union
|
|
14
14
|
|
|
15
|
-
from pydantic import BaseModel, ConfigDict, field_serializer, field_validator
|
|
15
|
+
from pydantic import BaseModel, ConfigDict, Field, field_serializer, field_validator
|
|
16
16
|
|
|
17
17
|
from qbraid_core.decimal import Credits
|
|
18
18
|
|
|
@@ -118,6 +118,7 @@ class RuntimeDevice(BaseModel):
|
|
|
118
118
|
pricing: Optional[DevicePricing] = None # only applies to fixed pricing model
|
|
119
119
|
directAccess: bool = True
|
|
120
120
|
batchJobSupport: bool = False
|
|
121
|
+
topology: Optional[dict[str, Any]] = None
|
|
121
122
|
|
|
122
123
|
|
|
123
124
|
class DeviceVerification(Enum):
|
|
@@ -182,3 +183,39 @@ class RuntimeProvider(BaseModel):
|
|
|
182
183
|
devices: list[str] = []
|
|
183
184
|
logo: Optional[ProviderLogo] = None
|
|
184
185
|
qrn: Optional[str] = None
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
class EdgeEntry(BaseModel):
|
|
189
|
+
"""Single two-qubit gate calibration measurement."""
|
|
190
|
+
|
|
191
|
+
model_config = ConfigDict(extra="ignore")
|
|
192
|
+
|
|
193
|
+
source: int
|
|
194
|
+
target: int
|
|
195
|
+
value: float
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
class QubitCalibration(BaseModel):
|
|
199
|
+
"""Per-qubit calibration metrics."""
|
|
200
|
+
|
|
201
|
+
model_config = ConfigDict(extra="ignore", populate_by_name=True)
|
|
202
|
+
|
|
203
|
+
t1: Optional[float] = None
|
|
204
|
+
t2: Optional[float] = None
|
|
205
|
+
frequency: Optional[float] = None
|
|
206
|
+
readout_error: Optional[float] = Field(None, alias="readoutError")
|
|
207
|
+
gate_error: Optional[dict[str, float]] = Field(None, alias="gateError")
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
class DeviceCalibration(BaseModel):
|
|
211
|
+
"""Device calibration snapshot."""
|
|
212
|
+
|
|
213
|
+
model_config = ConfigDict(extra="ignore", populate_by_name=True)
|
|
214
|
+
|
|
215
|
+
physical_device_id: str = Field(alias="physicalDeviceId")
|
|
216
|
+
device_qrns: list[str] = Field(alias="deviceQRNs")
|
|
217
|
+
provider: str
|
|
218
|
+
last_calibrated: str = Field(alias="lastCalibrated")
|
|
219
|
+
fetched_at: str = Field(alias="fetchedAt")
|
|
220
|
+
qubits: dict[str, QubitCalibration]
|
|
221
|
+
edges: dict[str, dict[str, list[EdgeEntry]]]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|