Skip to content

Commit

Permalink
Docs: structure + updates (#980)
Browse files Browse the repository at this point in the history
* Docs: structure + updates

---------

Co-authored-by: Caleb Johnson <[email protected]>
  • Loading branch information
IceKhan13 and caleb-johnson authored Oct 3, 2023
1 parent 32eaec5 commit 54c95a4
Show file tree
Hide file tree
Showing 53 changed files with 942 additions and 1,177 deletions.
6 changes: 3 additions & 3 deletions Dockerfile-notebook
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ RUN rm -r ./qs

WORKDIR /home/$NB_USER
USER $NB_UID
COPY --chown=$NB_UID:$NB_UID ./docs/running/notebooks/ ./serverless/running/
COPY --chown=$NB_UID:$NB_UID ./docs/development/examples/ ./serverless/examples/
COPY --chown=$NB_UID:$NB_UID ./docs/development/guides/ ./serverless/guides/
COPY --chown=$NB_UID:$NB_UID ./docs/getting_started/basic/ ./serverless/getting_started/basic/
COPY --chown=$NB_UID:$NB_UID ./docs/getting_started/experimental/ ./serverless/getting_started/experimental/
COPY --chown=$NB_UID:$NB_UID ./docs/examples/ ./serverless/examples/

ENV JUPYTER_ENABLE_LAB=no
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,13 +72,13 @@ For user convenience, this section assumes that users will deploy the infrastruc
1. Access the JupyterLab environment
Open `localhost:8888` in your web browser. The default token for the JupyterLab is `123`
1. Write your first example program
In the JupyterLab, create a new file `program.py` in the `serverless/running/source_files/` directory (Note: the directory is inside the containerized environment)
In the JupyterLab, create a new file, `program.py`, in the `work` directory.

Save [this example python code](https://qiskit-extensions.github.io/quantum-serverless/quickstart/index.html#id8).

Now, you are ready to run the first program.
1. Run the program
In the JupyterLab, create a New Notebook and execute [this python code](https://qiskit-extensions.github.io/quantum-serverless/quickstart/index.html#id9).
In the JupyterLab, create a new notebook in the same directory as your program, and execute [this python code](https://qiskit-extensions.github.io/quantum-serverless/quickstart/index.html#id9).

You can check the job status and get the result.

Expand All @@ -97,8 +97,8 @@ For user convenience, this section assumes that users will deploy the infrastruc
That's all!
For more detailed examples and explanations refer to the [Guide](https://qiskit-extensions.github.io/quantum-serverless/index.html):
[Getting Started](https://qiskit-extensions.github.io/quantum-serverless/getting_started/index.html#),
[Deployment](https://qiskit-extensions.github.io/quantum-serverless/deployment/index.html),
[Running](https://qiskit-extensions.github.io/quantum-serverless/running/index.html#),
[Development](https://qiskit-extensions.github.io/quantum-serverless/development/index.html).
----------------------------------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pathlib import Path
from importlib.metadata import version as metadata_version

sys.path.append(os.path.abspath('../client'))
sys.path.append(os.path.abspath("../client"))

project = "Quantum serverless"
copyright = "2022" # pylint: disable=redefined-builtin
Expand Down Expand Up @@ -58,4 +58,3 @@
nbsphinx_execute = "never"
nbsphinx_widgets_path = ""
exclude_patterns = ["_build", "**.ipynb_checkpoints"]

60 changes: 2 additions & 58 deletions docs/deployment/cloud.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ This guide contains:
Installation requirements
=========================

To deploy the infrastructure required for ``Quantum Serverless`` you need to have installed three main tools:
To deploy the infrastructure required for ``Quantum Serverless`` you need to have installed two main tools:

* `Docker <https://www.docker.com/>`_
* `Helm <https://helm.sh/>`_
* `Terraform <https://www.terraform.io/>`_

Each of these tools' webpages contain instructions for installing on Windows, MacOS, and Linux.

Expand All @@ -40,9 +39,7 @@ Once you have these tools installed, you can check the installation by running t
$
$ helm version
$ > version.BuildInfo{Version:"X", GitCommit:"Y", GitTreeState:"Z", GoVersion:"T"}
$
$ terraform version
$ > Terraform X
If all the commands return the correct versions, then congratulations, you have the tools installed!

Expand Down Expand Up @@ -133,56 +130,3 @@ Optionally, you can install an observability package to handle logging and monit
:caption: run this commands with the release version like 0.6.3 in x.y.z (2 places) using the same namespace as in the previous helm command
$ helm -n <INSERT_YOUR_NAMESPACE> install qs-observability https://github.com/Qiskit-Extensions/quantum-serverless/releases/download/vx.y.z/qs-observability-x.y.z.tgz
.. _terraform-deployment:

Quantum Serverless configuration
==================================

Once your resources are deployed, we can configure the Quantum Serverless ``client`` package.
There are a couple of simple ways to do this.

One option is to pass the configuration as arguments to the constructor of a ``QuantumServerless`` instance:

.. code-block::
:caption: constructor arguments example
serverless = QuantumServerless({
"providers": [{
"name": "my_provider", # provider name
"compute_resource": { # main computational resource
"name": "my_resource", # cluster name
"host": "HOST_ADDRESS_OF_CLUSTER_HEAD_NODE", # cluster host address, if you are using helm it will be DEPLOYMENT_NAME-kuberay-head-svc
}
}]
})
Another option is to create an instance from a configuration file, which has exactly the same structure as the constructor argument in the above example.

.. code-block::
:caption: config.json example
{
"providers": [{
"name": "my_provider",
"compute_resource": {
"name": "my_cluster",
"host": "HOST_ADDRESS_OF_CLUSTER_HEAD_NODE",
}
}]
}
Instantiate the ``QuantumServerless`` instance from the configuration file:

.. code-block::
:caption: verify the name and the path to load the file
serverless = QuantumServerless.load_configuration("./config.json")
And use it as follows:

.. code-block::
:caption: remember to use the same provider name
with serverless.provider("my_provider"):
...
150 changes: 0 additions & 150 deletions docs/development/examples/07_benchmark_program.ipynb

This file was deleted.

Binary file removed docs/development/examples/images/benchmark_flow.png
Binary file not shown.
Binary file removed docs/development/examples/images/diagram_get.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed docs/development/examples/images/diagrams_infra.png
Binary file not shown.
Binary file removed docs/development/examples/images/diagrams_put.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed docs/development/examples/images/qr_demo1.png
Binary file not shown.
Binary file removed docs/development/examples/images/qr_docs.png
Binary file not shown.
Binary file removed docs/development/examples/images/qr_repo.png
Binary file not shown.
9 changes: 0 additions & 9 deletions docs/development/examples/serverless_config.json

This file was deleted.

Loading

0 comments on commit 54c95a4

Please sign in to comment.