softqcos-sdk 3.7.0__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.
- softqcos_sdk-3.7.0/.gitignore +148 -0
- softqcos_sdk-3.7.0/PKG-INFO +210 -0
- softqcos_sdk-3.7.0/README.md +144 -0
- softqcos_sdk-3.7.0/pyproject.toml +97 -0
- softqcos_sdk-3.7.0/softqcos_sdk/__init__.py +105 -0
- softqcos_sdk-3.7.0/softqcos_sdk/_fern_transport.py +176 -0
- softqcos_sdk-3.7.0/softqcos_sdk/_transport.py +237 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/__init__.py +55 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/acos.py +51 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/admin.py +64 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/algorithms.py +420 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/autopilot.py +84 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/backends.py +141 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/batch.py +54 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/bench.py +59 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/billing.py +63 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/calibration.py +71 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/chemistry.py +101 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/circuits.py +56 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/coherence.py +46 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/dri.py +75 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/energy.py +90 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/evidence.py +60 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/glassbox.py +223 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/gpu_qpu.py +140 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/isolation.py +49 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/jobs.py +106 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/ledger.py +89 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/macro.py +40 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/marketplace.py +78 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/navcore.py +247 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/network.py +97 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/provider_hub.py +197 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/qec.py +95 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/qec_service.py +82 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/qlink.py +84 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/qubo.py +227 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/research.py +487 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/sandbox.py +97 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/session.py +64 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/use_cases.py +176 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/visualize.py +71 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/webhooks.py +70 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/workflow.py +51 -0
- softqcos_sdk-3.7.0/softqcos_sdk/api/zne.py +128 -0
- softqcos_sdk-3.7.0/softqcos_sdk/backends/__init__.py +17 -0
- softqcos_sdk-3.7.0/softqcos_sdk/backends/qcos_gpu.py +273 -0
- softqcos_sdk-3.7.0/softqcos_sdk/client.py +300 -0
- softqcos_sdk-3.7.0/softqcos_sdk/exceptions.py +62 -0
- softqcos_sdk-3.7.0/softqcos_sdk/frameworks/__init__.py +22 -0
- softqcos_sdk-3.7.0/softqcos_sdk/frameworks/braket_adapter.py +48 -0
- softqcos_sdk-3.7.0/softqcos_sdk/frameworks/cirq_adapter.py +47 -0
- softqcos_sdk-3.7.0/softqcos_sdk/frameworks/pennylane_adapter.py +48 -0
- softqcos_sdk-3.7.0/softqcos_sdk/frameworks/qiskit_adapter.py +77 -0
- softqcos_sdk-3.7.0/softqcos_sdk/frameworks/qsharp_adapter.py +44 -0
- softqcos_sdk-3.7.0/softqcos_sdk/licensing.py +556 -0
- softqcos_sdk-3.7.0/softqcos_sdk/models.py +163 -0
- softqcos_sdk-3.7.0/softqcos_sdk/py.typed +0 -0
- softqcos_sdk-3.7.0/softqcos_sdk/workflow_templates.py +144 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# =============================================================================
|
|
2
|
+
# QCOS .gitignore
|
|
3
|
+
# =============================================================================
|
|
4
|
+
|
|
5
|
+
# Environment (NEVER commit)
|
|
6
|
+
.env
|
|
7
|
+
.env.*
|
|
8
|
+
!.env.example
|
|
9
|
+
!.env.*.example
|
|
10
|
+
.env.local
|
|
11
|
+
.env.production
|
|
12
|
+
*.env
|
|
13
|
+
*.env.*
|
|
14
|
+
config/*.env
|
|
15
|
+
config/*.env.*
|
|
16
|
+
|
|
17
|
+
# AI context file (may contain local env references, use .ai-context.example instead)
|
|
18
|
+
.ai-context.md
|
|
19
|
+
|
|
20
|
+
# Python
|
|
21
|
+
__pycache__/
|
|
22
|
+
*.py[cod]
|
|
23
|
+
*$py.class
|
|
24
|
+
*.so
|
|
25
|
+
.Python
|
|
26
|
+
build/
|
|
27
|
+
develop-eggs/
|
|
28
|
+
build-output/
|
|
29
|
+
downloads/
|
|
30
|
+
eggs/
|
|
31
|
+
.eggs/
|
|
32
|
+
lib/
|
|
33
|
+
lib64/
|
|
34
|
+
parts/
|
|
35
|
+
sdist/
|
|
36
|
+
var/
|
|
37
|
+
wheels/
|
|
38
|
+
*.egg-info/
|
|
39
|
+
.installed.cfg
|
|
40
|
+
*.egg
|
|
41
|
+
|
|
42
|
+
# Virtual environments
|
|
43
|
+
.venv/
|
|
44
|
+
venv/
|
|
45
|
+
ENV/
|
|
46
|
+
|
|
47
|
+
# IDE
|
|
48
|
+
.idea/
|
|
49
|
+
.vscode/
|
|
50
|
+
*.swp
|
|
51
|
+
*.swo
|
|
52
|
+
*~
|
|
53
|
+
|
|
54
|
+
# Testing
|
|
55
|
+
.pytest_cache/
|
|
56
|
+
.coverage
|
|
57
|
+
htmlcov/
|
|
58
|
+
.tox/
|
|
59
|
+
.nox/
|
|
60
|
+
|
|
61
|
+
# Jupyter
|
|
62
|
+
.ipynb_checkpoints/
|
|
63
|
+
|
|
64
|
+
# OS
|
|
65
|
+
.DS_Store
|
|
66
|
+
Thumbs.db
|
|
67
|
+
|
|
68
|
+
# Frontend/Node
|
|
69
|
+
.next/
|
|
70
|
+
node_modules/
|
|
71
|
+
.cache/
|
|
72
|
+
|
|
73
|
+
# Docker
|
|
74
|
+
docker/*.tar.gz
|
|
75
|
+
|
|
76
|
+
# Nuitka build artifacts
|
|
77
|
+
*.build/
|
|
78
|
+
*.dist/
|
|
79
|
+
*.onefile-build/
|
|
80
|
+
|
|
81
|
+
# Results and logs
|
|
82
|
+
results/
|
|
83
|
+
logs/
|
|
84
|
+
*.log
|
|
85
|
+
*.jsonl
|
|
86
|
+
data/logs/
|
|
87
|
+
reports/
|
|
88
|
+
|
|
89
|
+
# Compiled binaries
|
|
90
|
+
softqcos-worker
|
|
91
|
+
softqcos-api
|
|
92
|
+
|
|
93
|
+
# Secrets
|
|
94
|
+
secrets/
|
|
95
|
+
config/licensing/bootstrap_keys/.passphrase
|
|
96
|
+
ops/licensing/keys/
|
|
97
|
+
ops/deploy/azure/.env*
|
|
98
|
+
scripts/**/.env*
|
|
99
|
+
*.pem
|
|
100
|
+
*.key
|
|
101
|
+
*.p12
|
|
102
|
+
*.pfx
|
|
103
|
+
*.crt
|
|
104
|
+
*.cer
|
|
105
|
+
*.kubeconfig
|
|
106
|
+
|
|
107
|
+
# Notebooks checkpoints
|
|
108
|
+
.ipynb_checkpoints/
|
|
109
|
+
docs-site/node_modules/
|
|
110
|
+
docs-site/build/
|
|
111
|
+
docs-site/.docusaurus/
|
|
112
|
+
**/.terraform/*
|
|
113
|
+
quantumlock.db
|
|
114
|
+
|
|
115
|
+
# LUMI Worker secrets
|
|
116
|
+
.claude/worktrees/
|
|
117
|
+
|
|
118
|
+
# Fern OpenAPI export
|
|
119
|
+
openapi.json
|
|
120
|
+
|
|
121
|
+
# Build artifacts and dist files
|
|
122
|
+
dist_test/
|
|
123
|
+
dist/
|
|
124
|
+
dist_temp/
|
|
125
|
+
dist-raw-cp*/
|
|
126
|
+
build/
|
|
127
|
+
softqcos-cli/dist/
|
|
128
|
+
softqcos-sdk/dist/
|
|
129
|
+
softquantus/dist/
|
|
130
|
+
data/artifacts/
|
|
131
|
+
run1.txt
|
|
132
|
+
run2.txt
|
|
133
|
+
scratch/
|
|
134
|
+
|
|
135
|
+
# Local databases and third-party research drops
|
|
136
|
+
*.db
|
|
137
|
+
*.sqlite
|
|
138
|
+
*.sqlite3
|
|
139
|
+
*.db-shm
|
|
140
|
+
*.db-wal
|
|
141
|
+
vendor/
|
|
142
|
+
|
|
143
|
+
# Additional secrets and keys
|
|
144
|
+
keys/
|
|
145
|
+
**/*.pem
|
|
146
|
+
**/*.key
|
|
147
|
+
**/*.db
|
|
148
|
+
/dist/
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: softqcos-sdk
|
|
3
|
+
Version: 3.7.0
|
|
4
|
+
Summary: SoftQCOS™ SDK — Full-coverage Python client for the QCOS™ API Gateway
|
|
5
|
+
Project-URL: Homepage, https://softquantus.com
|
|
6
|
+
Project-URL: Documentation, https://docs.softquantus.com/sdk
|
|
7
|
+
Project-URL: Portal, https://platform.softquantus.com
|
|
8
|
+
Project-URL: License, https://softquantus.com/legal/license
|
|
9
|
+
Project-URL: EULA, https://softquantus.com/legal/eula
|
|
10
|
+
Author-email: SoftQuantus innovative OÜ <support@softquantus.com>
|
|
11
|
+
License: Proprietary - SoftQuantus innovative OÜ
|
|
12
|
+
Keywords: benchmarking,calibration,optimization,qcos,quantum,quantum-computing,sdk,softqcos
|
|
13
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: License :: Other/Proprietary License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
24
|
+
Classifier: Typing :: Typed
|
|
25
|
+
Requires-Python: >=3.10
|
|
26
|
+
Requires-Dist: httpx>=0.27.0
|
|
27
|
+
Requires-Dist: pydantic>=2.0.0
|
|
28
|
+
Provides-Extra: all
|
|
29
|
+
Requires-Dist: amazon-braket-sdk>=1.70.0; extra == 'all'
|
|
30
|
+
Requires-Dist: azure-quantum>=0.28.0; extra == 'all'
|
|
31
|
+
Requires-Dist: cirq>=1.3.0; extra == 'all'
|
|
32
|
+
Requires-Dist: pennylane>=0.34.0; extra == 'all'
|
|
33
|
+
Requires-Dist: qiskit-aer>=0.13.0; extra == 'all'
|
|
34
|
+
Requires-Dist: qiskit-ibm-runtime>=0.20.0; extra == 'all'
|
|
35
|
+
Requires-Dist: qiskit>=1.0.0; extra == 'all'
|
|
36
|
+
Provides-Extra: azure
|
|
37
|
+
Requires-Dist: azure-quantum>=0.28.0; extra == 'azure'
|
|
38
|
+
Provides-Extra: braket
|
|
39
|
+
Requires-Dist: amazon-braket-sdk>=1.70.0; extra == 'braket'
|
|
40
|
+
Provides-Extra: cirq
|
|
41
|
+
Requires-Dist: cirq>=1.3.0; extra == 'cirq'
|
|
42
|
+
Provides-Extra: cloud
|
|
43
|
+
Requires-Dist: amazon-braket-sdk>=1.70.0; extra == 'cloud'
|
|
44
|
+
Requires-Dist: azure-quantum>=0.28.0; extra == 'cloud'
|
|
45
|
+
Requires-Dist: qiskit-ibm-runtime>=0.20.0; extra == 'cloud'
|
|
46
|
+
Provides-Extra: dev
|
|
47
|
+
Requires-Dist: mypy>=1.8.0; extra == 'dev'
|
|
48
|
+
Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
|
|
49
|
+
Requires-Dist: pytest>=8.0.0; extra == 'dev'
|
|
50
|
+
Requires-Dist: respx>=0.22.0; extra == 'dev'
|
|
51
|
+
Requires-Dist: ruff>=0.3.0; extra == 'dev'
|
|
52
|
+
Provides-Extra: frameworks
|
|
53
|
+
Requires-Dist: cirq>=1.3.0; extra == 'frameworks'
|
|
54
|
+
Requires-Dist: pennylane>=0.34.0; extra == 'frameworks'
|
|
55
|
+
Requires-Dist: qiskit>=1.0.0; extra == 'frameworks'
|
|
56
|
+
Provides-Extra: ibm
|
|
57
|
+
Requires-Dist: qiskit-ibm-runtime>=0.20.0; extra == 'ibm'
|
|
58
|
+
Provides-Extra: pennylane
|
|
59
|
+
Requires-Dist: pennylane>=0.34.0; extra == 'pennylane'
|
|
60
|
+
Provides-Extra: qiskit
|
|
61
|
+
Requires-Dist: qiskit>=1.0.0; extra == 'qiskit'
|
|
62
|
+
Provides-Extra: simulation
|
|
63
|
+
Requires-Dist: qiskit-aer>=0.13.0; extra == 'simulation'
|
|
64
|
+
Requires-Dist: qiskit>=1.0.0; extra == 'simulation'
|
|
65
|
+
Description-Content-Type: text/markdown
|
|
66
|
+
|
|
67
|
+
# SoftQCOS™ SDK v3.5
|
|
68
|
+
|
|
69
|
+
> Typed, synchronous Python client for the **SoftQuantus QCOS™ API Gateway**.
|
|
70
|
+
> Covers the documented product surface; it is not a wrapper over every mounted route.
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pip install softqcos-sdk
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Quick Start
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
from softqcos_sdk import QCOSClient
|
|
80
|
+
|
|
81
|
+
client = QCOSClient(api_key="sk-...")
|
|
82
|
+
|
|
83
|
+
# Submit a quantum job
|
|
84
|
+
job = client.jobs.submit(qasm="OPENQASM 2.0; ...", shots=1024)
|
|
85
|
+
result = client.jobs.wait(job["job_id"])
|
|
86
|
+
print(result["result"]["counts"])
|
|
87
|
+
|
|
88
|
+
# Or use the blocking shortcut
|
|
89
|
+
result = client.jobs.execute(qasm="OPENQASM 2.0; ...", shots=1024)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Product APIs
|
|
93
|
+
|
|
94
|
+
| Property | Product | Prefix |
|
|
95
|
+
|---------------------|-------------------------|---------------------------|
|
|
96
|
+
| `client.jobs` | QCOS Jobs™ | `/v1/jobs/*` |
|
|
97
|
+
| `client.circuits` | QCOS Circuits™ | `/api/v1/circuits/*` |
|
|
98
|
+
| `client.bench` | QCOS Bench™ | `/api/v1/bench/*` |
|
|
99
|
+
| `client.calibration`| QCOS GlassBox™ | `/api/v1/glassbox/*` |
|
|
100
|
+
| `client.billing` | QCOS ROI Engine™ | `/api/v1/roi/*` |
|
|
101
|
+
| `client.network` | QCOS QuantumNet™ | `/api/v1/network/*` |
|
|
102
|
+
| `client.qec` | QCOS QEC Runtime™ | `/api/v1/qec/*` |
|
|
103
|
+
| `client.isolation` | QCOS ZoneGuard™ | `/api/v1/isolation/*` |
|
|
104
|
+
| `client.dri` | QCOS DRI™ | `/api/v1/dri/*` |
|
|
105
|
+
| `client.ledger` | QCOS QuantumLedger™ | `/api/v1/ledger/*` |
|
|
106
|
+
| `client.navcore` | QCOS NavCore™ | `/api/v1/navcore/*` |
|
|
107
|
+
| `client.acos` | ACOS-ISA™ | `/api/v1/acos/*` |
|
|
108
|
+
| `client.macro` | Quantum Macro™ | `/api/v1/macro/*` |
|
|
109
|
+
| ~~`client.admin`~~ | withdrawn 2026-07-28 | `/api/admin/*` returns 404 |
|
|
110
|
+
| `client.evidence` | QCOS Evidence™ | `/api/v1/runtime/jobs/{id}/artifacts/*` |
|
|
111
|
+
| `client.backends` | QCOS Backends™ | `/api/v1/backends/*` |
|
|
112
|
+
|
|
113
|
+
## Async Client
|
|
114
|
+
|
|
115
|
+
**Not available.** There is no `AsyncQCOSClient`; importing it raises `ImportError`. Every
|
|
116
|
+
method on `QCOSClient` is synchronous.
|
|
117
|
+
|
|
118
|
+
`QCOSClient` does define `__aenter__` / `__aexit__`, so `async with QCOSClient(...)` enters
|
|
119
|
+
without complaint — but the first `await client.jobs.submit(...)` fails, because `submit` is
|
|
120
|
+
not a coroutine. Do not rely on that context manager as evidence of async support.
|
|
121
|
+
|
|
122
|
+
Run the client in a thread if you need it off the event loop:
|
|
123
|
+
|
|
124
|
+
```python
|
|
125
|
+
import asyncio
|
|
126
|
+
from softqcos_sdk import QCOSClient
|
|
127
|
+
|
|
128
|
+
client = QCOSClient(api_key="sk-...")
|
|
129
|
+
result = await asyncio.to_thread(
|
|
130
|
+
client.jobs.execute, qasm="OPENQASM 2.0; ...", shots=1024
|
|
131
|
+
)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Configuration
|
|
135
|
+
|
|
136
|
+
| Environment Variable | Description | Default |
|
|
137
|
+
|---------------------|------------------------------------------|--------------------------------|
|
|
138
|
+
| `QCOS_API_KEY` | API key (required if not passed to ctor) | — |
|
|
139
|
+
| `QCOS_API_URL` | API gateway URL | `https://api.softquantus.com` |
|
|
140
|
+
|
|
141
|
+
## Examples
|
|
142
|
+
|
|
143
|
+
```python
|
|
144
|
+
# Calibration
|
|
145
|
+
devices = client.calibration.devices()
|
|
146
|
+
state = client.calibration.device_state("ibm_brisbane")
|
|
147
|
+
|
|
148
|
+
# Benchmarking
|
|
149
|
+
report = client.bench.run(backend="aer_simulator", suite="standard")
|
|
150
|
+
client.bench.verify(report["benchmark_id"])
|
|
151
|
+
|
|
152
|
+
# DRI — Device Reliability Index
|
|
153
|
+
dri = client.dri.run(backend="ibm_brisbane")
|
|
154
|
+
proof = client.dri.proof_run(backend="ibm_brisbane")
|
|
155
|
+
|
|
156
|
+
# Billing & ROI
|
|
157
|
+
estimate = client.billing.calculate(backend="ibm_brisbane", shots=10000)
|
|
158
|
+
plans = client.billing.plans()
|
|
159
|
+
|
|
160
|
+
# NavCore — GNSS/PNT
|
|
161
|
+
#
|
|
162
|
+
# Post-quantum signatures work: liboqs 0.16.0 is built into the API image, and
|
|
163
|
+
# navcore.algorithms() reports per scheme what the deployment can sign with.
|
|
164
|
+
# The keys are client-held — pqc_keypair returns the private key once, the
|
|
165
|
+
# server keeps no copy, and pqc_sign takes it back as a request field.
|
|
166
|
+
kp = client.navcore.pqc_keypair(algorithm="ml-dsa-65")
|
|
167
|
+
sig = client.navcore.pqc_sign(
|
|
168
|
+
message=b64_message, private_key=kp["private_key"], key_id=kp["key_id"]
|
|
169
|
+
)
|
|
170
|
+
ok = client.navcore.pqc_verify(
|
|
171
|
+
message=b64_message,
|
|
172
|
+
signature=sig["signature"],
|
|
173
|
+
public_key=kp["public_key"],
|
|
174
|
+
algorithm=sig["mechanism"], # the exact mechanism, matched exactly
|
|
175
|
+
)["valid"]
|
|
176
|
+
#
|
|
177
|
+
# Two calls were listed here that do not work against the deployed service and
|
|
178
|
+
# have been removed rather than left as examples:
|
|
179
|
+
# navcore.navigate(...) -> the route does not exist (404)
|
|
180
|
+
# navcore.qrng_bytes(...) -> 503, the QRNG backend is not configured
|
|
181
|
+
# The read-only NavCore endpoints under /api/v1/navcore/* respond normally.
|
|
182
|
+
|
|
183
|
+
# Network — Multi-QPU
|
|
184
|
+
topo = client.network.topology()
|
|
185
|
+
# network.teleport(...) is omitted deliberately: the endpoint accepts a request
|
|
186
|
+
# but does not complete a teleport against real nodes. Do not build on it yet.
|
|
187
|
+
|
|
188
|
+
# Error handling
|
|
189
|
+
from softqcos_sdk import QCOSError, AuthenticationError, RateLimitError
|
|
190
|
+
|
|
191
|
+
try:
|
|
192
|
+
result = client.jobs.submit(qasm="invalid")
|
|
193
|
+
except RateLimitError as e:
|
|
194
|
+
print(f"Rate limited — retry after {e.retry_after}s")
|
|
195
|
+
except AuthenticationError:
|
|
196
|
+
print("Invalid API key")
|
|
197
|
+
except QCOSError as e:
|
|
198
|
+
print(f"API error: {e}")
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
## License
|
|
202
|
+
|
|
203
|
+
Copyright © 2024-2026 SoftQuantus innovative OÜ. All Rights Reserved.
|
|
204
|
+
|
|
205
|
+
QCOS™ is a trademark of SoftQuantus innovative OÜ.
|
|
206
|
+
Registry Code: 17048927 | Tallinn, Estonia
|
|
207
|
+
|
|
208
|
+
- License: https://softquantus.com/legal/license
|
|
209
|
+
- EULA: https://softquantus.com/legal/eula
|
|
210
|
+
- Portal: https://platform.softquantus.com
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# SoftQCOS™ SDK v3.5
|
|
2
|
+
|
|
3
|
+
> Typed, synchronous Python client for the **SoftQuantus QCOS™ API Gateway**.
|
|
4
|
+
> Covers the documented product surface; it is not a wrapper over every mounted route.
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
pip install softqcos-sdk
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Quick Start
|
|
11
|
+
|
|
12
|
+
```python
|
|
13
|
+
from softqcos_sdk import QCOSClient
|
|
14
|
+
|
|
15
|
+
client = QCOSClient(api_key="sk-...")
|
|
16
|
+
|
|
17
|
+
# Submit a quantum job
|
|
18
|
+
job = client.jobs.submit(qasm="OPENQASM 2.0; ...", shots=1024)
|
|
19
|
+
result = client.jobs.wait(job["job_id"])
|
|
20
|
+
print(result["result"]["counts"])
|
|
21
|
+
|
|
22
|
+
# Or use the blocking shortcut
|
|
23
|
+
result = client.jobs.execute(qasm="OPENQASM 2.0; ...", shots=1024)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Product APIs
|
|
27
|
+
|
|
28
|
+
| Property | Product | Prefix |
|
|
29
|
+
|---------------------|-------------------------|---------------------------|
|
|
30
|
+
| `client.jobs` | QCOS Jobs™ | `/v1/jobs/*` |
|
|
31
|
+
| `client.circuits` | QCOS Circuits™ | `/api/v1/circuits/*` |
|
|
32
|
+
| `client.bench` | QCOS Bench™ | `/api/v1/bench/*` |
|
|
33
|
+
| `client.calibration`| QCOS GlassBox™ | `/api/v1/glassbox/*` |
|
|
34
|
+
| `client.billing` | QCOS ROI Engine™ | `/api/v1/roi/*` |
|
|
35
|
+
| `client.network` | QCOS QuantumNet™ | `/api/v1/network/*` |
|
|
36
|
+
| `client.qec` | QCOS QEC Runtime™ | `/api/v1/qec/*` |
|
|
37
|
+
| `client.isolation` | QCOS ZoneGuard™ | `/api/v1/isolation/*` |
|
|
38
|
+
| `client.dri` | QCOS DRI™ | `/api/v1/dri/*` |
|
|
39
|
+
| `client.ledger` | QCOS QuantumLedger™ | `/api/v1/ledger/*` |
|
|
40
|
+
| `client.navcore` | QCOS NavCore™ | `/api/v1/navcore/*` |
|
|
41
|
+
| `client.acos` | ACOS-ISA™ | `/api/v1/acos/*` |
|
|
42
|
+
| `client.macro` | Quantum Macro™ | `/api/v1/macro/*` |
|
|
43
|
+
| ~~`client.admin`~~ | withdrawn 2026-07-28 | `/api/admin/*` returns 404 |
|
|
44
|
+
| `client.evidence` | QCOS Evidence™ | `/api/v1/runtime/jobs/{id}/artifacts/*` |
|
|
45
|
+
| `client.backends` | QCOS Backends™ | `/api/v1/backends/*` |
|
|
46
|
+
|
|
47
|
+
## Async Client
|
|
48
|
+
|
|
49
|
+
**Not available.** There is no `AsyncQCOSClient`; importing it raises `ImportError`. Every
|
|
50
|
+
method on `QCOSClient` is synchronous.
|
|
51
|
+
|
|
52
|
+
`QCOSClient` does define `__aenter__` / `__aexit__`, so `async with QCOSClient(...)` enters
|
|
53
|
+
without complaint — but the first `await client.jobs.submit(...)` fails, because `submit` is
|
|
54
|
+
not a coroutine. Do not rely on that context manager as evidence of async support.
|
|
55
|
+
|
|
56
|
+
Run the client in a thread if you need it off the event loop:
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
import asyncio
|
|
60
|
+
from softqcos_sdk import QCOSClient
|
|
61
|
+
|
|
62
|
+
client = QCOSClient(api_key="sk-...")
|
|
63
|
+
result = await asyncio.to_thread(
|
|
64
|
+
client.jobs.execute, qasm="OPENQASM 2.0; ...", shots=1024
|
|
65
|
+
)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Configuration
|
|
69
|
+
|
|
70
|
+
| Environment Variable | Description | Default |
|
|
71
|
+
|---------------------|------------------------------------------|--------------------------------|
|
|
72
|
+
| `QCOS_API_KEY` | API key (required if not passed to ctor) | — |
|
|
73
|
+
| `QCOS_API_URL` | API gateway URL | `https://api.softquantus.com` |
|
|
74
|
+
|
|
75
|
+
## Examples
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
# Calibration
|
|
79
|
+
devices = client.calibration.devices()
|
|
80
|
+
state = client.calibration.device_state("ibm_brisbane")
|
|
81
|
+
|
|
82
|
+
# Benchmarking
|
|
83
|
+
report = client.bench.run(backend="aer_simulator", suite="standard")
|
|
84
|
+
client.bench.verify(report["benchmark_id"])
|
|
85
|
+
|
|
86
|
+
# DRI — Device Reliability Index
|
|
87
|
+
dri = client.dri.run(backend="ibm_brisbane")
|
|
88
|
+
proof = client.dri.proof_run(backend="ibm_brisbane")
|
|
89
|
+
|
|
90
|
+
# Billing & ROI
|
|
91
|
+
estimate = client.billing.calculate(backend="ibm_brisbane", shots=10000)
|
|
92
|
+
plans = client.billing.plans()
|
|
93
|
+
|
|
94
|
+
# NavCore — GNSS/PNT
|
|
95
|
+
#
|
|
96
|
+
# Post-quantum signatures work: liboqs 0.16.0 is built into the API image, and
|
|
97
|
+
# navcore.algorithms() reports per scheme what the deployment can sign with.
|
|
98
|
+
# The keys are client-held — pqc_keypair returns the private key once, the
|
|
99
|
+
# server keeps no copy, and pqc_sign takes it back as a request field.
|
|
100
|
+
kp = client.navcore.pqc_keypair(algorithm="ml-dsa-65")
|
|
101
|
+
sig = client.navcore.pqc_sign(
|
|
102
|
+
message=b64_message, private_key=kp["private_key"], key_id=kp["key_id"]
|
|
103
|
+
)
|
|
104
|
+
ok = client.navcore.pqc_verify(
|
|
105
|
+
message=b64_message,
|
|
106
|
+
signature=sig["signature"],
|
|
107
|
+
public_key=kp["public_key"],
|
|
108
|
+
algorithm=sig["mechanism"], # the exact mechanism, matched exactly
|
|
109
|
+
)["valid"]
|
|
110
|
+
#
|
|
111
|
+
# Two calls were listed here that do not work against the deployed service and
|
|
112
|
+
# have been removed rather than left as examples:
|
|
113
|
+
# navcore.navigate(...) -> the route does not exist (404)
|
|
114
|
+
# navcore.qrng_bytes(...) -> 503, the QRNG backend is not configured
|
|
115
|
+
# The read-only NavCore endpoints under /api/v1/navcore/* respond normally.
|
|
116
|
+
|
|
117
|
+
# Network — Multi-QPU
|
|
118
|
+
topo = client.network.topology()
|
|
119
|
+
# network.teleport(...) is omitted deliberately: the endpoint accepts a request
|
|
120
|
+
# but does not complete a teleport against real nodes. Do not build on it yet.
|
|
121
|
+
|
|
122
|
+
# Error handling
|
|
123
|
+
from softqcos_sdk import QCOSError, AuthenticationError, RateLimitError
|
|
124
|
+
|
|
125
|
+
try:
|
|
126
|
+
result = client.jobs.submit(qasm="invalid")
|
|
127
|
+
except RateLimitError as e:
|
|
128
|
+
print(f"Rate limited — retry after {e.retry_after}s")
|
|
129
|
+
except AuthenticationError:
|
|
130
|
+
print("Invalid API key")
|
|
131
|
+
except QCOSError as e:
|
|
132
|
+
print(f"API error: {e}")
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## License
|
|
136
|
+
|
|
137
|
+
Copyright © 2024-2026 SoftQuantus innovative OÜ. All Rights Reserved.
|
|
138
|
+
|
|
139
|
+
QCOS™ is a trademark of SoftQuantus innovative OÜ.
|
|
140
|
+
Registry Code: 17048927 | Tallinn, Estonia
|
|
141
|
+
|
|
142
|
+
- License: https://softquantus.com/legal/license
|
|
143
|
+
- EULA: https://softquantus.com/legal/eula
|
|
144
|
+
- Portal: https://platform.softquantus.com
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "softqcos-sdk"
|
|
7
|
+
version = "3.7.0"
|
|
8
|
+
description = "SoftQCOS™ SDK — Full-coverage Python client for the QCOS™ API Gateway"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = { text = "Proprietary - SoftQuantus innovative OÜ" }
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "SoftQuantus innovative OÜ", email = "support@softquantus.com" },
|
|
14
|
+
]
|
|
15
|
+
keywords = [
|
|
16
|
+
"quantum",
|
|
17
|
+
"quantum-computing",
|
|
18
|
+
"sdk",
|
|
19
|
+
"softqcos",
|
|
20
|
+
"qcos",
|
|
21
|
+
"optimization",
|
|
22
|
+
"calibration",
|
|
23
|
+
"benchmarking",
|
|
24
|
+
]
|
|
25
|
+
classifiers = [
|
|
26
|
+
"Development Status :: 5 - Production/Stable",
|
|
27
|
+
"Intended Audience :: Science/Research",
|
|
28
|
+
"Intended Audience :: Developers",
|
|
29
|
+
"License :: Other/Proprietary License",
|
|
30
|
+
"Operating System :: OS Independent",
|
|
31
|
+
"Programming Language :: Python :: 3",
|
|
32
|
+
"Programming Language :: Python :: 3.10",
|
|
33
|
+
"Programming Language :: Python :: 3.11",
|
|
34
|
+
"Programming Language :: Python :: 3.12",
|
|
35
|
+
"Programming Language :: Python :: 3.13",
|
|
36
|
+
"Topic :: Scientific/Engineering :: Physics",
|
|
37
|
+
"Typing :: Typed",
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
dependencies = ["httpx>=0.27.0", "pydantic>=2.0.0"]
|
|
41
|
+
|
|
42
|
+
[project.optional-dependencies]
|
|
43
|
+
qiskit = ["qiskit>=1.0.0"]
|
|
44
|
+
simulation = ["qiskit>=1.0.0", "qiskit-aer>=0.13.0"]
|
|
45
|
+
cirq = ["cirq>=1.3.0"]
|
|
46
|
+
pennylane = ["pennylane>=0.34.0"]
|
|
47
|
+
ibm = ["qiskit-ibm-runtime>=0.20.0"]
|
|
48
|
+
braket = ["amazon-braket-sdk>=1.70.0"]
|
|
49
|
+
azure = ["azure-quantum>=0.28.0"]
|
|
50
|
+
frameworks = [
|
|
51
|
+
"softqcos-sdk[qiskit]",
|
|
52
|
+
"softqcos-sdk[cirq]",
|
|
53
|
+
"softqcos-sdk[pennylane]",
|
|
54
|
+
]
|
|
55
|
+
cloud = ["softqcos-sdk[ibm]", "softqcos-sdk[braket]", "softqcos-sdk[azure]"]
|
|
56
|
+
all = [
|
|
57
|
+
"softqcos-sdk[simulation]",
|
|
58
|
+
"softqcos-sdk[frameworks]",
|
|
59
|
+
"softqcos-sdk[cloud]",
|
|
60
|
+
]
|
|
61
|
+
dev = [
|
|
62
|
+
"pytest>=8.0.0",
|
|
63
|
+
"pytest-asyncio>=0.23.0",
|
|
64
|
+
"respx>=0.22.0",
|
|
65
|
+
"ruff>=0.3.0",
|
|
66
|
+
"mypy>=1.8.0",
|
|
67
|
+
]
|
|
68
|
+
|
|
69
|
+
[project.urls]
|
|
70
|
+
Homepage = "https://softquantus.com"
|
|
71
|
+
Documentation = "https://docs.softquantus.com/sdk"
|
|
72
|
+
Portal = "https://platform.softquantus.com"
|
|
73
|
+
License = "https://softquantus.com/legal/license"
|
|
74
|
+
EULA = "https://softquantus.com/legal/eula"
|
|
75
|
+
|
|
76
|
+
[tool.hatch.build.targets.sdist]
|
|
77
|
+
include = ["/softqcos_sdk", "/README.md"]
|
|
78
|
+
|
|
79
|
+
[tool.hatch.build.targets.wheel]
|
|
80
|
+
packages = ["softqcos_sdk"]
|
|
81
|
+
|
|
82
|
+
[tool.ruff]
|
|
83
|
+
target-version = "py310"
|
|
84
|
+
line-length = 100
|
|
85
|
+
|
|
86
|
+
[tool.ruff.lint]
|
|
87
|
+
select = ["E", "W", "F", "I", "B", "C4", "UP"]
|
|
88
|
+
ignore = ["E501", "B008"]
|
|
89
|
+
|
|
90
|
+
[tool.mypy]
|
|
91
|
+
python_version = "3.10"
|
|
92
|
+
warn_return_any = true
|
|
93
|
+
warn_unused_configs = true
|
|
94
|
+
ignore_missing_imports = true
|
|
95
|
+
|
|
96
|
+
[tool.pytest.ini_options]
|
|
97
|
+
asyncio_mode = "auto"
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"""
|
|
2
|
+
SoftQCOS™ SDK v2.0 — Full-Coverage Python Client
|
|
3
|
+
==================================================
|
|
4
|
+
|
|
5
|
+
The official Python SDK for the SoftQuantus QCOS™ API Gateway.
|
|
6
|
+
Covers all 293 API routes across 15 product modules.
|
|
7
|
+
|
|
8
|
+
Quick Start::
|
|
9
|
+
|
|
10
|
+
from softqcos_sdk import QCOSClient
|
|
11
|
+
|
|
12
|
+
client = QCOSClient(api_key="your-key")
|
|
13
|
+
|
|
14
|
+
# Jobs
|
|
15
|
+
job = client.jobs.submit(qasm="OPENQASM 2.0; ...", shots=1024)
|
|
16
|
+
result = client.jobs.results(job["job_id"])
|
|
17
|
+
|
|
18
|
+
# Circuits
|
|
19
|
+
circuits = client.circuits.list()
|
|
20
|
+
|
|
21
|
+
# Bench
|
|
22
|
+
report = client.bench.run(backend="aer_simulator")
|
|
23
|
+
|
|
24
|
+
# Calibration (GlassBox)
|
|
25
|
+
devices = client.calibration.devices()
|
|
26
|
+
|
|
27
|
+
# Billing (ROI)
|
|
28
|
+
estimate = client.billing.calculate(backend="ibm_brisbane", shots=10000)
|
|
29
|
+
|
|
30
|
+
# Algorithms (Shor, Grover, QFT, QPE, QAOA…)
|
|
31
|
+
result = client.algorithms.shor(N=35)
|
|
32
|
+
result = client.algorithms.shor(N=34359738433, cluster_mode="lumi", lumi_nodes=2)
|
|
33
|
+
|
|
34
|
+
# And 11 more product modules...
|
|
35
|
+
|
|
36
|
+
Copyright © 2024-2026 SoftQuantus innovative OÜ. All Rights Reserved.
|
|
37
|
+
QCOS™ is a trademark of SoftQuantus innovative OÜ.
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
__version__ = "3.7.0"
|
|
41
|
+
__author__ = "SoftQuantus innovative OÜ"
|
|
42
|
+
__email__ = "support@softquantus.com"
|
|
43
|
+
__license__ = "Proprietary"
|
|
44
|
+
__copyright__ = "© 2024-2026 SoftQuantus innovative OÜ. All Rights Reserved."
|
|
45
|
+
|
|
46
|
+
from softqcos_sdk.client import QCOSClient
|
|
47
|
+
from softqcos_sdk.exceptions import (
|
|
48
|
+
AuthenticationError,
|
|
49
|
+
JobNotFoundError,
|
|
50
|
+
QCOSError,
|
|
51
|
+
RateLimitError,
|
|
52
|
+
TimeoutError,
|
|
53
|
+
ValidationError,
|
|
54
|
+
)
|
|
55
|
+
from softqcos_sdk.licensing import (
|
|
56
|
+
LicenseError,
|
|
57
|
+
LicenseExpiredError,
|
|
58
|
+
LicenseNotFoundError,
|
|
59
|
+
QCOSLicense,
|
|
60
|
+
)
|
|
61
|
+
from softqcos_sdk.models import (
|
|
62
|
+
BackendInfo,
|
|
63
|
+
BenchmarkReport,
|
|
64
|
+
Certificate,
|
|
65
|
+
CircuitInfo,
|
|
66
|
+
DeviceState,
|
|
67
|
+
EvidenceBundle,
|
|
68
|
+
JobResult,
|
|
69
|
+
JobStatus,
|
|
70
|
+
PricebookEntry,
|
|
71
|
+
ProviderInfo,
|
|
72
|
+
)
|
|
73
|
+
from softqcos_sdk.workflow_templates import WORKFLOW_TEMPLATES
|
|
74
|
+
|
|
75
|
+
__all__ = [
|
|
76
|
+
# Client
|
|
77
|
+
"QCOSClient",
|
|
78
|
+
# Exceptions
|
|
79
|
+
"QCOSError",
|
|
80
|
+
"AuthenticationError",
|
|
81
|
+
"RateLimitError",
|
|
82
|
+
"ValidationError",
|
|
83
|
+
"JobNotFoundError",
|
|
84
|
+
"TimeoutError",
|
|
85
|
+
# Licensing
|
|
86
|
+
"QCOSLicense",
|
|
87
|
+
"LicenseError",
|
|
88
|
+
"LicenseExpiredError",
|
|
89
|
+
"LicenseNotFoundError",
|
|
90
|
+
# Models
|
|
91
|
+
"BackendInfo",
|
|
92
|
+
"BenchmarkReport",
|
|
93
|
+
"Certificate",
|
|
94
|
+
"CircuitInfo",
|
|
95
|
+
"DeviceState",
|
|
96
|
+
"EvidenceBundle",
|
|
97
|
+
"JobResult",
|
|
98
|
+
"JobStatus",
|
|
99
|
+
"PricebookEntry",
|
|
100
|
+
"ProviderInfo",
|
|
101
|
+
# Workflow templates
|
|
102
|
+
"WORKFLOW_TEMPLATES",
|
|
103
|
+
# Metadata
|
|
104
|
+
"__version__",
|
|
105
|
+
]
|