qiskit_serverless.core.ComputeProfile

class ComputeProfile(compute_profile_id, cpu, memory, gpu=None)[source]

One entry of a deployment’s compute-profile catalog.

Obtain these from ServerlessClient.compute_profiles() (the catalog) or ServerlessClient.compute_profile() (a single validated one); both are documented on the client. A profile can be used directly as a sizes_map value when uploading a function — it serializes to its compute_profile_id, so it is interchangeable with that plain string.

compute_profile_id

the deployment’s identifier (e.g. "24x120x1l40s"); the value that travels on the wire in a sizes_map.

cpu

number of vCPUs (e.g. "24").

memory

memory in GB (e.g. "120").

gpu

GPU allocation as count + model (e.g. "1l40s"); None for a CPU-only profile.

__init__(compute_profile_id, cpu, memory, gpu=None)

Methods

__init__(compute_profile_id, cpu, memory[, gpu])

from_json(data)

Build a ComputeProfile from one entry of the compute-profiles endpoint payload.

specs()

Human-readable specs, e.g. 24 vCPU / 120 GB / 1l40s (GPU part omitted if none).

Attributes