Environment Manager
Manage your quantum environments directly within Visual Studio Code.
The qBraid Environment Manager extension allows you to manage your Python quantum environments directly within Visual Studio Code. This includes creating, viewing, using, removing, editing, and sharing environments both locally and in the cloud.
Installation
The Environment Manager extension can be installed directly through the VS Code Marketplace -
Managing Environments
Create
-
Create a new environment by clicking on the
Add
icon in the Environment Manager panel. -
Click on the
Create Environment
button to open the environment creation dialog. -
You can choose to create a local environment or a cloud environment.
-
For a local environment, select the
Local
option and click on theNext
-
Enter the name and description for the environment, select the Python version, tags, and packages you want to include.
-
Click on the
Create
button to create the environment. -
The new environment will be created and added to the Environment Manager panel.
View
- You can view the Python environments created locally with the extension by selecting the
Local
icon. This will open up the Environment Manager panel where you can see all of your current installed environments. - You can expand the dropdown pertaining to each environment to see more details, such as the Python version, packages installed, and whether it is currently active.
- Clicking on the
More
button will open up a separate panel with additional options for that environment, such as viewing and updating installed Python packages, or sharing the environment with others.
- You can view the Python environments created locally with the extension by selecting the
Local
icon. This will open up the Environment Manager panel where you can see all of your current installed environments. - You can expand the dropdown pertaining to each environment to see more details, such as the Python version, packages installed, and whether it is currently active.
- Clicking on the
More
button will open up a separate panel with additional options for that environment, such as viewing and updating installed Python packages, or sharing the environment with others.
-
You can also view your installed environments in the qBraid Lab by clicking on the
Cloud
icon. It will display all the environments you have created in the qBraid lab environment. -
To view your cloud environments, you must have a running instance of the qBraid lab. You can also activate the lab instance from the Compute Manager extension.
-
Similarly to local environments, you can expand the dropdown for each cloud environment to see more details, such as the Python version, packages installed, and whether it is currently active.
Use
- Expand the dropdown for the environment you want to use and click on the
Activate
button. - Once activated, click on the
Terminal
icon. This will open a new terminal in Visual Studio Code with the selected environment activated. - You can now run Python commands in this terminal using the selected environment.
This feature is only available for Local
environments. For Cloud
environments, you can use the Install Kernel
button to add the environment
to your Jupyter kernels, allowing you to use it in qBraid Lab notebooks.
Edit
-
Clicking on the
More
button will open up a separate panel with additional options for that environment. -
You can edit the environment general info by clicking on the
Edit
button. This will allow you to change the name, description, and other details of the environment. -
You can also add/remove packages from the environment by clicking on the
Packages
tab in the same panel:- Add: Search for the package you want to add, select a version, and click on the
Add
button - Remove: Click on the
Remove
button next to the package.
- Add: Search for the package you want to add, select a version, and click on the
-
Once you have made all the changes, click on the
Update
button to apply them
Uninstall
- Click on the
More
button and select theUninstall Environment
option. - A confirmation dialog will appear asking you to confirm the removal of the environment. Once confirmed, the environment will be removed from your local machine or qBraid Lab instance (if it is a cloud environment).
Share
-
Click on the
More
button and select theShare Info
option. -
You can choose to share the environment via:
- Email: Enter the email address of the recipient and click on the
Share
button. - Access Code: Click on the
Generate Access Code
button. This will generate a unique access code that can be shared with others to access the environment. The recipient can then use this code to access the environment in their own qBraid account.
- Email: Enter the email address of the recipient and click on the
Managing Compute Resources
-
As part of the Environment Manager is the Compute Manager extension, which allows you to connect to and manage remote qBraid Lab compute resources, including CPUs and NVIDIA GPUs.
-
The Compute Manager allows you to:
- View available compute resources in the qBraid Lab.
- Activate or deactivate compute resources.
- View the status of your compute resources.
- Manage your compute instances directly from Visual Studio Code.
-
To utilize the
Cloud
functionality of the Environment Manager, you must have a running instance of the qBraid Lab.