qilisdk.speqtrum.speqtrum_models

Attributes

TFunctionalResult_co

TVariationalInnerResult

ResultExtractor

Classes

SpeQtrumModel

!!! abstract "Usage Documentation"

LoginPayload

!!! abstract "Usage Documentation"

Token

Represents the structure of the login response:

DeviceStatus

Device status typing for posting

DeviceType

Device type

Device

!!! abstract "Usage Documentation"

ExecuteType

str(object='') -> str

SamplingPayload

!!! abstract "Usage Documentation"

TimeEvolutionPayload

!!! abstract "Usage Documentation"

VariationalProgramPayload

!!! abstract "Usage Documentation"

RabiExperimentPayload

!!! abstract "Usage Documentation"

T1ExperimentPayload

!!! abstract "Usage Documentation"

T2ExperimentPayload

!!! abstract "Usage Documentation"

TwoTonesExperimentPayload

!!! abstract "Usage Documentation"

ExecutePayload

!!! abstract "Usage Documentation"

ExecuteResult

!!! abstract "Usage Documentation"

JobHandle

Strongly typed reference to a submitted SpeQtrum job.

JobStatus

Job has not been submitted to the Lab api

JobType

str(object='') -> str

JobId

Handle/reference you normally get back immediately after POST /execute.

JobInfo

Light-weight representation suitable for 'list jobs' and polling

JobDetail

Full representation returned by GET /jobs/{id} when payload/result/logs

TypedJobDetail

JobDetail subclass that exposes a strongly typed get_results method.

Module Contents

class SpeQtrumModel(/, **data: Any)[font]

Bases: pydantic.BaseModel

!!! abstract «Usage Documentation»

[Models](../concepts/models.md)

A base class for creating Pydantic models.

__class_vars__[font]

The names of the class variables defined on the model.

__private_attributes__[font]

Metadata about the private attributes of the model.

__signature__[font]

The synthesized __init__ [Signature][inspect.Signature] of the model.

__pydantic_complete__[font]

Whether model building is completed, or if there are still undefined fields.

__pydantic_core_schema__[font]

The core schema of the model.

__pydantic_custom_init__[font]

Whether the model has a custom __init__ function.

__pydantic_decorators__[font]

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_generic_metadata__[font]

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__[font]

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__[font]

The name of the post-init method for the model, if defined.

__pydantic_root_model__[font]

Whether the model is a [RootModel][pydantic.root_model.RootModel].

__pydantic_serializer__[font]

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_validator__[font]

The pydantic-core SchemaValidator used to validate instances of the model.

__pydantic_fields__[font]

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.

__pydantic_computed_fields__[font]

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_extra__[font]

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to “allow”.

__pydantic_fields_set__[font]

The names of fields explicitly set during instantiation.

__pydantic_private__[font]

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[font]

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

class LoginPayload(/, **data: Any)[font]

Bases: pydantic.BaseModel

!!! abstract «Usage Documentation»

[Models](../concepts/models.md)

A base class for creating Pydantic models.

__class_vars__[font]

The names of the class variables defined on the model.

__private_attributes__[font]

Metadata about the private attributes of the model.

__signature__[font]

The synthesized __init__ [Signature][inspect.Signature] of the model.

__pydantic_complete__[font]

Whether model building is completed, or if there are still undefined fields.

__pydantic_core_schema__[font]

The core schema of the model.

__pydantic_custom_init__[font]

Whether the model has a custom __init__ function.

__pydantic_decorators__[font]

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_generic_metadata__[font]

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__[font]

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__[font]

The name of the post-init method for the model, if defined.

__pydantic_root_model__[font]

Whether the model is a [RootModel][pydantic.root_model.RootModel].

__pydantic_serializer__[font]

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_validator__[font]

The pydantic-core SchemaValidator used to validate instances of the model.

__pydantic_fields__[font]

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.

