Jupyter Notebooks (.ipynb files) are a community standard for communicating and performing interactive computing. They are documents that combine live runnable code with narrative text (Markdown), equations (LaTeX), images, interactive visualizations and other rich output.
qBraid Lab provides an interface to create and interact with Jupyter Notebooks, and includes a number of additional key features and integrations to enhance the quantum developer’s experience.
Create notebook
Create a notebook by clicking the + button in the file browser and then selecting a kernel in the new Launcher tab. In the Launcher tab, under Notebooks, clicking on an ipykernel associated with an activated environment will automatically launch a Jupyter notebook (.ipynb file) using that kernel.
Switch notebook kernel
In the upper-right of any open notebook, you can see which kernel is in use. Clicking on the name of the current kernel, will open the kernel selector, and allow you switch to any other active kernel.
Pip (magic) commands
From inside a notebook, you must run all pip commands using the “magic” % operator.
For example, to install a new package from within a notebook cell, use:
[ ] %pip install <my-package>
WARNING: Do not use the ! operator for pip install commands within
Jupyter notebooks on qBraid. Doing so will install packages at the
system-level, where they will not be discoverable by your current notebook
environment/kernel.
After installing any new packages directly from a notebook, you must restart the kernel to see the changes take effect.