Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions quantum/qiskit-jupyter-app/.ceignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
README.md
.bob
setup.env.local
.setup.env.local
3 changes: 3 additions & 0 deletions quantum/qiskit-jupyter-app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.bob
.setup.env.local
setup.env.local
24 changes: 24 additions & 0 deletions quantum/qiskit-jupyter-app/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Use the official Jupyter base-notebook image.
# Runs as non-root user "jovyan" (uid 1000) — satisfies IBM security policy.
FROM quay.io/jupyter/base-notebook:latest

# Install project dependencies.
RUN pip install --no-cache-dir \
pylatexenc \
matplotlib \
qiskit-ibm-runtime \
jupyter

# Pre-load the hello-world notebook into the work directory.
# At runtime the COS persistent data store is mounted over /home/jovyan/work;
# this copy is only visible when the bucket is empty (first launch).
COPY hello-world.ipynb /home/jovyan/hello-world.ipynb

# Copy and install the startup script.
USER root
COPY start.sh /usr/local/bin/start.sh
RUN chmod +x /usr/local/bin/start.sh
USER jovyan

# Override the base image entrypoint with our startup script.
CMD ["/usr/local/bin/start.sh"]
1 change: 1 addition & 0 deletions quantum/qiskit-jupyter-app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See ![](../../content/posts/qiskit-jupyterlab-on-code-engine/)
589 changes: 589 additions & 0 deletions quantum/qiskit-jupyter-app/hello-world.ipynb

Large diffs are not rendered by default.

59 changes: 59 additions & 0 deletions quantum/qiskit-jupyter-app/setup.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# ============================================================
# setup.env — Configuration template for setup.sh
#
# Copy this file to setup.env.local, fill in your values,
# and run setup.sh (it loads setup.env.local automatically):
#
# cp setup.env setup.env.local
# # edit setup.env.local with real values
# ./setup.sh
#
# DO NOT commit a copy of this file that contains real secrets.
#
# All cloud resource names (resource group, Object Storage, Code Engine
# project, application, secrets, data store) are derived by setup.sh from
# NAME_PREFIX plus a random 4-character suffix (new on every run), e.g.
# ce-qiskit-jupyterlab-3fa9
# To reuse an existing set, export NAME_SUFFIX=<suffix> before running setup.sh.
# To override one of them, export it in your shell before running setup.sh,
# for example: CE_PROJECT_NAME=my-project ./setup.sh
# ============================================================

# ------------------------------------------------------------
# IBM Cloud
# ------------------------------------------------------------

# IBM Cloud API key (optional) — create one at:
# https://cloud.ibm.com/iam/apikeys
# If it is not set, setup.sh logs in interactively with
# 'ibmcloud login --sso' and asks you for a one-time passcode.
#IBMCLOUD_API_KEY="<your-ibm-cloud-api-key>"

# IBM Cloud region where all resources will be created, e.g. us-south, eu-de.
# A value exported in your shell takes precedence.
IBMCLOUD_REGION="${IBMCLOUD_REGION:-eu-de}"

# Prefix for all resource names: lowercase letters, digits and dashes,
# starting with a letter, at most 40 characters.
# A value exported in your shell takes precedence.
NAME_PREFIX="${NAME_PREFIX:-ce-qiskit-jupyterlab}"

# ------------------------------------------------------------
# IBM Quantum (Qiskit Runtime Service credentials)
# ------------------------------------------------------------

# Your IBM Quantum API token — copy it from:
# https://quantum.cloud.ibm.com/ → Dashboard → API key
QISKIT_IBM_TOKEN="<your-ibm-quantum-api-token>"

# CRN of the IBM Quantum instance you want to use.
# Find it at: https://quantum.cloud.ibm.com/instances → hover over the CRN and copy.
QISKIT_IBM_INSTANCE="<your-ibm-quantum-instance-crn>"

# ------------------------------------------------------------
# JupyterLab
# ------------------------------------------------------------

# Access token that protects the JupyterLab UI.
# Set this to a long, random string — e.g. output of: openssl rand -hex 32
JUPYTER_TOKEN="<your-jupyterlab-access-token>"
Loading
Loading