__pydantic_computed_fields__[font]

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_extra__[font]

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to “allow”.

__pydantic_fields_set__[font]

The names of fields explicitly set during instantiation.

__pydantic_private__[font]

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)[font]

Bases: SpeQtrumModel

Represents 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[font]
expires_in: int = None[font]
issued_at: int = None[font]
refresh_token: str = None[font]
token_type: str = None[font]
class DeviceStatus[font]

Bases: str, enum.Enum

Device status typing for posting

Initialize self. See help(type(self)) for accurate signature.

ONLINE = 'online'[font]
MAINTENANCE = 'maintenance'[font]
OFFLINE = 'offline'[font]
class DeviceType[font]

Bases: str, enum.Enum

Device type

Initialize self. See help(type(self)) for accurate signature.

QPU_ANALOG = 'qpu.analog'[font]
QPU_DIGITAL = 'qpu.digital'[font]
SIMULATOR = 'simulator'[font]
class Device(/, **data: Any)[font]

Bases: SpeQtrumModel

!!! abstract «Usage Documentation»

[Models](../concepts/models.md)

A base class for creating Pydantic models.

__class_vars__[font]

The names of the class variables defined on the model.

__private_attributes__[font]

Metadata about the private attributes of the model.

__signature__[font]

The synthesized __init__ [Signature][inspect.Signature] of the model.

__pydantic_complete__[font]

Whether model building is completed, or if there are still undefined fields.

__pydantic_core_schema__[font]

The core schema of the model.

__pydantic_custom_init__[font]

Whether the model has a custom __init__ function.

__pydantic_decorators__[font]

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_generic_metadata__[font]

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__[font]

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__[font]

The name of the post-init method for the model, if defined.

__pydantic_root_model__[font]

Whether the model is a [RootModel][pydantic.root_model.RootModel].

__pydantic_serializer__[font]

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_validator__[font]

The pydantic-core SchemaValidator used to validate instances of the model.

__pydantic_fields__[font]

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.

__pydantic_computed_fields__[font]

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_extra__[font]

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to “allow”.

__pydantic_fields_set__[font]

The names of fields explicitly set during instantiation.

__pydantic_private__[font]

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[font]
nqubits: int = None[font]
name: str = None[font]
description: str = None[font]
type: DeviceType = None[font]
status: DeviceStatus = None[font]
class ExecuteType[font]

Bases: str, enum.Enum

