qib.backend.experiment.Experiment

class qib.backend.experiment.Experiment[source]

Bases: ABC

Parent class for a quantum experiment.

The actual quantum experiment performed on a given quantum processor.

Methods

as_qasm

Get the Qobj OpenQASM representation of the experiment.

cancel

Cancel a previously submitted experiment.

from_json

Update an experiment object from a JSON dictionary.

query_status

Query the current status of a previously submitted experiment.

results

Get the results of a previously submitted experiment (BLOCKING).

wait_for_results

Wait for the results of a previously submitted experiment (NON-BLOCKING).

abstract as_qasm() dict[source]

Get the Qobj OpenQASM representation of the experiment.

abstract cancel()[source]

Cancel a previously submitted experiment.

abstract from_json(json: dict) Experiment[source]

Update an experiment object from a JSON dictionary.

abstract query_status() ExperimentStatus[source]

Query the current status of a previously submitted experiment.

If the experiment was already executed successfully when calling this method, the results will be automatically populated

abstract results() ExperimentResults | None[source]

Get the results of a previously submitted experiment (BLOCKING).

If the experiment execution resulted in an error or was previously cancelled, None is returned.

abstract async wait_for_results() ExperimentResults | None[source]

Wait for the results of a previously submitted experiment (NON-BLOCKING).

If the experiment execution resulted in an error or was previously cancelled, None is returned.