An Integrated Development Environment(IDE) for quantum applications hosted in Leap quantum applications environment.
The Leap IDE default workspace is a development environment pre-configured with Ocean software and some typically used libraries such as Matplotlib. It also includes D-Wave extensions such as the problem inspector and a navigation flyout menu to provide quick links to D-Wave resources.
Open the IDE in one of the following ways:
- Log in to your Leap account, open the Workspaces page, and click on an example.
- In the address bar of your browser, prefix the URL of your GitHub repository
(or a particular pull request, branch, or issue) with,
https://ide.dwavesys.io/#
, for example,https://ide.dwavesys.io/#https://github.com/jane/myquantumapp
.
The IDE opens the repository files in a Docker container with a full developer environment.
Start by selecting an example, opening and running it.
D-Wave tutorial videos are available on YouTube; for example, Leap IDE <https://www.youtube.com/watch?v=62gDQ14pjwM>.
Every workspace you create is pinned to a project in your account, and your usage
quota in that project and its API token are imported into the workspace. Users
with accounts that have access to multiple projects can see the pinned project
from within the IDE by using the leapide
command[1] from a terminal:
Leap IDE /workspace/antenna-selection $ leapide workspace Workspace ID: abc12345-1234-1a2b-3c4d5-123456789012 Project: Developer (id=123, code=DEV) Leap IDE /workspace/antenna-selection $
[1] | The leapide --help command prints a description of the command. |
The recommended workflow for new application development is to start from a template or example workspace and modify it.
On the Workspaces page, the menu under your User Name on the top righthand corner lets you edit the following information:
- Access control: to save changes, you need to grant the IDE permission to write to your GitHub repo or, if you started with a D-Wave example, create a fork.
- Environmental variables such as your SAPI token (token used to authenticate client sessions when you connect to remote solvers such as D-Wave quantum computers and hybrid solvers).
Some more advanced configurations include the following:
To have the IDE open a repository with your required packages loaded, create in the repository's root directory a YAML file named .gitpod.yml with the following tasks section:
tasks: - init: pip install -r requirements.txt
The IDE uses a Docker image, based on python:3.7-slim, available within
the IDE as dwavesys/leapide:latest
. To build on top of it, your Dockerfile
(which must be referenced from
.gitpod.yml) should look like
this:
FROM dwavesys/leapide:latest USER root # install system packages RUN apt-get update \ && apt-get install -yq --no-install-recommends \ clang \ libboost-dev \ && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* # install system-wide python package RUN pip install --no-cache-dir \ dwave-ocean-sdk==4.0.0 \ && rm -rf /tmp/*
The IDE periodically imports your API token from Leap. If you reset your token on the Leap dashboard, your new token is automatically updated in the IDE within a minute.
Every workspace you create is pinned to a project in your account. If your account
has access to multiple projects, the IDE imports the API token for the project
pinned to the current workspace. You can override the imported API token by
setting the DWAVE_API_TOKEN
environment variable in the IDE.