Skip to content

Commit

Permalink
Update Client configuration documentation (#1430)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tansito authored Aug 1, 2024
1 parent cedb70a commit 0a0b645
Showing 1 changed file with 13 additions and 18 deletions.
31 changes: 13 additions & 18 deletions docs/deployment/client_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,38 @@ Client configuration
Qiskit Serverless has a client-server architecture,
which means that in order to interact with computational
resources, you need to have the client library
installed on your machine and configured to communicate with the provider.
installed on your machine and configured to communicate with the server.

To install the client library, run:

.. code-block::
pip install qiskit_serverless
pip install qiskit-serverless
Next, we need to configure the client to communicate with the provider.
This can be done through the `BaseProvider` configuration.
This can be done through the `ServerlessClient` configuration.

Before we can configure the client and provider,
we need to know two things: the `username/password`
(authentication details) and the `host` of our gateway server.
Before we can configure the client, we need to know two things:
the `token` (authentication details) and the `host` of our gateway server.

If you are using the local docker compose setup,
your username and password would be `user` and `password123`,
respectively, and the host would be `http://gateway:8000`.
your token would be `awesome_token` and the host would
be `http://gateway:8000`.

If you are using a cloud deployment, your cloud administrator
will provide you with the details of the host and authentication.
If you are using `IBMServerlessClient`, you only need to pass the `tokne`.
What you can get it from https://quantum.ibm.com.

Once you have all the necessary information,
you can start configuring the client:

.. code-block::
from qiskit_serverless import QiskitServerless, ServerlessProvider
from qiskit_serverless import ServerlessClient
provider = ServerlessProvider(
username="<USERNAME>",
password="<PASSWORD>",
client = ServerlessClient(
token="<TOKEN>"
host="<HOST>",
)
client = QiskitServerless(provider)
With this configuration in place, you can run your programs
against the provider.
With this configuration in place, you can run your Qiskit Functions.

0 comments on commit 0a0b645

Please sign in to comment.