qib.backend.wmi.wmi_experiment.WMIExperiment

class qib.backend.wmi.wmi_experiment.WMIExperiment(name: str, circuit: Circuit, options: WMIOptions, configuration: ProcessorConfiguration, credentials: ProcessorCredentials, type: ExperimentType = ExperimentType.QASM)[source]

Bases: Experiment

The WMI quantum experiment implementation.

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).

Attributes

job_id

as_qasm() dict[source]

Get the Qobj OpenQASM representation of the experiment.

cancel()[source]

Cancel a previously submitted experiment.

from_json(json: dict) WMIExperiment[source]

Update an experiment object from a JSON dictionary.

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

results() WMIExperimentResults | 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.

async wait_for_results() WMIExperimentResults | 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.