Skip to content

Commit 3e76af8

Browse files
authored
feat(qaas): add new billing and qpu tech (#959)
1 parent c997bb4 commit 3e76af8

File tree

4 files changed

+86
-0
lines changed

4 files changed

+86
-0
lines changed

scaleway-async/scaleway_async/qaas/v1alpha1/marshalling.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,14 @@ def unmarshal_Platform(data: Any) -> Platform:
238238
if field is not None:
239239
args["max_qubit_count"] = field
240240

241+
field = data.get("max_shot_count", None)
242+
if field is not None:
243+
args["max_shot_count"] = field
244+
245+
field = data.get("max_circuit_count", None)
246+
if field is not None:
247+
args["max_circuit_count"] = field
248+
241249
field = data.get("availability", None)
242250
if field is not None:
243251
args["availability"] = field
@@ -252,6 +260,18 @@ def unmarshal_Platform(data: Any) -> Platform:
252260
else:
253261
args["price_per_hour"] = None
254262

263+
field = data.get("price_per_shot", None)
264+
if field is not None:
265+
args["price_per_shot"] = unmarshal_Money(field)
266+
else:
267+
args["price_per_shot"] = None
268+
269+
field = data.get("price_per_circuit", None)
270+
if field is not None:
271+
args["price_per_circuit"] = unmarshal_Money(field)
272+
else:
273+
args["price_per_circuit"] = None
274+
255275
field = data.get("hardware", None)
256276
if field is not None:
257277
args["hardware"] = unmarshal_PlatformHardware(field)

scaleway-async/scaleway_async/qaas/v1alpha1/types.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ class PlatformAvailability(str, Enum, metaclass=StrEnumMeta):
135135
AVAILABLE = "available"
136136
SHORTAGE = "shortage"
137137
SCARCE = "scarce"
138+
MAINTENANCE = "maintenance"
138139

139140
def __str__(self) -> str:
140141
return str(self.value)
@@ -144,6 +145,8 @@ class PlatformTechnology(str, Enum, metaclass=StrEnumMeta):
144145
UNKNOWN_TECHNOLOGY = "unknown_technology"
145146
PHOTONIC = "photonic"
146147
GENERAL_PURPOSE = "general_purpose"
148+
TRAPPED_ION = "trapped_ion"
149+
SUPERCONDUCTING = "superconducting"
147150

148151
def __str__(self) -> str:
149152
return str(self.value)
@@ -396,6 +399,16 @@ class Platform:
396399
Estimated maximum number of qubits supported by the platform.
397400
"""
398401

402+
max_shot_count: int
403+
"""
404+
Maximum number of shots during a circuit execution.
405+
"""
406+
407+
max_circuit_count: int
408+
"""
409+
Maximum number of circuit that can be executed in one call.
410+
"""
411+
399412
availability: PlatformAvailability
400413
"""
401414
Availability of the platform.
@@ -411,6 +424,16 @@ class Platform:
411424
Price to be paid per hour (excluding free tiers).
412425
"""
413426

427+
price_per_shot: Optional[Money]
428+
"""
429+
Price to be paid per shot (excluding free tiers).
430+
"""
431+
432+
price_per_circuit: Optional[Money]
433+
"""
434+
Price to be paid per circuit setup before its execution (excluding free tiers).
435+
"""
436+
414437
hardware: Optional[PlatformHardware]
415438
"""
416439
Specifications of the underlying hardware.

scaleway/scaleway/qaas/v1alpha1/marshalling.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,14 @@ def unmarshal_Platform(data: Any) -> Platform:
238238
if field is not None:
239239
args["max_qubit_count"] = field
240240

241+
field = data.get("max_shot_count", None)
242+
if field is not None:
243+
args["max_shot_count"] = field
244+
245+
field = data.get("max_circuit_count", None)
246+
if field is not None:
247+
args["max_circuit_count"] = field
248+
241249
field = data.get("availability", None)
242250
if field is not None:
243251
args["availability"] = field
@@ -252,6 +260,18 @@ def unmarshal_Platform(data: Any) -> Platform:
252260
else:
253261
args["price_per_hour"] = None
254262

263+
field = data.get("price_per_shot", None)
264+
if field is not None:
265+
args["price_per_shot"] = unmarshal_Money(field)
266+
else:
267+
args["price_per_shot"] = None
268+
269+
field = data.get("price_per_circuit", None)
270+
if field is not None:
271+
args["price_per_circuit"] = unmarshal_Money(field)
272+
else:
273+
args["price_per_circuit"] = None
274+
255275
field = data.get("hardware", None)
256276
if field is not None:
257277
args["hardware"] = unmarshal_PlatformHardware(field)

scaleway/scaleway/qaas/v1alpha1/types.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ class PlatformAvailability(str, Enum, metaclass=StrEnumMeta):
135135
AVAILABLE = "available"
136136
SHORTAGE = "shortage"
137137
SCARCE = "scarce"
138+
MAINTENANCE = "maintenance"
138139

139140
def __str__(self) -> str:
140141
return str(self.value)
@@ -144,6 +145,8 @@ class PlatformTechnology(str, Enum, metaclass=StrEnumMeta):
144145
UNKNOWN_TECHNOLOGY = "unknown_technology"
145146
PHOTONIC = "photonic"
146147
GENERAL_PURPOSE = "general_purpose"
148+
TRAPPED_ION = "trapped_ion"
149+
SUPERCONDUCTING = "superconducting"
147150

148151
def __str__(self) -> str:
149152
return str(self.value)
@@ -396,6 +399,16 @@ class Platform:
396399
Estimated maximum number of qubits supported by the platform.
397400
"""
398401

402+
max_shot_count: int
403+
"""
404+
Maximum number of shots during a circuit execution.
405+
"""
406+
407+
max_circuit_count: int
408+
"""
409+
Maximum number of circuit that can be executed in one call.
410+
"""
411+
399412
availability: PlatformAvailability
400413
"""
401414
Availability of the platform.
@@ -411,6 +424,16 @@ class Platform:
411424
Price to be paid per hour (excluding free tiers).
412425
"""
413426

427+
price_per_shot: Optional[Money]
428+
"""
429+
Price to be paid per shot (excluding free tiers).
430+
"""
431+
432+
price_per_circuit: Optional[Money]
433+
"""
434+
Price to be paid per circuit setup before its execution (excluding free tiers).
435+
"""
436+
414437
hardware: Optional[PlatformHardware]
415438
"""
416439
Specifications of the underlying hardware.

0 commit comments

Comments
 (0)