qiskit.providers.ibmq.experiment.Experiment¶
-
class
Experiment
(provider, backend_name, experiment_type, extra=None, tags=None, start_datetime=None, end_datetime=None, experiment_uuid=None, plot_names=None, analysis_results=None, hub=None, group=None, project=None, share_level=None, owner=None)[source]¶ Class representing an experiment.
Experiment constructor.
- Parameters
provider (
AccountProvider
) – the account provider.backend_name (
str
) – Name of the backend.experiment_type (
str
) – Experiment type.extra (
Optional
[Dict
]) – Extra information about the experiment.tags (
Optional
[List
[str
]]) – Tags for the experiment.start_datetime (
Optional
[datetime
]) – Timestamp when the experiment started. If no timezone information is present, local timezone is assumed.end_datetime (
Optional
[datetime
]) – Timestamp when the experiment ended. If no timezone information is present, local timezone is assumed.experiment_uuid (
Optional
[str
]) – Unique identifier of the experiment.plot_names (
Optional
[List
[str
]]) – A list of plot names for this experiment.analysis_results (
Optional
[List
[AnalysisResult
]]) – A list of analysis results associated with this experiment.hub (
Optional
[str
]) – The hub to which this experiment belongs. If not specified the hub from the provider is used.group (
Optional
[str
]) – The group to which this experiment belongs. If not specified the group from the provider is used.project (
Optional
[str
]) – The project to which this experiment belongs. If not specified the project from the provider is used.share_level (
Union
[ExperimentShareLevel
,str
,None
]) –The level at which the experiment is shared. This determines who can view the experiment (but not update it). This defaults to “private” for new experiments. Possible values include:
private: The experiment is only visible to its owner (default)
project: The experiment is shared within its project
group: The experiment is shared within its group
hub: The experiment is shared within its hub
public: The experiment is shared publicly regardless of provider
owner (
Optional
[str
]) – The user ID for the owner of the experiment. This is set by the server when the experiment is uploaded and should not be set by a user.
- Raises
ExperimentError – If the provider does not offer experiment services.
-
__init__
(provider, backend_name, experiment_type, extra=None, tags=None, start_datetime=None, end_datetime=None, experiment_uuid=None, plot_names=None, analysis_results=None, hub=None, group=None, project=None, share_level=None, owner=None)[source]¶ Experiment constructor.
- Parameters
provider (
AccountProvider
) – the account provider.backend_name (
str
) – Name of the backend.experiment_type (
str
) – Experiment type.extra (
Optional
[Dict
]) – Extra information about the experiment.tags (
Optional
[List
[str
]]) – Tags for the experiment.start_datetime (
Optional
[datetime
]) – Timestamp when the experiment started. If no timezone information is present, local timezone is assumed.end_datetime (
Optional
[datetime
]) – Timestamp when the experiment ended. If no timezone information is present, local timezone is assumed.experiment_uuid (
Optional
[str
]) – Unique identifier of the experiment.plot_names (
Optional
[List
[str
]]) – A list of plot names for this experiment.analysis_results (
Optional
[List
[AnalysisResult
]]) – A list of analysis results associated with this experiment.hub (
Optional
[str
]) – The hub to which this experiment belongs. If not specified the hub from the provider is used.group (
Optional
[str
]) – The group to which this experiment belongs. If not specified the group from the provider is used.project (
Optional
[str
]) – The project to which this experiment belongs. If not specified the project from the provider is used.share_level (
Union
[ExperimentShareLevel
,str
,None
]) –The level at which the experiment is shared. This determines who can view the experiment (but not update it). This defaults to “private” for new experiments. Possible values include:
private: The experiment is only visible to its owner (default)
project: The experiment is shared within its project
group: The experiment is shared within its group
hub: The experiment is shared within its hub
public: The experiment is shared publicly regardless of provider
owner (
Optional
[str
]) – The user ID for the owner of the experiment. This is set by the server when the experiment is uploaded and should not be set by a user.
- Raises
ExperimentError – If the provider does not offer experiment services.
Methods
__init__
(provider, backend_name, experiment_type)Experiment constructor.
from_remote_data
(provider, remote_data)Create an instance of this class from remote data.
refresh
()Update this experiment instance with remote data.
update_from_remote_data
(remote_data)Update the attributes of this instance using remote data.
Attributes
Return analysis results associated with this experiment.
Return the experiment’s backend name.
Return the timestamp when the experiment was created.
Return the timestamp when the experiment ended.
Return the experiment’s group.
Return the experiment’s hub.
Return the experiment’s owner.
Return names of plots associated with this experiment.
Return the experiment’s project.
Return the experiment share_level.
Return the timestamp when the experiment started.
Return the timestamp when the experiment was last updated.
Return the experiment’s uuid.
-
property
analysis_results
¶ Return analysis results associated with this experiment.
- Return type
List
-
property
backend_name
¶ Return the experiment’s backend name.
- Return type
str
-
property
creation_datetime
¶ Return the timestamp when the experiment was created.
- Return type
Optional
[datetime
]
-
property
end_datetime
¶ Return the timestamp when the experiment ended.
- Return type
Optional
[datetime
]
-
classmethod
from_remote_data
(provider, remote_data)[source]¶ Create an instance of this class from remote data.
- Parameters
provider (
AccountProvider
) – account provider.remote_data (
Dict
) – Remote data to use.
- Return type
Experiment
- Returns
An instance of this class.
-
property
group
¶ Return the experiment’s group.
- Return type
str
-
property
hub
¶ Return the experiment’s hub.
- Return type
str
-
property
owner
¶ Return the experiment’s owner.
- Return type
str
-
property
plot_names
¶ Return names of plots associated with this experiment.
- Return type
List
-
property
project
¶ Return the experiment’s project.
- Return type
str
Return the experiment share_level.
- Return type
Optional
[ExperimentShareLevel
]
-
property
start_datetime
¶ Return the timestamp when the experiment started.
- Return type
datetime
-
update_from_remote_data
(remote_data)[source]¶ Update the attributes of this instance using remote data.
- Parameters
remote_data (
Dict
) – Remote data used to update this instance.- Return type
None
-
property
updated_datetime
¶ Return the timestamp when the experiment was last updated.
- Return type
Optional
[datetime
]
-
property
uuid
¶ Return the experiment’s uuid.
- Return type
str