Running Your First Example Problem

Running a D-Wave Code Example

This example runs on the quantum processing unit (QPU) and launches the problem inspector.

To run your first example problem, do the following:

  1. Log in to your Leap account at https://cloud.dwavesys.com/leap.

  2. Go to the Workspaces page by clicking the IDE Workspaces link.

  3. Create a new workspace with the Clustering example by clicking New Workspace and selecting the Clustering example on the Examples tab.

  4. In the Explorer in the left pane, open the clustering example’s Python file clustering.py.

  5. Click the Run icon Run Python File in Terminal (in the top right corner of the Leap IDE).

The problem results (also known as a sample set) are returned and displayed in the terminal. The problem inspector also displays a graphical representation of the problem results on the QPU.

Running a D-Wave Jupyter Notebook Example

Following this procedure runs the Structural Imbalance Jupyter Notebook example.

  1. Log in to your Leap account at https://cloud.dwavesys.com/leap.

  2. Go to the Workspaces page by clicking the IDE Workspaces link.

  3. Create a new workspace with the Structural Imbalance Jupyter Notebook example by clicking New Workspace and selecting the structural-imbalance-notebook example on the Examples tab.

The Jupyter Notebook automatically opens in the Leap IDE’s simple browser.

To open the example in a new tab in your browser, click the Open in browser icon Open in browser to the right of the address bar.

Tip

You can also open a Jupyter Notebook example in the Leap IDE from the Code Examples and Notebooks page in Leap by clicking Launch in Jupyter Server on the example’s tile.

If you close the example in the simple browser, you can restart it by stopping the notebook server in the terminal by pressing Ctrl + C twice and then executing the following command:

jupyter notebook structural-imbalance-notebook.ipynb