qbraid-core 0.3.1__tar.gz → 0.3.2__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.1/qbraid_core.egg-info → qbraid_core-0.3.2}/PKG-INFO +1 -1
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/pyproject.toml +1 -1
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/runtime/client.py +5 -6
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/runtime/schemas/__init__.py +2 -1
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/runtime/schemas/result.py +9 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2/qbraid_core.egg-info}/PKG-INFO +1 -1
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/LICENSE +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/MANIFEST.in +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/README.md +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/docs/_static/favicon.ico +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/docs/_static/logo.png +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/docs/api/qbraid_core.rst +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/docs/api/qbraid_core.services.rst +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/docs/conf.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/docs/index.rst +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/__init__.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/_build_info.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/_compat.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/_import.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/_version.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/annotations.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/client.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/config.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/context.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/decimal.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/diagnostics/__init__.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/diagnostics/auth.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/diagnostics/config.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/diagnostics/environments.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/diagnostics/jupyterlab.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/diagnostics/models.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/diagnostics/network.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/diagnostics/runner.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/diagnostics/system.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/exceptions.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/py.typed +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/registry.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/retry.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/__init__.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/agents/__init__.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/agents/client.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/agents/constants.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/agents/discovery.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/agents/exceptions.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/agents/hooks.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/agents/launcher.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/agents/messaging.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/agents/opencode_api.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/agents/permission_hook.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/agents/permissions.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/agents/registry.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/agents/schemas.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/agents/transcripts.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/agents/types.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/compute/__init__.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/compute/client.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/compute/exceptions.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/compute/schemas.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/compute/ssh.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/environments/__init__.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/environments/client.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/environments/create.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/environments/exceptions.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/environments/kernels.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/environments/magic.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/environments/packages.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/environments/paths.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/environments/preflight.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/environments/python.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/environments/registry.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/environments/schema.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/environments/state.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/environments/sync_progress.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/environments/utils/__init__.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/environments/validate.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/environments/venv.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/projects/__init__.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/projects/client.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/projects/exceptions.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/quantum/__init__.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/quantum/runner.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/runtime/__init__.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/runtime/exceptions.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/runtime/schemas/device.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/runtime/schemas/enums.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/runtime/schemas/group.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/runtime/schemas/job.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/skills/__init__.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/skills/client.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/skills/exceptions.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/skills/schemas.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/storage/__init__.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/storage/disk_usage_client.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/storage/exceptions.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/services/storage/types.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/sessions.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/system/__init__.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/system/exceptions.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/system/executables.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/system/filemanager.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/system/generic.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/system/magic/__init__.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/system/magic/manager.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/system/magic/qbraid_magic.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/system/packages.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core/system/versions.py +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core.egg-info/SOURCES.txt +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core.egg-info/dependency_links.txt +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core.egg-info/requires.txt +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/qbraid_core.egg-info/top_level.txt +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/setup.cfg +0 -0
- {qbraid_core-0.3.1 → qbraid_core-0.3.2}/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.2"
|
|
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"
|
|
@@ -25,7 +25,7 @@ from .schemas.job import (
|
|
|
25
25
|
Program,
|
|
26
26
|
RuntimeJob,
|
|
27
27
|
)
|
|
28
|
-
from .schemas.result import Result
|
|
28
|
+
from .schemas.result import BatchResult, Result
|
|
29
29
|
|
|
30
30
|
logger = logging.getLogger(__name__)
|
|
31
31
|
|
|
@@ -356,18 +356,17 @@ class QuantumRuntimeClient(QbraidClientV1):
|
|
|
356
356
|
except RequestsApiError as err:
|
|
357
357
|
raise QuantumRuntimeServiceRequestError(f"Failed to delete jobs: {err}") from err
|
|
358
358
|
|
|
359
|
-
def get_job_result(self, job_qrn: str) -> Result |
|
|
359
|
+
def get_job_result(self, job_qrn: str) -> Result | BatchResult:
|
|
360
360
|
"""Returns the results for a specific quantum job.
|
|
361
361
|
|
|
362
362
|
For single-circuit jobs, returns a single ``Result``.
|
|
363
|
-
For batch jobs (``numCircuits > 1``),
|
|
364
|
-
this method returns ``list[Result]``.
|
|
363
|
+
For batch jobs (``numCircuits > 1``), returns ``BatchResult``.
|
|
365
364
|
"""
|
|
366
365
|
try:
|
|
367
366
|
response = self.session.get(f"/jobs/{job_qrn}/result")
|
|
368
367
|
resp_data = response.json()["data"]
|
|
369
|
-
if isinstance(resp_data,
|
|
370
|
-
return
|
|
368
|
+
if isinstance(resp_data, dict) and "results" in resp_data:
|
|
369
|
+
return BatchResult.model_validate(resp_data)
|
|
371
370
|
return Result.model_validate(resp_data)
|
|
372
371
|
except RequestsApiError as err:
|
|
373
372
|
raise QuantumRuntimeServiceRequestError(
|
|
@@ -27,7 +27,7 @@ from .job import (
|
|
|
27
27
|
S3Destination,
|
|
28
28
|
TimeStamps,
|
|
29
29
|
)
|
|
30
|
-
from .result import Result
|
|
30
|
+
from .result import BatchResult, Result
|
|
31
31
|
|
|
32
32
|
__all__ = [
|
|
33
33
|
"GroupJob",
|
|
@@ -51,5 +51,6 @@ __all__ = [
|
|
|
51
51
|
"RuntimeJob",
|
|
52
52
|
"S3Destination",
|
|
53
53
|
"TimeStamps",
|
|
54
|
+
"BatchResult",
|
|
54
55
|
"Result",
|
|
55
56
|
]
|
|
@@ -24,3 +24,12 @@ class Result(BaseModel):
|
|
|
24
24
|
cost: Credits
|
|
25
25
|
timeStamps: TimeStamps
|
|
26
26
|
resultData: dict[str, Any]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class BatchResult(BaseModel):
|
|
30
|
+
"""Schema for batch job result containing per-circuit results."""
|
|
31
|
+
|
|
32
|
+
status: JobStatus
|
|
33
|
+
cost: Credits
|
|
34
|
+
timeStamps: TimeStamps
|
|
35
|
+
results: list[Result]
|
|
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
|