Note

This is the documentation for the current state of the development branch of Qiskit Experiments. The documentation or APIs here can change prior to being released.

Get experiment timing information

Problem

You want to know when an experiment started and finished running.

Solution

The ExperimentData class contains timing information in the following attributes, which are all of type datetime.datetime and in your local timezone:

Note

The below attributes are only relevant for those who have access to the cloud service. You can check whether you do by logging into the IBM Quantum interface and seeing if you can see the database.

  • ExperimentData.creation_datetime is the time when the experiment data was saved via the service. This defaults to None if experiment data has not yet been saved.

  • ExperimentData.updated_datetime is the time the experiment data entry in the service was last updated. This defaults to None if experiment data has not yet been saved.

Discussion

ExperimentData.start_datetime can also be set to a custom timestamp when instantiating an ExperimentData object by passing a value to the start_datetime field.