API Reference

Here are reported the Qibo backends that support the execution of Quantum Circuits through different cloud service providers.

Qibo Cloud Backend

This backend supports qibo-based providers.

class qibo_cloud_backends.qibo_client.QiboClientBackend(token=None, platform=None, verbosity=False)[source]

Backend for the remote execution of Qibo circuits.

Parameters:
  • token (str) – User authentication token. By default this is read from the ‘QIBO_CLIENT_TOKEN’ environment variable.

  • platform (str) – Name of the platform. Defaults to “sim”.

  • verbosity (str) – Enable verbose mode for the client. Default is False.

execute_circuit(circuit, initial_state=None, nshots=1000)[source]

Executes the passed circuit.

Parameters:
  • circuit (qibo.models.Circuit) – The circuit to execute.

  • initial_state (ndarray) – The initial state of the circuit. Defaults to |00…0>.

  • nshots (int) – Total number of shots.

Returns:

(qibo.result) The qibo result object containing the outcome of the circuit execution.

Qiskit Cloud Backend

This backend supports IBM as provider, namely the qibo circuits are loaded as qiskit circuits and the job is sent to the IBM servers.

Note

The qibo_cloud_backends.qiskit_client.QiskitClientBackend.execute_circuit() does not take care of any transpilation and expects the passed circuit to be transpiled already.

Note

Circuits with no measurements are not supported yet. Remeber to add measurements to your circuit!

class qibo_cloud_backends.qiskit_client.QiskitClientBackend(token=None, platform=None)[source]

Backend for the remote execution of Qiskit circuits on the IBM servers.

Parameters:
  • token (str) – User authentication token. By default this is read from the ‘IBMQ_TOKEN’ environment variable.

  • platform (str) – The IBM platform. Defaults to “ibm_osaka”.

execute_circuit(circuit, initial_state=None, nshots=1000, **kwargs)[source]

Executes the passed circuit.

Parameters:
  • circuit (qibo.models.Circuit) – The circuit to execute.

  • initial_state (ndarray) – The initial state of the circuit. Defaults to |00…0>.

  • nshots (int) – Total number of shots.

  • kwargs (dict) – Additional keyword arguments passed to the qiskit backends’ run() method.

Returns:

(qibo.result.MeasurementOutcomes) The outcome of the circuit execution.