diff --git a/Dockerfile-notebook b/Dockerfile-notebook index a6ce10d55..94dcbc55c 100644 --- a/Dockerfile-notebook +++ b/Dockerfile-notebook @@ -25,7 +25,6 @@ RUN rm -r ./qs WORKDIR /home/$NB_USER USER $NB_UID COPY --chown=$NB_UID:$NB_UID ./docs/getting_started/ ./serverless/getting_started/ -COPY --chown=$NB_UID:$NB_UID ./docs/running/notebooks/ ./serverless/running/ COPY --chown=$NB_UID:$NB_UID ./docs/examples/examples/ ./serverless/examples/ ENV JUPYTER_ENABLE_LAB=no diff --git a/README.md b/README.md index 6d8fb64fa..d3b441307 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ 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 `serverless/getting_started/source_files/` directory (Note: the directory is inside the containerized environment) Save [this example python code](https://qiskit-extensions.github.io/quantum-serverless/quickstart/index.html#id8). @@ -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). ---------------------------------------------------------------------------------------------------- diff --git a/docs/getting_started/01_running_program.ipynb b/docs/getting_started/01_running_program.ipynb index 4646ebd37..33daa8ff6 100644 --- a/docs/getting_started/01_running_program.ipynb +++ b/docs/getting_started/01_running_program.ipynb @@ -11,12 +11,12 @@ "\n", "### Writing the Program\n", "\n", - "First, we need to write the program code and save it to a file called [program_1.py](./source_files/program_1.py). This program creates a two-qubit quantum circuit that prepares a Bell state, measures the result, and saves the measured probability distribution.\n", + "First, we need to write the program code and save it to a file called [program.py](./source_files/program.py). This program creates a two-qubit quantum circuit that prepares a Bell state, measures the result, and saves the measured probability distribution.\n", "\n", "The code for the program is shown below:\n", "\n", "```python\n", - "# source_files/program_1.py\n", + "# source_files/program.py\n", "\n", "from qiskit import QuantumCircuit\n", "from qiskit.primitives import Sampler\n", @@ -126,7 +126,7 @@ "\n", "program = Program(\n", " title=\"First program\",\n", - " entrypoint=\"program_1.py\",\n", + " entrypoint=\"program.py\",\n", " working_dir=\"./source_files/\"\n", ")\n", "\n", diff --git a/docs/running/notebooks/01_arguments_and_results.ipynb b/docs/getting_started/02_arguments_and_results.ipynb similarity index 100% rename from docs/running/notebooks/01_arguments_and_results.ipynb rename to docs/getting_started/02_arguments_and_results.ipynb diff --git a/docs/running/notebooks/02_dependencies.ipynb b/docs/getting_started/03_dependencies.ipynb similarity index 100% rename from docs/running/notebooks/02_dependencies.ipynb rename to docs/getting_started/03_dependencies.ipynb diff --git a/docs/running/notebooks/03_distributed_workloads.ipynb b/docs/getting_started/04_distributed_workloads.ipynb similarity index 100% rename from docs/running/notebooks/03_distributed_workloads.ipynb rename to docs/getting_started/04_distributed_workloads.ipynb diff --git a/docs/running/notebooks/04_retrieving_past_results.ipynb b/docs/getting_started/05_retrieving_past_results.ipynb similarity index 100% rename from docs/running/notebooks/04_retrieving_past_results.ipynb rename to docs/getting_started/05_retrieving_past_results.ipynb diff --git a/docs/running/notebooks/source_files/circuit_utils.py b/docs/getting_started/source_files/circuit_utils.py similarity index 100% rename from docs/running/notebooks/source_files/circuit_utils.py rename to docs/getting_started/source_files/circuit_utils.py diff --git a/docs/running/notebooks/source_files/program.py b/docs/getting_started/source_files/program.py similarity index 87% rename from docs/running/notebooks/source_files/program.py rename to docs/getting_started/source_files/program.py index 6929abaf6..bf9b7176b 100644 --- a/docs/running/notebooks/source_files/program.py +++ b/docs/getting_started/source_files/program.py @@ -4,7 +4,7 @@ from quantum_serverless import save_result # all print statement will be available in job logs -print("Running program 1...") +print("Running program...") # creating circuit circuit = QuantumCircuit(2) @@ -19,4 +19,4 @@ # saves results of program execution, # which will be accessible by calling `.result()` save_result(quasi_dists) -print("Completed running program 1.") +print("Completed running program.") diff --git a/docs/getting_started/source_files/program_1.py b/docs/getting_started/source_files/program_1.py deleted file mode 100644 index 6929abaf6..000000000 --- a/docs/getting_started/source_files/program_1.py +++ /dev/null @@ -1,22 +0,0 @@ -from qiskit import QuantumCircuit -from qiskit.primitives import Sampler - -from quantum_serverless import save_result - -# all print statement will be available in job logs -print("Running program 1...") - -# creating circuit -circuit = QuantumCircuit(2) -circuit.h(0) -circuit.cx(0, 1) -circuit.measure_all() - -# running Sampler primitive -sampler = Sampler() -quasi_dists = sampler.run(circuit).result().quasi_dists - -# saves results of program execution, -# which will be accessible by calling `.result()` -save_result(quasi_dists) -print("Completed running program 1.") diff --git a/docs/running/notebooks/source_files/program_with_arguments.py b/docs/getting_started/source_files/program_with_arguments.py similarity index 100% rename from docs/running/notebooks/source_files/program_with_arguments.py rename to docs/getting_started/source_files/program_with_arguments.py diff --git a/docs/running/notebooks/source_files/program_with_dependencies.py b/docs/getting_started/source_files/program_with_dependencies.py similarity index 100% rename from docs/running/notebooks/source_files/program_with_dependencies.py rename to docs/getting_started/source_files/program_with_dependencies.py diff --git a/docs/running/notebooks/source_files/program_with_parallel_workflow.py b/docs/getting_started/source_files/program_with_parallel_workflow.py similarity index 100% rename from docs/running/notebooks/source_files/program_with_parallel_workflow.py rename to docs/getting_started/source_files/program_with_parallel_workflow.py diff --git a/docs/running/index.rst b/docs/running/index.rst deleted file mode 100644 index 5cf5890e1..000000000 --- a/docs/running/index.rst +++ /dev/null @@ -1,10 +0,0 @@ -======= -Running -======= - -This section contains a series of short examples that demonstrate how to run serverless programs and showcase the main features of this package. - -.. toctree:: - :maxdepth: 2 - - Running \ No newline at end of file diff --git a/docs/running/notebooks/index.rst b/docs/running/notebooks/index.rst deleted file mode 100644 index b7aba0a31..000000000 --- a/docs/running/notebooks/index.rst +++ /dev/null @@ -1,4 +0,0 @@ -.. nbgallery:: - :glob: - - * diff --git a/docs/running/notebooks/source_files/__init__.py b/docs/running/notebooks/source_files/__init__.py deleted file mode 100644 index e69de29bb..000000000