Skip to content

Installation

The Qedma client library provides a convenient way to interact with the QESEM API.

Installation

$ pip install qedma-api

Then, simply import it in your development environment:

import qedma_api

Client Configuration

The client library must be configured with your QESEM API token before using it. Qedma support will provide your QESEM API token via a secured channel. You should always configure the token when initializing the API client:

qedma_client = qedma_api.Client(api_token = "<Qedma api token>")

Note

Your QESEM API token grants access to your QESEM account. Do not share your API token with any unauthorized party. If your API token is compromised, inform us immediately at [[email protected]].

Register QPU Provider Token

QESEM executes circuits on the customer’s QPU provider account, e.g., IBM, on behalf of the customer. Therefore, the user must register their QPU token using the qedma_client.register_qpu_token() API.

qedma_client.register_qpu_token(token = "<IBM token>")
You need to register your QPU provider token only once. QESEM securely encrypts and stores your QPU provider token in Qedma’s database.

Finaly, set your IBM instance ID:

provider = qedma_api.IBMQProvider(
    instance = "<instance_id>"
)
qedma_client.set_provider(provider)

Note

If you need to replace the QPU token that is associated with your user account then you can simply unregister the old one and register the new one

Upgrading

$ pip install --upgrade qedma-api

Next Steps