qcoscloud 0.1.0__py3-none-any.whl

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.
qcoscloud/__init__.py ADDED
@@ -0,0 +1,5 @@
1
+ """QCOScloud — SoftQuantus compute SDK (credits · instances · QPU · GPU · sim)."""
2
+ from qcoscloud.client import QCOSCloud, QCOSCloudError
3
+
4
+ __version__ = "0.1.0"
5
+ __all__ = ["QCOSCloud", "QCOSCloudError", "__version__"]
qcoscloud/cli.py ADDED
@@ -0,0 +1,122 @@
1
+ """
2
+ qcoscloud CLI — the ``az``-style command line for SoftQuantus compute.
3
+
4
+ export QCOSCLOUD_API_KEY=sq-live-…
5
+ qcoscloud credits
6
+ qcoscloud computers
7
+ qcoscloud instances
8
+ qcoscloud instances create research --plan prepaid --qpus ionq.qpu.aria-1
9
+ qcoscloud simulate --shots 1000
10
+ qcoscloud run --target ionq.qpu.aria-1 --shots 2000 --instance research
11
+ qcoscloud gpu --type a100-80gb --command "python train.py" --minutes 30
12
+ qcoscloud workload <id>
13
+ qcoscloud workloads
14
+ """
15
+ from __future__ import annotations
16
+
17
+ import argparse
18
+ import json
19
+ import sys
20
+
21
+ from qcoscloud.client import QCOSCloud, QCOSCloudError
22
+
23
+
24
+ def _pp(obj) -> None:
25
+ print(json.dumps(obj, indent=2, ensure_ascii=False))
26
+
27
+
28
+ def _client() -> QCOSCloud:
29
+ try:
30
+ return QCOSCloud()
31
+ except QCOSCloudError as e:
32
+ print(f"error: {e}", file=sys.stderr)
33
+ sys.exit(2)
34
+
35
+
36
+ def main(argv: list[str] | None = None) -> int:
37
+ p = argparse.ArgumentParser(prog="qcoscloud", description="SoftQuantus compute — credits, instances, QPU/GPU/sim workloads")
38
+ sub = p.add_subparsers(dest="cmd", required=True)
39
+
40
+ sub.add_parser("credits", help="show prepaid balance")
41
+ sub.add_parser("computers", help="list QPU devices")
42
+ sub.add_parser("targets", help="list compute activated for your workspace")
43
+
44
+ inst = sub.add_parser("instances", help="list or create quantum instances")
45
+ inst_sub = inst.add_subparsers(dest="inst_cmd")
46
+ ic = inst_sub.add_parser("create", help="create an instance")
47
+ ic.add_argument("name")
48
+ ic.add_argument("--plan", default="prepaid", choices=["free", "prepaid", "paygo"])
49
+ ic.add_argument("--qpus", default="", help="comma-separated target ids")
50
+ ic.add_argument("--access-group", default="all_members")
51
+
52
+ sim = sub.add_parser("simulate", help="run a free simulation")
53
+ sim.add_argument("--shots", type=int, default=1000)
54
+ sim.add_argument("--instance", default=None)
55
+
56
+ run = sub.add_parser("run", help="run a workload on a target")
57
+ run.add_argument("--target", required=True)
58
+ run.add_argument("--shots", type=int, default=1000)
59
+ run.add_argument("--instance", default=None)
60
+ run.add_argument("--mode", default="NATIVE", choices=["NATIVE", "QCOS_OPTIMIZED"])
61
+ run.add_argument("--max-cost-usd", type=float, default=None)
62
+ run.add_argument("--max-runtime-seconds", type=int, default=None)
63
+
64
+ gpu = sub.add_parser("gpu", help="run an on-demand GPU job")
65
+ gpu.add_argument("--type", required=True, help="e.g. a100-80gb, t4, h100")
66
+ gpu.add_argument("--command", required=True)
67
+ gpu.add_argument("--minutes", type=int, default=60)
68
+ gpu.add_argument("--num-gpus", type=int, default=1)
69
+ gpu.add_argument("--instance", default=None)
70
+ gpu.add_argument("--image", default=None)
71
+
72
+ wl = sub.add_parser("workload", help="show one workload")
73
+ wl.add_argument("id")
74
+ cpu = sub.add_parser("cpu", help="run an on-demand CPU job (large simulations)")
75
+ cpu.add_argument("--tier", required=True, help="e.g. 16vcpu, 8vcpu, 32vcpu-highmem")
76
+ cpu.add_argument("--command", required=True)
77
+ cpu.add_argument("--minutes", type=int, default=60)
78
+ cpu.add_argument("--cpus", type=int, default=None)
79
+ cpu.add_argument("--instance", default=None)
80
+ cpu.add_argument("--image", default=None)
81
+
82
+ sub.add_parser("workloads", help="list recent workloads")
83
+
84
+ args = p.parse_args(argv)
85
+ qc = _client()
86
+ try:
87
+ if args.cmd == "credits":
88
+ print(f"${qc.credits():.2f} ({int(qc.credits() * 100)} credits)")
89
+ elif args.cmd == "computers":
90
+ _pp(qc.computers())
91
+ elif args.cmd == "targets":
92
+ _pp(qc.targets())
93
+ elif args.cmd == "instances":
94
+ if getattr(args, "inst_cmd", None) == "create":
95
+ _pp(qc.create_instance(args.name, plan=args.plan,
96
+ qpus=[q for q in args.qpus.split(",") if q],
97
+ access_group=args.access_group))
98
+ else:
99
+ _pp(qc.instances())
100
+ elif args.cmd == "simulate":
101
+ _pp(qc.simulate(shots=args.shots, instance=args.instance))
102
+ elif args.cmd == "run":
103
+ _pp(qc.run(args.target, shots=args.shots, instance=args.instance, mode=args.mode,
104
+ max_cost_usd=args.max_cost_usd, max_runtime_seconds=args.max_runtime_seconds))
105
+ elif args.cmd == "gpu":
106
+ _pp(qc.gpu_job(gpu=args.type, command=args.command, minutes=args.minutes,
107
+ num_gpus=args.num_gpus, instance=args.instance, image=args.image))
108
+ elif args.cmd == "cpu":
109
+ _pp(qc.cpu_job(tier=args.tier, command=args.command, minutes=args.minutes,
110
+ cpus=args.cpus, instance=args.instance, image=args.image))
111
+ elif args.cmd == "workload":
112
+ _pp(qc.workload(args.id))
113
+ elif args.cmd == "workloads":
114
+ _pp(qc.workloads())
115
+ except QCOSCloudError as e:
116
+ print(f"error: {e}", file=sys.stderr)
117
+ return 1
118
+ return 0
119
+
120
+
121
+ if __name__ == "__main__":
122
+ raise SystemExit(main())
qcoscloud/client.py ADDED
@@ -0,0 +1,162 @@
1
+ """
2
+ QCOScloud — the customer SDK for SoftQuantus compute.
3
+
4
+ One client for everything the platform sells: prepaid credits, quantum
5
+ instances, and running workloads on QPU (via QCOS), on-demand GPU (via the
6
+ Softquantus Cloud service), and the free CPU simulator. The platform Execution
7
+ Plane is the single bank — this SDK never talks to a cloud or to QCOS directly;
8
+ it authenticates with a platform API key (``sq-live-…``) and the Execution Plane
9
+ authorizes, meters and settles credits behind every call.
10
+
11
+ from qcoscloud import QCOSCloud
12
+ qc = QCOSCloud(api_key="sq-live-…")
13
+ print(qc.credits()) # prepaid balance
14
+ job = qc.simulate(shots=1000) # free CPU/QPU simulation
15
+ job = qc.run(target="ionq.qpu.aria-1", shots=1000, instance="research")
16
+ job = qc.gpu_job(gpu="a100-80gb", command="python train.py", minutes=30)
17
+ """
18
+ from __future__ import annotations
19
+
20
+ import os
21
+ import uuid
22
+ from typing import Any, Callable, Optional
23
+
24
+ import httpx
25
+
26
+ __all__ = ["QCOSCloud", "QCOSCloudError"]
27
+
28
+ DEFAULT_BASE_URL = "https://platform.softquantus.com"
29
+
30
+
31
+ class QCOSCloudError(RuntimeError):
32
+ def __init__(self, message: str, *, status: int | None = None, reason: str | None = None):
33
+ super().__init__(message)
34
+ self.status = status
35
+ self.reason = reason # the Execution Plane's machine reason, e.g. 'insufficient_credits'
36
+
37
+
38
+ # machine reason → human hint (mirrors the console)
39
+ _REASON_HINT = {
40
+ "insufficient_credits": "Not enough prepaid credits — top up with qc.add_credits_url() or the console Billing page.",
41
+ "runtime_bound_required": "This target bills per second/minute — pass max_runtime_seconds.",
42
+ "free_plan_limit_met": "Free plan limit met — nothing was charged; upgrade to prepaid to continue.",
43
+ "free_plan_simulators_only": "The free plan runs simulators only — use prepaid credits for real hardware.",
44
+ "paygo_not_released": "Pay-as-you-go is not released for this workspace — request it in the console.",
45
+ "instance_access_denied": "You are not in this instance's access group.",
46
+ "no_active_entitlement_for_offer": "That target is not activated for your workspace.",
47
+ }
48
+
49
+
50
+ class QCOSCloud:
51
+ def __init__(self, api_key: str | None = None, base_url: str | None = None,
52
+ timeout: float = 60.0, client_factory: Optional[Callable[[], httpx.Client]] = None) -> None:
53
+ self.api_key = api_key or os.environ.get("QCOSCLOUD_API_KEY") or ""
54
+ if not self.api_key:
55
+ raise QCOSCloudError("no API key — pass api_key= or set QCOSCLOUD_API_KEY (create one in the console → API Keys)")
56
+ self.base_url = (base_url or os.environ.get("QCOSCLOUD_URL") or DEFAULT_BASE_URL).rstrip("/")
57
+ self.timeout = timeout
58
+ self._client_factory = client_factory
59
+
60
+ # ── transport ────────────────────────────────────────────────────────────
61
+ def _client(self) -> httpx.Client:
62
+ if self._client_factory:
63
+ return self._client_factory()
64
+ return httpx.Client(base_url=self.base_url, timeout=self.timeout,
65
+ headers={"Authorization": f"Bearer {self.api_key}"})
66
+
67
+ def _request(self, method: str, path: str, *, json: dict | None = None,
68
+ headers: dict | None = None, params: dict | None = None) -> Any:
69
+ with self._client() as c:
70
+ r = c.request(method, path, json=json, headers=headers, params=params)
71
+ if r.status_code >= 400:
72
+ reason = None
73
+ try:
74
+ reason = r.json().get("detail")
75
+ except Exception:
76
+ pass
77
+ hint = _REASON_HINT.get(reason or "", "")
78
+ raise QCOSCloudError(f"{method} {path} → {r.status_code}: {reason or r.text}. {hint}".strip(),
79
+ status=r.status_code, reason=reason)
80
+ return r.json() if r.content else {}
81
+
82
+ # ── credits / billing ──────────────────────────────────────────────────────
83
+ def credits(self) -> float:
84
+ """Prepaid balance in USD (1 credit = $0.01)."""
85
+ data = self._request("GET", "/api/v1/platform/billing/summary")
86
+ return float(data.get("prepaidBalanceUsd", 0.0) or 0.0)
87
+
88
+ def add_credits_url(self) -> str:
89
+ return f"{self.base_url}/#billing"
90
+
91
+ # ── catalog / what I can run on ────────────────────────────────────────────
92
+ def computers(self) -> list[dict]:
93
+ """QPU devices reachable via QCOS."""
94
+ data = self._request("GET", "/api/v1/platform/qcos/backends")
95
+ return data.get("backends", data) if isinstance(data, dict) else data
96
+
97
+ def targets(self) -> list[dict]:
98
+ """Compute activated for this workspace (QPU sim, free CPU sim, GPU types, real QPUs)."""
99
+ data = self._request("GET", "/api/internal/v1/commerce/target-entitlements")
100
+ return data.get("target_entitlements", []) if isinstance(data, dict) else []
101
+
102
+ # ── instances (IBM-style: plan + QPUs + access) ────────────────────────────
103
+ def instances(self) -> list[dict]:
104
+ return self._request("GET", "/api/v1/platform/quantum-instances").get("instances", [])
105
+
106
+ def create_instance(self, name: str, *, plan: str = "prepaid", qpus: list[str] | None = None,
107
+ access_group: str = "all_members") -> dict:
108
+ return self._request("POST", "/api/v1/platform/quantum-instances",
109
+ json={"name": name, "plan": plan, "qpus": qpus or [], "access_group": access_group})
110
+
111
+ # ── run workloads (QPU / GPU / sim — the Execution Plane routes + bills) ────
112
+ def run(self, target: str, *, shots: int = 1000, instance: str | None = None,
113
+ mode: str = "NATIVE", workload: dict | None = None, qasm: str | None = None,
114
+ max_cost_usd: float | None = None, max_runtime_seconds: int | None = None,
115
+ idempotency_key: str | None = None) -> dict:
116
+ if workload is None:
117
+ workload = {"type": "QUANTUM_CIRCUIT", "shots": shots}
118
+ if qasm:
119
+ workload["qasm"] = qasm # OpenQASM 2/3 circuit → executed on the backend
120
+ body: dict[str, Any] = {"target": target, "execution_mode": mode, "workload": workload}
121
+ if instance:
122
+ body["instance_id"] = instance
123
+ if max_cost_usd is not None:
124
+ body["max_estimated_cost_usd"] = max_cost_usd
125
+ if max_runtime_seconds is not None:
126
+ body["max_runtime_seconds"] = max_runtime_seconds
127
+ return self._request("POST", "/api/v1/platform/execution/jobs", json=body,
128
+ headers={"Idempotency-Key": idempotency_key or str(uuid.uuid4())})
129
+
130
+ def simulate(self, *, shots: int = 1000, instance: str | None = None, qasm: str | None = None) -> dict:
131
+ """Run a free simulation. Pass `qasm` (OpenQASM) to execute your circuit and
132
+ get real measurement counts; costs nothing on the free plan."""
133
+ return self.run("qcos.simulator.statevector", shots=shots, instance=instance, qasm=qasm)
134
+
135
+ def gpu_job(self, *, gpu: str, command: str, minutes: int = 60, num_gpus: int = 1,
136
+ instance: str | None = None, image: str | None = None) -> dict:
137
+ """Run an on-demand GPU batch job. Reserves per-minute worst case; stops when exhausted."""
138
+ target = f"gpu.{gpu.lower()}"
139
+ return self.run(target, instance=instance, max_runtime_seconds=minutes * 60,
140
+ workload={"type": "GPU_JOB", "kind": "job", "gpu": gpu, "num_gpus": num_gpus,
141
+ "command": command, "image": image, "max_runtime_minutes": minutes})
142
+
143
+ def cpu_job(self, *, tier: str, command: str, minutes: int = 60, cpus: int | None = None,
144
+ instance: str | None = None, image: str | None = None) -> dict:
145
+ """Run an on-demand CPU batch job (for large/long simulations). Billed per minute;
146
+ reserves the per-minute worst case and stops when the reservation is exhausted.
147
+ `tier` is a CPU target size, e.g. "16vcpu" → target "cpu.16vcpu"."""
148
+ target = f"cpu.{tier.lower()}"
149
+ return self.run(target, instance=instance, max_runtime_seconds=minutes * 60,
150
+ workload={"type": "CPU_JOB", "kind": "job", "resource_type": "cpu",
151
+ "cpus": cpus, "command": command, "image": image,
152
+ "max_runtime_minutes": minutes})
153
+
154
+ def workload(self, job_id: str) -> dict:
155
+ return self._request("GET", f"/api/v1/platform/execution/jobs/{job_id}")
156
+
157
+ def cancel(self, job_id: str) -> dict:
158
+ return self._request("POST", f"/api/v1/platform/execution/jobs/{job_id}/cancel")
159
+
160
+ def workloads(self, page_size: int = 20) -> list[dict]:
161
+ data = self._request("GET", "/api/v1/platform/usage/jobs", params={"page_size": page_size})
162
+ return data.get("items", []) if isinstance(data, dict) else []
@@ -0,0 +1,132 @@
1
+ """
2
+ QCOScloud MCP server — lets an AI (the SynapseX Lab agent, Claude, Cursor, etc.)
3
+ drive SoftQuantus compute through tools.
4
+
5
+ The AI can: check the credit balance, list computers, create instances, run
6
+ simulations, run QPU jobs (via QCOS) and on-demand GPU jobs, and check results —
7
+ all metered against the SAME prepaid wallet as the console and the chat, with the
8
+ same cost guardrails. The AI never sees a cloud or a credential; it calls tools.
9
+
10
+ Run:
11
+ pip install "qcoscloud[mcp]" # installs the `mcp` package
12
+ export QCOSCLOUD_API_KEY=sq-live-…
13
+ python -m qcoscloud.mcp_server # stdio server for the lab/desktop agent
14
+
15
+ Register it in an MCP client (Claude Desktop / SynapseX Lab / Cursor) as a
16
+ command server running `python -m qcoscloud.mcp_server`.
17
+ """
18
+ from __future__ import annotations
19
+
20
+ import os
21
+
22
+ try:
23
+ from mcp.server.fastmcp import FastMCP
24
+ except Exception as exc: # pragma: no cover - import guard
25
+ raise SystemExit(
26
+ "The MCP server needs the 'mcp' package. Install with: pip install \"qcoscloud[mcp]\"\n"
27
+ f"(import error: {exc})"
28
+ )
29
+
30
+ from qcoscloud.client import QCOSCloud, QCOSCloudError
31
+
32
+ mcp = FastMCP("qcoscloud")
33
+
34
+
35
+ def _qc() -> QCOSCloud:
36
+ return QCOSCloud() # reads QCOSCLOUD_API_KEY / QCOSCLOUD_URL
37
+
38
+
39
+ @mcp.tool()
40
+ def get_credits() -> str:
41
+ """Return the workspace prepaid credit balance (USD). Check this before running paid hardware."""
42
+ try:
43
+ bal = _qc().credits()
44
+ return f"Prepaid balance: ${bal:.2f} ({int(bal * 100)} credits). Top up at the console Billing page."
45
+ except QCOSCloudError as e:
46
+ return f"error: {e}"
47
+
48
+
49
+ @mcp.tool()
50
+ def list_computers() -> list[dict]:
51
+ """List the quantum computers (QPU devices) reachable via QCOS, with status and qubit counts."""
52
+ try:
53
+ return _qc().computers()
54
+ except QCOSCloudError as e:
55
+ return [{"error": str(e)}]
56
+
57
+
58
+ @mcp.tool()
59
+ def list_instances() -> list[dict]:
60
+ """List the workspace's quantum instances (plan + allowed computers + access group)."""
61
+ try:
62
+ return _qc().instances()
63
+ except QCOSCloudError as e:
64
+ return [{"error": str(e)}]
65
+
66
+
67
+ @mcp.tool()
68
+ def create_instance(name: str, plan: str = "prepaid", qpus: str = "", access_group: str = "all_members") -> dict:
69
+ """Create a quantum instance. plan = free | prepaid | paygo. qpus = comma-separated target ids.
70
+ Every workload runs inside an instance; the plan decides billing (free=simulators only)."""
71
+ try:
72
+ return _qc().create_instance(name, plan=plan, qpus=[q for q in qpus.split(",") if q], access_group=access_group)
73
+ except QCOSCloudError as e:
74
+ return {"error": str(e)}
75
+
76
+
77
+ @mcp.tool()
78
+ def run_simulation(shots: int = 1000, instance: str | None = None) -> dict:
79
+ """Run a FREE simulation (QPU statevector / CPU sim). Use this first for tests — it costs nothing
80
+ on the free plan. Returns the workload id and status."""
81
+ try:
82
+ return _qc().simulate(shots=shots, instance=instance)
83
+ except QCOSCloudError as e:
84
+ return {"error": str(e), "reason": e.reason}
85
+
86
+
87
+ @mcp.tool()
88
+ def run_qpu_job(target: str, shots: int = 1000, instance: str | None = None,
89
+ mode: str = "NATIVE", max_cost_usd: float | None = None) -> dict:
90
+ """Run a workload on a real QPU via QCOS (e.g. target 'ionq.qpu.aria-1'). Bills prepaid credits;
91
+ pass max_cost_usd as a guardrail. mode='QCOS_OPTIMIZED' applies QCOS transforms (needs a license)."""
92
+ try:
93
+ return _qc().run(target, shots=shots, instance=instance, mode=mode, max_cost_usd=max_cost_usd)
94
+ except QCOSCloudError as e:
95
+ return {"error": str(e), "reason": e.reason}
96
+
97
+
98
+ @mcp.tool()
99
+ def run_gpu_job(gpu: str, command: str, minutes: int = 60, num_gpus: int = 1,
100
+ instance: str | None = None) -> dict:
101
+ """Run an on-demand GPU batch job (e.g. gpu='a100-80gb'). Reserves the worst-case cost for `minutes`
102
+ up front and stops when exhausted, so it can never overspend. Bills prepaid credits."""
103
+ try:
104
+ return _qc().gpu_job(gpu=gpu, command=command, minutes=minutes, num_gpus=num_gpus, instance=instance)
105
+ except QCOSCloudError as e:
106
+ return {"error": str(e), "reason": e.reason}
107
+
108
+
109
+ @mcp.tool()
110
+ def get_workload(job_id: str) -> dict:
111
+ """Get a workload's status, billing mode and cost so far."""
112
+ try:
113
+ return _qc().workload(job_id)
114
+ except QCOSCloudError as e:
115
+ return {"error": str(e)}
116
+
117
+
118
+ @mcp.tool()
119
+ def cancel_workload(job_id: str) -> dict:
120
+ """Cancel/stop a running workload (releases any unused reservation)."""
121
+ try:
122
+ return _qc().cancel(job_id)
123
+ except QCOSCloudError as e:
124
+ return {"error": str(e)}
125
+
126
+
127
+ def main() -> None:
128
+ mcp.run()
129
+
130
+
131
+ if __name__ == "__main__":
132
+ main()
@@ -0,0 +1,71 @@
1
+ Metadata-Version: 2.4
2
+ Name: qcoscloud
3
+ Version: 0.1.0
4
+ Summary: SoftQuantus compute SDK — credits, instances, QPU (QCOS), on-demand GPU, and free simulation, over one prepaid wallet.
5
+ Requires-Python: >=3.10
6
+ Description-Content-Type: text/markdown
7
+ Requires-Dist: httpx>=0.27
8
+ Provides-Extra: mcp
9
+ Requires-Dist: mcp>=1.0; extra == "mcp"
10
+ Provides-Extra: dev
11
+ Requires-Dist: pytest>=8; extra == "dev"
12
+ Requires-Dist: httpx>=0.27; extra == "dev"
13
+
14
+ # qcoscloud
15
+
16
+ The customer SDK, CLI and MCP server for **SoftQuantus compute** — one prepaid
17
+ wallet across QPU (via QCOS), on-demand GPU (via Softquantus Cloud), and free
18
+ simulation. The platform Execution Plane authorizes, meters and settles every
19
+ call; this client never touches a cloud or a credential.
20
+
21
+ ```bash
22
+ pip install qcoscloud # SDK + CLI
23
+ pip install "qcoscloud[mcp]" # + the MCP server for AI agents
24
+ export QCOSCLOUD_API_KEY=sq-live-… # create one in the console → API Keys
25
+ ```
26
+
27
+ ## SDK
28
+
29
+ ```python
30
+ from qcoscloud import QCOSCloud
31
+ qc = QCOSCloud() # reads QCOSCLOUD_API_KEY
32
+ qc.credits() # prepaid balance (USD)
33
+ qc.simulate(shots=1000) # FREE test simulation
34
+ qc.run("ionq.qpu.aria-1", shots=2000, instance="research") # real QPU (QCOS)
35
+ qc.gpu_job(gpu="a100-80gb", command="python train.py", minutes=30) # GPU
36
+ qc.workload(job_id) # status + cost
37
+ ```
38
+
39
+ ## CLI
40
+
41
+ ```bash
42
+ qcoscloud credits
43
+ qcoscloud computers
44
+ qcoscloud instances create research --plan prepaid --qpus ionq.qpu.aria-1
45
+ qcoscloud simulate --shots 1000
46
+ qcoscloud run --target ionq.qpu.aria-1 --shots 2000 --instance research
47
+ qcoscloud gpu --type a100-80gb --command "python train.py" --minutes 30
48
+ qcoscloud workloads
49
+ ```
50
+
51
+ ## MCP (for AI agents — the SynapseX Lab, Claude Desktop, Cursor)
52
+
53
+ ```bash
54
+ python -m qcoscloud.mcp_server # stdio MCP server
55
+ ```
56
+
57
+ Exposes tools: `get_credits`, `list_computers`, `list_instances`,
58
+ `create_instance`, `run_simulation`, `run_qpu_job`, `run_gpu_job`,
59
+ `get_workload`, `cancel_workload`. An AI can drive compute safely — every run is
60
+ metered against the same wallet with the same cost guardrails.
61
+
62
+ See `docs/COMPUTE_INTEGRATION.md` (full integration) and
63
+ `docs/LAB_AI_INSTRUCTIONS.md` (desktop lab + AI instructions).
64
+
65
+ ## Cost safety
66
+
67
+ Runs reserve their worst-case cost **before** provisioning, so you can never
68
+ overspend; GPU is stopped/deprovisioned when its reservation is exhausted; the
69
+ free plan runs simulators at $0. Errors carry a machine `reason`
70
+ (`insufficient_credits`, `runtime_bound_required`, `free_plan_limit_met`, …)
71
+ and a human hint.
@@ -0,0 +1,9 @@
1
+ qcoscloud/__init__.py,sha256=bh1ql5QIUrlhIZ4Bne-c8XIuWT7lkqKQmUaHvXK96tc,224
2
+ qcoscloud/cli.py,sha256=YOs5UxggaOPAPRzmaFl3UdsQCJtPstm3jhclzW6UlSw,5114
3
+ qcoscloud/client.py,sha256=QOyKDYEqKm-nRaPelNLIaKrdEt9F3-0LqKcTGhjDJV8,9275
4
+ qcoscloud/mcp_server.py,sha256=1dHba5GOj04GCJc1G8Cvpj5JjlfvkbL8v_JLZWyed30,4744
5
+ qcoscloud-0.1.0.dist-info/METADATA,sha256=aRg6n7opd2yUW0_5hp8GIcBkKlqLBnkd5bghzPYXfVA,2652
6
+ qcoscloud-0.1.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
7
+ qcoscloud-0.1.0.dist-info/entry_points.txt,sha256=a1hdlZqCA48rPQSYZVjCttz4ZVLmPiVBJve1nz9tbr4,49
8
+ qcoscloud-0.1.0.dist-info/top_level.txt,sha256=f29BKttED2vK5CedFveT34afLCkKPy3TO2it7xY3EVk,10
9
+ qcoscloud-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (83.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ qcoscloud = qcoscloud.cli:main
@@ -0,0 +1 @@
1
+ qcoscloud