str(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'[font]
TIME_EVOLUTION = 'time_evolution'[font]
VARIATIONAL_PROGRAM = 'variational_program'[font]
RABI_EXPERIMENT = 'rabi_experiment'[font]
T1_EXPERIMENT = 't1_experiment'[font]
T2_EXPERIMENT = 't2_experiment'[font]
TWO_TONES_EXPERIMENT = 'two_tones_experiment'[font]
class SamplingPayload(/, **data: Any)[font]

Bases: SpeQtrumModel

!!! abstract «Usage Documentation»

[Models](../concepts/models.md)

A base class for creating Pydantic models.

__class_vars__[font]

The names of the class variables defined on the model.

__private_attributes__[font]

Metadata about the private attributes of the model.

__signature__[font]

The synthesized __init__ [Signature][inspect.Signature] of the model.

__pydantic_complete__[font]

Whether model building is completed, or if there are still undefined fields.

__pydantic_core_schema__[font]

The core schema of the model.

__pydantic_custom_init__[font]

Whether the model has a custom __init__ function.

__pydantic_decorators__[font]

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_generic_metadata__[font]

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__[font]

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__[font]

The name of the post-init method for the model, if defined.

__pydantic_root_model__[font]

Whether the model is a [RootModel][pydantic.root_model.RootModel].

__pydantic_serializer__[font]

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_validator__[font]

The pydantic-core SchemaValidator used to validate instances of the model.

__pydantic_fields__[font]

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.

__pydantic_computed_fields__[font]

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_extra__[font]

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to “allow”.

__pydantic_fields_set__[font]

The names of fields explicitly set during instantiation.

__pydantic_private__[font]

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[font]
class TimeEvolutionPayload(/, **data: Any)[font]

Bases: SpeQtrumModel

!!! abstract «Usage Documentation»

[Models](../concepts/models.md)

A base class for creating Pydantic models.

__class_vars__[font]

The names of the class variables defined on the model.

__private_attributes__[font]

Metadata about the private attributes of the model.

__signature__[font]

The synthesized __init__ [Signature][inspect.Signature] of the model.

__pydantic_complete__[font]

Whether model building is completed, or if there are still undefined fields.

__pydantic_core_schema__[font]

The core schema of the model.

__pydantic_custom_init__[font]

Whether the model has a custom __init__ function.

__pydantic_decorators__[font]

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_generic_metadata__[font]

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__[font]

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__[font]

The name of the post-init method for the model, if defined.

__pydantic_root_model__[font]

Whether the model is a [RootModel][pydantic.root_model.RootModel].

__pydantic_serializer__[font]

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_validator__[font]

The pydantic-core SchemaValidator used to validate instances of the model.

__pydantic_fields__[font]

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.

__pydantic_computed_fields__[font]

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_extra__[font]

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to “allow”.

__pydantic_fields_set__[font]

The names of fields explicitly set during instantiation.

__pydantic_private__[font]

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[font]
class VariationalProgramPayload(/, **data: Any)[font]

Bases: SpeQtrumModel

!!! abstract «Usage Documentation»

[Models](../concepts/models.md)

A base class for creating Pydantic models.

__class_vars__[font]

The names of the class variables defined on the model.

__private_attributes__[font]

Metadata about the private attributes of the model.

__signature__[font]

The synthesized __init__ [Signature][inspect.Signature] of the model.

__pydantic_complete__[font]

Whether model building is completed, or if there are still undefined fields.

__pydantic_core_schema__[font]

The core schema of the model.

__pydantic_custom_init__[font]

Whether the model has a custom __init__ function.

__pydantic_decorators__[font]

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_generic_metadata__[font]

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__[font]

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__[font]

The name of the post-init method for the model, if defined.

__pydantic_root_model__[font]

Whether the model is a [RootModel][pydantic.root_model.RootModel].

__pydantic_serializer__[font]

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_validator__[font]

The pydantic-core SchemaValidator used to validate instances of the model.

__pydantic_fields__[font]

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.

__pydantic_computed_fields__[font]

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_extra__[font]

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to “allow”.

__pydantic_fields_set__[font]

The names of fields explicitly set during instantiation.

__pydantic_private__[font]

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[font]
class RabiExperimentPayload(/, **data: Any)[font]

Bases: SpeQtrumModel

!!! abstract «Usage Documentation»

[Models](../concepts/models.md)

A base class for creating Pydantic models.

__class_vars__[font]

The names of the class variables defined on the model.

__private_attributes__[font]

Metadata about the private attributes of the model.

__signature__[font]

The synthesized __init__ [Signature][inspect.Signature] of the model.

__pydantic_complete__[font]

Whether model building is completed, or if there are still undefined fields.

__pydantic_core_schema__[font]

The core schema of the model.

__pydantic_custom_init__[font]

Whether the model has a custom __init__ function.

__pydantic_decorators__[font]

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_generic_metadata__[font]

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__[font]

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__[font]

The name of the post-init method for the model, if defined.

__pydantic_root_model__[font]

Whether the model is a [RootModel][pydantic.root_model.RootModel].

__pydantic_serializer__[font]

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_validator__[font]

The pydantic-core SchemaValidator used to validate instances of the model.

__pydantic_fields__[font]

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.

__pydantic_computed_fields__[font]

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_extra__[font]

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to “allow”.

__pydantic_fields_set__[font]

The names of fields explicitly set during instantiation.

__pydantic_private__[font]

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.experiments.RabiExperiment = None[font]
class T1ExperimentPayload(/, **data: Any)[font]

Bases: SpeQtrumModel

!!! abstract «Usage Documentation»

[Models](../concepts/models.md)

A base class for creating Pydantic models.

__class_vars__[font]

The names of the class variables defined on the model.

__private_attributes__[font]

Metadata about the private attributes of the model.

__signature__[font]

The synthesized __init__ [Signature][inspect.Signature] of the model.

__pydantic_complete__[font]

Whether model building is completed, or if there are still undefined fields.

__pydantic_core_schema__[font]

The core schema of the model.

__pydantic_custom_init__[font]

Whether the model has a custom __init__ function.

__pydantic_decorators__[font]

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_generic_metadata__[font]

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__[font]

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__[font]

The name of the post-init method for the model, if defined.

__pydantic_root_model__[font]

Whether the model is a [RootModel][pydantic.root_model.RootModel].

__pydantic_serializer__[font]

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_validator__[font]

The pydantic-core SchemaValidator used to validate instances of the model.

__pydantic_fields__[font]

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.

__pydantic_computed_fields__[font]

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_extra__[font]

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to “allow”.

__pydantic_fields_set__[font]

The names of fields explicitly set during instantiation.

__pydantic_private__[font]

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.experiments.T1Experiment = None[font]
class T2ExperimentPayload(/, **data: Any)[font]

Bases: SpeQtrumModel

!!! abstract «Usage Documentation»

[Models](../concepts/models.md)

A base class for creating Pydantic models.

__class_vars__[font]

The names of the class variables defined on the model.

__private_attributes__[font]

Metadata about the private attributes of the model.

__signature__[font]

The synthesized __init__ [Signature][inspect.Signature] of the model.

__pydantic_complete__[font]

Whether model building is completed, or if there are still undefined fields.

__pydantic_core_schema__[font]

The core schema of the model.

__pydantic_custom_init__[font]

Whether the model has a custom __init__ function.

__pydantic_decorators__[font]

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_generic_metadata__[font]

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__[font]

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__[font]

The name of the post-init method for the model, if defined.

__pydantic_root_model__[font]

Whether the model is a [RootModel][pydantic.root_model.RootModel].

__pydantic_serializer__[font]

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_validator__[font]

The pydantic-core SchemaValidator used to validate instances of the model.

__pydantic_fields__[font]

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.

__pydantic_computed_fields__[font]

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_extra__[font]

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to “allow”.

__pydantic_fields_set__[font]

The names of fields explicitly set during instantiation.

__pydantic_private__[font]

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.

t2_experiment: qilisdk.experiments.T2Experiment = None[font]
class TwoTonesExperimentPayload(/, **data: Any)[font]

Bases: SpeQtrumModel

!!! abstract «Usage Documentation»

[Models](../concepts/models.md)

A base class for creating Pydantic models.

__class_vars__[font]

The names of the class variables defined on the model.

__private_attributes__[font]

Metadata about the private attributes of the model.

__signature__[font]

The synthesized __init__ [Signature][inspect.Signature] of the model.

__pydantic_complete__[font]

Whether model building is completed, or if there are still undefined fields.

__pydantic_core_schema__[font]

The core schema of the model.

__pydantic_custom_init__[font]

Whether the model has a custom __init__ function.

__pydantic_decorators__[font]

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_generic_metadata__[font]

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__[font]

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__[font]

The name of the post-init method for the model, if defined.

__pydantic_root_model__[font]

Whether the model is a [RootModel][pydantic.root_model.RootModel].

__pydantic_serializer__[font]

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_validator__[font]

The pydantic-core SchemaValidator used to validate instances of the model.

__pydantic_fields__[font]

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.

__pydantic_computed_fields__[font]

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_extra__[font]

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to “allow”.

__pydantic_fields_set__[font]

The names of fields explicitly set during instantiation.

__pydantic_private__[font]

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.

two_tones_experiment: qilisdk.experiments.TwoTonesExperiment = None[font]
class ExecutePayload(/, **data: Any)[font]

Bases: SpeQtrumModel

!!! abstract «Usage Documentation»

[Models](../concepts/models.md)

A base class for creating Pydantic models.

__class_vars__[font]

The names of the class variables defined on the model.

__private_attributes__[font]

Metadata about the private attributes of the model.

__signature__[font]

The synthesized __init__ [Signature][inspect.Signature] of the model.

__pydantic_complete__[font]

Whether model building is completed, or if there are still undefined fields.

__pydantic_core_schema__[font]

The core schema of the model.

__pydantic_custom_init__[font]

Whether the model has a custom __init__ function.

__pydantic_decorators__[font]

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_generic_metadata__[font]

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__[font]

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__[font]

The name of the post-init method for the model, if defined.

__pydantic_root_model__[font]

Whether the model is a [RootModel][pydantic.root_model.RootModel].

__pydantic_serializer__[font]

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_validator__[font]

The pydantic-core SchemaValidator used to validate instances of the model.

__pydantic_fields__[font]

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.

__pydantic_computed_fields__[font]

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_extra__[font]

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to “allow”.

__pydantic_fields_set__[font]

The names of fields explicitly set during instantiation.

__pydantic_private__[font]

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[font]
sampling_payload: SamplingPayload | None = None[font]
time_evolution_payload: TimeEvolutionPayload | None = None[font]
variational_program_payload: VariationalProgramPayload | None = None[font]
rabi_experiment_payload: RabiExperimentPayload | None = None[font]
t1_experiment_payload: T1ExperimentPayload | None = None[font]
t2_experiment_payload: T2ExperimentPayload | None = None[font]
two_tones_experiment_payload: TwoTonesExperimentPayload | None = None[font]
class ExecuteResult(/, **data: Any)[font]

Bases: SpeQtrumModel

!!! abstract «Usage Documentation»

[Models](../concepts/models.md)

A base class for creating Pydantic models.

__class_vars__[font]

The names of the class variables defined on the model.

__private_attributes__[font]

Metadata about the private attributes of the model.

__signature__[font]

The synthesized __init__ [Signature][inspect.Signature] of the model.

__pydantic_complete__[font]

Whether model building is completed, or if there are still undefined fields.

__pydantic_core_schema__[font]

The core schema of the model.

__pydantic_custom_init__[font]

Whether the model has a custom __init__ function.

__pydantic_decorators__[font]

Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.

__pydantic_generic_metadata__[font]

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__[font]

Parent namespace of the model, used for automatic rebuilding of models.

__pydantic_post_init__[font]

The name of the post-init method for the model, if defined.

__pydantic_root_model__[font]

Whether the model is a [RootModel][pydantic.root_model.RootModel].

__pydantic_serializer__[font]

The pydantic-core SchemaSerializer used to dump instances of the model.

__pydantic_validator__[font]

The pydantic-core SchemaValidator used to validate instances of the model.

__pydantic_fields__[font]

A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.

__pydantic_computed_fields__[font]

A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.

__pydantic_extra__[font]

A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to “allow”.

__pydantic_fields_set__[font]

The names of fields explicitly set during instantiation.

__pydantic_private__[font]

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[font]
sampling_result: qilisdk.functionals.SamplingResult | None = None[font]
time_evolution_result: qilisdk.functionals.TimeEvolutionResult | None = None[font]
variational_program_result: qilisdk.functionals.VariationalProgramResult | None = None[font]
rabi_experiment_result: qilisdk.experiments.RabiExperimentResult | None = None[font]
t1_experiment_result: qilisdk.experiments.T1ExperimentResult | None = None[font]
t2_experiment_result: qilisdk.experiments.T2ExperimentResult | None = None[font]
two_tones_experiment_result: qilisdk.experiments.TwoTonesExperimentResult | None = None[font]
TFunctionalResult_co[font]
TVariationalInnerResult[font]
ResultExtractor[font]
class JobHandle(/, **data: Any)[font]

Bases: SpeQtrumModel, Generic[TFunctionalResult_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[font]
execute_type: ExecuteType[font]
extractor: ResultExtractor[TFunctionalResult_co] = None[font]
classmethod sampling(job_id: int) JobHandle[SamplingResult][font]
classmethod time_evolution(job_id: int) JobHandle[TimeEvolutionResult][font]
classmethod variational_program(job_id: int) JobHandle[VariationalProgramResult][font]
classmethod variational_program(job_id: int, *, result_type: type[TVariationalInnerResult]) JobHandle[VariationalProgramResult[TVariationalInnerResult]]

Create a variational-program handle for an existing job identifier.

Paràmetres:
  • 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.

Retorna:

A handle whose get_results invocation yields a VariationalProgramResult preserving the requested inner result type when supplied.

Tipus de retorn:

JobHandle

classmethod rabi_experiment(job_id: int) JobHandle[RabiExperimentResult][font]
classmethod t1_experiment(job_id: int) JobHandle[T1ExperimentResult][font]
classmethod t2_experiment(job_id: int) JobHandle[T2ExperimentResult][font]
classmethod two_tones_experiment(job_id: int) JobHandle[TwoTonesExperimentResult][font]
bind(detail: JobDetail) TypedJobDetail[TFunctionalResult_co][font]

Attach this handle’s typing information to a concrete job detail.

Paràmetres:

detail – Un-typed job detail payload returned by the SpeQtrum API.

Retorna:

Wrapper exposing get_results with the typing captured when the handle was created.

Tipus de retorn:

TypedJobDetail

class JobStatus[font]

Bases: str, enum.Enum

Job has not been submitted to the Lab api

Initialize self. See help(type(self)) for accurate signature.

PENDING = 'pending'[font]

Job has been queued but not yet validated

VALIDATING = 'validating'[font]

Job has been validated and is queued for execution

QUEUED = 'queued'[font]

Job is being executed on the device

RUNNING = 'running'[font]

Job finished successfully

COMPLETED = 'completed'[font]

Job failed due to an error

ERROR = 'error'[font]

Job was cancelled by the user or system

CANCELLED = 'cancelled'[font]

Job failed due to timeout

TIMEOUT = 'timeout'[font]
class JobType[font]

Bases: str, enum.Enum

str(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'[font]
PULSE = 'pulse'[font]
ANALOG = 'analog'[font]
VARIATIONAL = 'variational'[font]
class JobId(/, **data: Any)[font]

Bases: SpeQtrumModel

Handle/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[font]
class JobInfo(/, **data: Any)[font]

Bases: JobId

Light-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[font]
description: str = None[font]
device_id: int = None[font]
status: JobStatus = None[font]
created_at: pydantic.AwareDatetime = None[font]
updated_at: pydantic.AwareDatetime | None = None[font]
completed_at: pydantic.AwareDatetime | None = None[font]
class JobDetail(/, **data: Any)[font]

Bases: JobInfo

Full 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[font]
result: ExecuteResult | None = None[font]
jobType: JobType | None = None[font]
logs: str | None = None[font]
error: str | None = None[font]
error_logs: str | None = None[font]
class TypedJobDetail(/, **data: Any)[font]

Bases: JobDetail, Generic[TFunctionalResult_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[font]
extractor: ResultExtractor[TFunctionalResult_co] = None[font]
get_results() TFunctionalResult_co[font]

Return the strongly typed execution result.

Retorna:

Result payload associated with the completed job, respecting the type information carried by the originating JobHandle.

Tipus de retorn:

ResultT_co

Llença:

RuntimeError – If SpeQtrum has not populated the result payload or the execute type disagrees with the handle.