Metadata-Version: 2.3
Name: qibo-cloud-backends
Version: 0.0.6
Summary: Qibo backends for client interface.
License: Apache-2.0
Author: The Qibo team
Requires-Python: >=3.9,<3.13
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Physics
Provides-Extra: aws
Provides-Extra: ionq
Requires-Dist: amazon-braket-sdk (>=1.88.3,<2.0.0) ; extra == "aws"
Requires-Dist: qibo (>=0.2.16,<0.3.0)
Requires-Dist: qibo_client (>=0.0.17,<0.0.18)
Requires-Dist: qiskit_ionq (>=0.5.4,<0.6.0) ; extra == "ionq"
Project-URL: Documentation, https://qibo.science/qibo-cloud-backends/stable
Project-URL: Homepage, https://qibo.science/
Project-URL: Repository, https://github.com/qiboteam/qibo-cloud-backends/
Description-Content-Type: text/markdown

# Qibo cloud backends

For the complete documentation please refer to [qibo-cloud-backends](https://qibo.science/qibo-cloud-backends/stable/)

## Installation instructions

Install first the package dependencies with the following commands.

We recommend to start with a fresh virtual environment to avoid dependencies
conflicts with previously installed packages.

```bash
   $ python -m venv ./env
   source activate ./env/bin/activate
```

The qibo-client-backends package can be installed through pip:

```bash
   pip install qibo-cloud-backends
```

## Quickstart

Once installed, the plugin allows for setting and using the new backends in Qibo.

The following two examples show how to submit a job on the TII cluster and the IBM servers. Remember to replace `"your token"` string with your actual valid token received after registration. Alternatively, you can register your token under the environment variables `QIBO_CLIENT_TOKEN` for `qibo-client` and `IBMQ_TOKEN` for `qiskit-client`.

Prepare a QFT circuit to be submitted to the servers:

```python
   import qibo

   circuit = qibo.models.QFT(5)
   circuit.add(qibo.gates.M(0, 2, 4))
```

Then, to simulate the circuit on the `TII` cluster through the `sim` platform:

```python
   qibo.set_backend("qibo-cloud-backends", client="qibo-client", token="your_token", platform="sim")
   result = circuit()
   print(result.frequencies())
```

or, in order to run on one of the chips hosted in `ibm-q`, e.g. `ibm_kyiv`:

```python
   qibo.set_backend("qibo-cloud-backends", client="qiskit-client", token="your_token", platform="ibm_kyiv")
   result = circuit()
   print(result.frequencies())
```

