strangeworks_qiskit.platform package

Submodules

strangeworks_qiskit.platform.backends module

backends.py

class QiskitBackend(*args, remote_id: str | None = <property object>, remote_status: str | None = None, name: str, slug: str, status: ~strangeworks_core.types.backend.Status, backend_id: str | None = None, data: ~typing.Dict[str, ~typing.Any] | None = None, data_schema: str | None = None, remote_backend_id: str | None = None, date_created: str | None = None, date_updated: str | None = None, product: ~strangeworks_core.types.product.Product | None = None, backendRegistrations: ~typing.List[~strangeworks_qiskit.platform.backends.Registration] | None = [])

Bases: Backend

Backend Class representing a Qiskit Backend.

get_config() dict | None

Get backend configuration.

get_registration() Registration | None

Get Qiskit-related backend info.

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'backend_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias=AliasChoices(choices=['id', 'backend_id']), alias_priority=2), 'data': FieldInfo(annotation=Union[Dict[str, Any], NoneType], required=False, default=None), 'data_schema': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias=AliasChoices(choices=['data_schema', 'dataSchema']), alias_priority=2), 'date_created': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias=AliasChoices(choices=['date_created', 'dateCreated']), alias_priority=2), 'date_updated': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias=AliasChoices(choices=['date_updated', 'dateUpdated']), alias_priority=2), 'name': FieldInfo(annotation=str, required=True), 'product': FieldInfo(annotation=Union[Product, NoneType], required=False, default=None), 'registrations': FieldInfo(annotation=Union[List[Registration], NoneType], required=False, default=[], alias='backendRegistrations', alias_priority=2), 'remote_backend_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=2, validation_alias=AliasChoices(choices=['remote_backend_id', 'remoteBackendId']), serialization_alias='remoteBackendID'), 'remote_id': FieldInfo(annotation=Union[str, NoneType], required=False, default=<property object>), 'remote_status': FieldInfo(annotation=Union[str, NoneType], required=False, default=None, alias_priority=2, validation_alias=AliasChoices(choices=['remote_status', 'remoteStatus']), serialization_alias='remoteStatus'), 'slug': FieldInfo(annotation=str, required=True), 'status': FieldInfo(annotation=Status, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

registrations: List[Registration] | None
class Registration(*args, backendType: dict, data: dict | None = {})

Bases: BaseModel

Backend Registration object.

Includes the configuration data and type slug.

backendType: dict
data: dict | None
is_qiskit() bool

Check if backend is of type qiskit.

model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[dict[str, FieldInfo]] = {'backendType': FieldInfo(annotation=dict, required=True), 'data': FieldInfo(annotation=Union[dict, NoneType], required=False, default={})}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].

This replaces Model.__fields__ from Pydantic V1.

property type_slug: str | None

Backend Type Slug.

get(api: SDKAPI, statuses: List[str] | None = None, product_slugs: List[str] | None = None) List[QiskitBackend] | None

Get backends from Strangeworks.

get_status(api: SDKAPI, backend_slug: str) Dict[str, Any]

Get status for backend identified by its slug.

Module contents