Skip to main contentIBM Quantum Documentation
This page is from an old version of Qiskit SDK and does not exist in the latest version. We recommend you migrate to the latest version. See the release notes for more information.
Important

IBM Quantum Platform is moving and this version will be sunset on July 1. To get started on the new platform, read the migration guide.

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, notes=None)

GitHub

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.

  • notes (Optional[str]) – Notes about the experiment.

Raises

ExperimentError – If the provider does not offer experiment services.

__init__

__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, notes=None)

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.

  • notes (Optional[str]) – Notes about the experiment.

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

analysis_resultsReturn analysis results associated with this experiment.
backend_nameReturn the experiment’s backend name.
creation_datetimeReturn the timestamp when the experiment was created.
end_datetimeReturn the timestamp when the experiment ended.
groupReturn the experiment’s group.
hubReturn the experiment’s hub.
ownerReturn the experiment’s owner.
plot_namesReturn names of plots associated with this experiment.
projectReturn the experiment’s project.
share_levelReturn the experiment share_level.
start_datetimeReturn the timestamp when the experiment started.
updated_datetimeReturn the timestamp when the experiment was last updated.
uuidReturn the experiment’s uuid.

analysis_results

Return analysis results associated with this experiment.

Return type

List

backend_name

Return the experiment’s backend name.

Return type

str

creation_datetime

Return the timestamp when the experiment was created.

Return type

Optional[datetime]

end_datetime

Return the timestamp when the experiment ended.

Return type

Optional[datetime]

from_remote_data

classmethod from_remote_data(provider, remote_data)

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.

group

Return the experiment’s group.

Return type

str

hub

Return the experiment’s hub.

Return type

str

owner

Return the experiment’s owner.

Return type

str

plot_names

Return names of plots associated with this experiment.

Return type

List

project

Return the experiment’s project.

Return type

str

refresh

refresh()

Update this experiment instance with remote data.

Return type

None

share_level

Return the experiment share_level.

Return type

Optional[ExperimentShareLevel]

start_datetime

Return the timestamp when the experiment started.

Return type

datetime

update_from_remote_data

update_from_remote_data(remote_data)

Update the attributes of this instance using remote data.

Parameters

remote_data (Dict) – Remote data used to update this instance.

Return type

None

updated_datetime

Return the timestamp when the experiment was last updated.

Return type

Optional[datetime]

uuid

Return the experiment’s uuid.

Return type

str

Was this page helpful?
Report a bug or request content on GitHub.