Visual Studio Code

Connecting your qBraid Lab account to Visual Studio Code enables running Jupyter Notebooks on your local machine while still accessing the pre-packaged environments, compute resources, and other software and API’s available through qBraid Lab.

Get access token

  1. Log in to lab.qbraid.com.

  2. Access your Control Panel by clicking File -> Hub Control Panel.

  1. Navigate to the ‘Token’ page by clicking Token in the top bar.
  1. Type in a description for the new token you want, and click Request new API Token.
  1. Copy your token and keep it somewhere safe. You should treat this like a password to your qBraid Lab account, and revoke it from the same page when you are no longer using it.

Connect VS Code to Lab

  1. Open the command palette in VS Code (Cmd+Shift+P on MacOS, Ctrl+Shift+P elsewhere).

  2. Select Jupyter: Specify Jupyter Server for Connections, and then select Existing.

  1. Construct your notebook server URL with the following template: https://lab.qbraid.com/user/<your-lab-username>/?token=<your-token>.

Your Lab username is generated from the email address associated with your qBraid account.

Note:

If your account email uses special characters, your Lab username might be escaped, i.e. modified, from your raw email address. You can verify this by looking at the URL you get after launching Lab; your username will be appear right after .../user/.

  1. Create or open a new notebook, and select a notebook kernel from any of your installed and active qBraid Lab environments.