qilisdk.speqtrum.speqtrum_models
Attributes
Classes
!!! abstract "Usage Documentation" |
|
!!! abstract "Usage Documentation" |
|
Represents the structure of the login response: |
|
Device status typing for posting |
|
Device type |
|
!!! abstract "Usage Documentation" |
|
str(object='') -> str |
|
!!! abstract "Usage Documentation" |
|
!!! abstract "Usage Documentation" |
|
!!! abstract "Usage Documentation" |
|
!!! abstract "Usage Documentation" |
|
!!! abstract "Usage Documentation" |
|
!!! abstract "Usage Documentation" |
|
!!! abstract "Usage Documentation" |
|
Strongly typed reference to a submitted SpeQtrum job. |
|
Job has not been submitted to the Lab api |
|
str(object='') -> str |
|
Handle/reference you normally get back immediately after POST /execute. |
|
Light-weight representation suitable for 'list jobs' and polling |
|
Full representation returned by GET /jobs/{id} when payload/result/logs |
|
JobDetail subclass that exposes a strongly typed get_results method. |
Module Contents
- class SpeQtrumModel(/, **data: Any)[source]
Bases:
pydantic.BaseModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- __class_vars__[source]
The names of the class variables defined on the model.
- __private_attributes__[source]
Metadata about the private attributes of the model.
- __signature__[source]
The synthesized __init__ [Signature][inspect.Signature] of the model.
- __pydantic_complete__[source]
Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__[source]
The core schema of the model.
- __pydantic_custom_init__[source]
Whether the model has a custom __init__ function.
- __pydantic_decorators__[source]
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__[source]
A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
- __pydantic_parent_namespace__[source]
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__[source]
The name of the post-init method for the model, if defined.
- __pydantic_root_model__[source]
Whether the model is a [RootModel][pydantic.root_model.RootModel].
- __pydantic_serializer__[source]
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_validator__[source]
The pydantic-core SchemaValidator used to validate instances of the model.
- __pydantic_fields__[source]
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
- __pydantic_computed_fields__[source]
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__[source]
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_fields_set__[source]
The names of fields explicitly set during instantiation.
- __pydantic_private__[source]
Values of private attributes set on the model instance.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- model_config[source]
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class LoginPayload(/, **data: Any)[source]
Bases:
pydantic.BaseModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- __class_vars__[source]
The names of the class variables defined on the model.
- __private_attributes__[source]
Metadata about the private attributes of the model.
- __signature__[source]
The synthesized __init__ [Signature][inspect.Signature] of the model.
- __pydantic_complete__[source]
Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__[source]
The core schema of the model.
- __pydantic_custom_init__[source]
Whether the model has a custom __init__ function.
- __pydantic_decorators__[source]
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__[source]
A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
- __pydantic_parent_namespace__[source]
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__[source]
The name of the post-init method for the model, if defined.
- __pydantic_root_model__[source]
Whether the model is a [RootModel][pydantic.root_model.RootModel].
- __pydantic_serializer__[source]
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_validator__[source]
The pydantic-core SchemaValidator used to validate instances of the model.
- __pydantic_fields__[source]
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
- __pydantic_computed_fields__[source]
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__[source]
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_fields_set__[source]
The names of fields explicitly set during instantiation.
- __pydantic_private__[source]
Values of private attributes set on the model instance.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- class Token(/, **data: Any)[source]
Bases:
SpeQtrumModelRepresents the structure of the login response: { “accessToken”: “…”, “expiresIn”: 123456789, “issuedAt”: “123456789”, “refreshToken”: “…”, “tokenType”: “bearer” }
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- access_token: str = None[source]
- expires_in: int = None[source]
- issued_at: str = None[source]
- refresh_token: str = None[source]
- token_type: str = None[source]
- class DeviceStatus[source]
Bases:
str,enum.EnumDevice status typing for posting
Initialize self. See help(type(self)) for accurate signature.
- ONLINE = 'online'[source]
- MAINTENANCE = 'maintenance'[source]
- OFFLINE = 'offline'[source]
- class DeviceType[source]
Bases:
str,enum.EnumDevice type
Initialize self. See help(type(self)) for accurate signature.
- QPU_ANALOG = 'qpu.analog'[source]
- QPU_DIGITAL = 'qpu.digital'[source]
- SIMULATOR = 'simulator'[source]
- class Device(/, **data: Any)[source]
Bases:
SpeQtrumModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- __class_vars__[source]
The names of the class variables defined on the model.
- __private_attributes__[source]
Metadata about the private attributes of the model.
- __signature__[source]
The synthesized __init__ [Signature][inspect.Signature] of the model.
- __pydantic_complete__[source]
Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__[source]
The core schema of the model.
- __pydantic_custom_init__[source]
Whether the model has a custom __init__ function.
- __pydantic_decorators__[source]
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__[source]
A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
- __pydantic_parent_namespace__[source]
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__[source]
The name of the post-init method for the model, if defined.
- __pydantic_root_model__[source]
Whether the model is a [RootModel][pydantic.root_model.RootModel].
- __pydantic_serializer__[source]
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_validator__[source]
The pydantic-core SchemaValidator used to validate instances of the model.
- __pydantic_fields__[source]
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
- __pydantic_computed_fields__[source]
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__[source]
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_fields_set__[source]
The names of fields explicitly set during instantiation.
- __pydantic_private__[source]
Values of private attributes set on the model instance.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- code: str = None[source]
- nqubits: int = None[source]
- name: str = None[source]
- description: str = None[source]
- type: DeviceType = None[source]
- status: DeviceStatus = None[source]
- class ExecuteType[source]
Bases:
str,enum.Enumstr(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to ‘utf-8’. errors defaults to ‘strict’.
Initialize self. See help(type(self)) for accurate signature.
- SAMPLING = 'sampling'[source]
- TIME_EVOLUTION = 'time_evolution'[source]
- VARIATIONAL_PROGRAM = 'variational_program'[source]
- RABI_EXPERIMENT = 'rabi_experiment'[source]
- T1_EXPERIMENT = 't1_experiment'[source]
- class SamplingPayload(/, **data: Any)[source]
Bases:
SpeQtrumModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- __class_vars__[source]
The names of the class variables defined on the model.
- __private_attributes__[source]
Metadata about the private attributes of the model.
- __signature__[source]
The synthesized __init__ [Signature][inspect.Signature] of the model.
- __pydantic_complete__[source]
Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__[source]
The core schema of the model.
- __pydantic_custom_init__[source]
Whether the model has a custom __init__ function.
- __pydantic_decorators__[source]
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__[source]
A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
- __pydantic_parent_namespace__[source]
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__[source]
The name of the post-init method for the model, if defined.
- __pydantic_root_model__[source]
Whether the model is a [RootModel][pydantic.root_model.RootModel].
- __pydantic_serializer__[source]
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_validator__[source]
The pydantic-core SchemaValidator used to validate instances of the model.
- __pydantic_fields__[source]
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
- __pydantic_computed_fields__[source]
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__[source]
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_fields_set__[source]
The names of fields explicitly set during instantiation.
- __pydantic_private__[source]
Values of private attributes set on the model instance.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- sampling: qilisdk.functionals.Sampling = None[source]
- class TimeEvolutionPayload(/, **data: Any)[source]
Bases:
SpeQtrumModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- __class_vars__[source]
The names of the class variables defined on the model.
- __private_attributes__[source]
Metadata about the private attributes of the model.
- __signature__[source]
The synthesized __init__ [Signature][inspect.Signature] of the model.
- __pydantic_complete__[source]
Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__[source]
The core schema of the model.
- __pydantic_custom_init__[source]
Whether the model has a custom __init__ function.
- __pydantic_decorators__[source]
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__[source]
A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
- __pydantic_parent_namespace__[source]
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__[source]
The name of the post-init method for the model, if defined.
- __pydantic_root_model__[source]
Whether the model is a [RootModel][pydantic.root_model.RootModel].
- __pydantic_serializer__[source]
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_validator__[source]
The pydantic-core SchemaValidator used to validate instances of the model.
- __pydantic_fields__[source]
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
- __pydantic_computed_fields__[source]
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__[source]
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_fields_set__[source]
The names of fields explicitly set during instantiation.
- __pydantic_private__[source]
Values of private attributes set on the model instance.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- time_evolution: qilisdk.functionals.TimeEvolution = None[source]
- class VariationalProgramPayload(/, **data: Any)[source]
Bases:
SpeQtrumModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- __class_vars__[source]
The names of the class variables defined on the model.
- __private_attributes__[source]
Metadata about the private attributes of the model.
- __signature__[source]
The synthesized __init__ [Signature][inspect.Signature] of the model.
- __pydantic_complete__[source]
Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__[source]
The core schema of the model.
- __pydantic_custom_init__[source]
Whether the model has a custom __init__ function.
- __pydantic_decorators__[source]
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__[source]
A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
- __pydantic_parent_namespace__[source]
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__[source]
The name of the post-init method for the model, if defined.
- __pydantic_root_model__[source]
Whether the model is a [RootModel][pydantic.root_model.RootModel].
- __pydantic_serializer__[source]
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_validator__[source]
The pydantic-core SchemaValidator used to validate instances of the model.
- __pydantic_fields__[source]
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
- __pydantic_computed_fields__[source]
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__[source]
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_fields_set__[source]
The names of fields explicitly set during instantiation.
- __pydantic_private__[source]
Values of private attributes set on the model instance.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- variational_program: qilisdk.functionals.VariationalProgram = None[source]
- class RabiExperimentPayload(/, **data: Any)[source]
Bases:
SpeQtrumModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- __class_vars__[source]
The names of the class variables defined on the model.
- __private_attributes__[source]
Metadata about the private attributes of the model.
- __signature__[source]
The synthesized __init__ [Signature][inspect.Signature] of the model.
- __pydantic_complete__[source]
Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__[source]
The core schema of the model.
- __pydantic_custom_init__[source]
Whether the model has a custom __init__ function.
- __pydantic_decorators__[source]
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__[source]
A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
- __pydantic_parent_namespace__[source]
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__[source]
The name of the post-init method for the model, if defined.
- __pydantic_root_model__[source]
Whether the model is a [RootModel][pydantic.root_model.RootModel].
- __pydantic_serializer__[source]
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_validator__[source]
The pydantic-core SchemaValidator used to validate instances of the model.
- __pydantic_fields__[source]
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
- __pydantic_computed_fields__[source]
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__[source]
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_fields_set__[source]
The names of fields explicitly set during instantiation.
- __pydantic_private__[source]
Values of private attributes set on the model instance.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- rabi_experiment: qilisdk.speqtrum.experiments.RabiExperiment = None[source]
- class T1ExperimentPayload(/, **data: Any)[source]
Bases:
SpeQtrumModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- __class_vars__[source]
The names of the class variables defined on the model.
- __private_attributes__[source]
Metadata about the private attributes of the model.
- __signature__[source]
The synthesized __init__ [Signature][inspect.Signature] of the model.
- __pydantic_complete__[source]
Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__[source]
The core schema of the model.
- __pydantic_custom_init__[source]
Whether the model has a custom __init__ function.
- __pydantic_decorators__[source]
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__[source]
A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
- __pydantic_parent_namespace__[source]
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__[source]
The name of the post-init method for the model, if defined.
- __pydantic_root_model__[source]
Whether the model is a [RootModel][pydantic.root_model.RootModel].
- __pydantic_serializer__[source]
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_validator__[source]
The pydantic-core SchemaValidator used to validate instances of the model.
- __pydantic_fields__[source]
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
- __pydantic_computed_fields__[source]
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__[source]
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_fields_set__[source]
The names of fields explicitly set during instantiation.
- __pydantic_private__[source]
Values of private attributes set on the model instance.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- t1_experiment: qilisdk.speqtrum.experiments.T1Experiment = None[source]
- class ExecutePayload(/, **data: Any)[source]
Bases:
SpeQtrumModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- __class_vars__[source]
The names of the class variables defined on the model.
- __private_attributes__[source]
Metadata about the private attributes of the model.
- __signature__[source]
The synthesized __init__ [Signature][inspect.Signature] of the model.
- __pydantic_complete__[source]
Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__[source]
The core schema of the model.
- __pydantic_custom_init__[source]
Whether the model has a custom __init__ function.
- __pydantic_decorators__[source]
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__[source]
A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
- __pydantic_parent_namespace__[source]
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__[source]
The name of the post-init method for the model, if defined.
- __pydantic_root_model__[source]
Whether the model is a [RootModel][pydantic.root_model.RootModel].
- __pydantic_serializer__[source]
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_validator__[source]
The pydantic-core SchemaValidator used to validate instances of the model.
- __pydantic_fields__[source]
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
- __pydantic_computed_fields__[source]
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__[source]
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_fields_set__[source]
The names of fields explicitly set during instantiation.
- __pydantic_private__[source]
Values of private attributes set on the model instance.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- type: ExecuteType = None[source]
- sampling_payload: SamplingPayload | None = None[source]
- time_evolution_payload: TimeEvolutionPayload | None = None[source]
- variational_program_payload: VariationalProgramPayload | None = None[source]
- rabi_experiment_payload: RabiExperimentPayload | None = None[source]
- t1_experiment_payload: T1ExperimentPayload | None = None[source]
- class ExecuteResult(/, **data: Any)[source]
Bases:
SpeQtrumModel- !!! abstract “Usage Documentation”
[Models](../concepts/models.md)
A base class for creating Pydantic models.
- __class_vars__[source]
The names of the class variables defined on the model.
- __private_attributes__[source]
Metadata about the private attributes of the model.
- __signature__[source]
The synthesized __init__ [Signature][inspect.Signature] of the model.
- __pydantic_complete__[source]
Whether model building is completed, or if there are still undefined fields.
- __pydantic_core_schema__[source]
The core schema of the model.
- __pydantic_custom_init__[source]
Whether the model has a custom __init__ function.
- __pydantic_decorators__[source]
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
- __pydantic_generic_metadata__[source]
A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [__origin__][genericalias.__origin__] and [__args__][genericalias.__args__] attributes of [generic aliases][types-genericalias], and the parameter item maps to the __parameter__ attribute of generic classes.
- __pydantic_parent_namespace__[source]
Parent namespace of the model, used for automatic rebuilding of models.
- __pydantic_post_init__[source]
The name of the post-init method for the model, if defined.
- __pydantic_root_model__[source]
Whether the model is a [RootModel][pydantic.root_model.RootModel].
- __pydantic_serializer__[source]
The pydantic-core SchemaSerializer used to dump instances of the model.
- __pydantic_validator__[source]
The pydantic-core SchemaValidator used to validate instances of the model.
- __pydantic_fields__[source]
A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
- __pydantic_computed_fields__[source]
A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- __pydantic_extra__[source]
A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to ‘allow’.
- __pydantic_fields_set__[source]
The names of fields explicitly set during instantiation.
- __pydantic_private__[source]
Values of private attributes set on the model instance.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- type: ExecuteType = None[source]
- sampling_result: qilisdk.functionals.SamplingResult | None = None[source]
- time_evolution_result: qilisdk.functionals.TimeEvolutionResult | None = None[source]
- variational_program_result: qilisdk.functionals.VariationalProgramResult | None = None[source]
- rabi_experiment_result: qilisdk.speqtrum.experiments.RabiExperimentResult | None = None[source]
- t1_experiment_result: qilisdk.speqtrum.experiments.T1ExperimentResult | None = None[source]
- ResultT_co[source]
- VariationalInnerResultT[source]
- ResultExtractor[source]
- class JobHandle(/, **data: Any)[source]
Bases:
SpeQtrumModel,Generic[ResultT_co]Strongly typed reference to a submitted SpeQtrum job.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- id: int[source]
- execute_type: ExecuteType[source]
- extractor: ResultExtractor[ResultT_co] = None[source]
- classmethod variational_program(job_id: int) JobHandle[VariationalProgramResult][source]
- classmethod variational_program(job_id: int, *, result_type: type[VariationalInnerResultT]) JobHandle[VariationalProgramResult[VariationalInnerResultT]]
Create a variational-program handle for an existing job identifier.
- Parameters:
job_id – Numeric identifier returned by the SpeQtrum service.
result_type – Optional functional result type expected within the variational program payload. When provided the returned handle enforces that the optimiser output matches this type.
- Returns:
A handle whose
get_resultsinvocation yields aVariationalProgramResultpreserving the requested inner result type when supplied.- Return type:
- bind(detail: JobDetail) TypedJobDetail[ResultT_co][source]
Attach this handle’s typing information to a concrete job detail.
- Parameters:
detail – Un-typed job detail payload returned by the SpeQtrum API.
- Returns:
Wrapper exposing
get_resultswith the typing captured when the handle was created.- Return type:
- class JobStatus[source]
Bases:
str,enum.EnumJob has not been submitted to the Lab api
Initialize self. See help(type(self)) for accurate signature.
- PENDING = 'pending'[source]
Job has been queued but not yet validated
- VALIDATING = 'validating'[source]
Job has been validated and is queued for execution
- QUEUED = 'queued'[source]
Job is being executed on the device
- RUNNING = 'running'[source]
Job finished successfully
- COMPLETED = 'completed'[source]
Job failed due to an error
- ERROR = 'error'[source]
Job was cancelled by the user or system
- CANCELLED = 'cancelled'[source]
Job failed due to timeout
- TIMEOUT = 'timeout'[source]
- class JobType[source]
Bases:
str,enum.Enumstr(object=’’) -> str str(bytes_or_buffer[, encoding[, errors]]) -> str
Create a new string object from the given object. If encoding or errors is specified, then the object must expose a data buffer that will be decoded using the given encoding and error handler. Otherwise, returns the result of object.__str__() (if defined) or repr(object). encoding defaults to ‘utf-8’. errors defaults to ‘strict’.
Initialize self. See help(type(self)) for accurate signature.
- DIGITAL = 'digital'[source]
- PULSE = 'pulse'[source]
- ANALOG = 'analog'[source]
- VARIATIONAL = 'variational'[source]
- class JobId(/, **data: Any)[source]
Bases:
SpeQtrumModelHandle/reference you normally get back immediately after POST /execute.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- id: int = None[source]
- class JobInfo(/, **data: Any)[source]
Bases:
JobIdLight-weight representation suitable for ‘list jobs’ and polling when you do not need logs or results.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- name: str = None[source]
- description: str = None[source]
- device_id: int = None[source]
- created_at: pydantic.AwareDatetime = None[source]
- updated_at: pydantic.AwareDatetime | None = None[source]
- completed_at: pydantic.AwareDatetime | None = None[source]
- class JobDetail(/, **data: Any)[source]
Bases:
JobInfoFull representation returned by GET /jobs/{id} when payload/result/logs are requested.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- payload: ExecutePayload | None = None[source]
- result: ExecuteResult | None = None[source]
- logs: str | None = None[source]
- error: str | None = None[source]
- error_logs: str | None = None[source]
- class TypedJobDetail(/, **data: Any)[source]
Bases:
JobDetail,Generic[ResultT_co]JobDetail subclass that exposes a strongly typed get_results method.
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- expected_type: ExecuteType = None[source]
- extractor: ResultExtractor[ResultT_co] = None[source]
- get_results() ResultT_co[source]
Return the strongly typed execution result.
- Returns:
Result payload associated with the completed job, respecting the type information carried by the originating
JobHandle.- Return type:
ResultT_co
- Raises:
RuntimeError – If SpeQtrum has not populated the result payload or the execute type disagrees with the handle.