Installing Ocean Tools¶
Ocean software is supported on the following operating systems:
Linux: tested on 64-bit OS
Windows: tested on 64-bit Windows 8, 10
Mac: tested on macOS 10.15.5 (Xcode 12.2)
Ocean software requires a Python environment. Python versions >=3.7 are supported.
This section explains how to install Ocean software, either the entire suite of tools or particular tools1 from the D-Wave GitHub repositories listed in the navigation bar.
Although individual Ocean packages accept dependencies within a range of versions, not all combinations are tested. Only versions of individual Ocean tools that form part of an official release of the Ocean SDK are guaranteed to work together.
Python Virtual Environment¶
It’s recommended that you work in a virtual environment on your local machine; depending on your operating system, you may need to first install Python.
Download Python describes how to install Python on your local machine for supported operating system.
For Windows systems, note that only 64-bit Python is supported.
Create a virtual environment for your Ocean work. For example, on Unix systems you might do:
python -m venv ocean . ocean/bin/activate
(On Windows operating system, activating a virtual environment might be done with the
Your machine is now ready to install Ocean software.
Install Ocean Software¶
The simplest way to start is to install dwave-ocean-sdk for the full suite of Ocean tools.
pip install the SDK inside your newly created virtual environment.
For a standard installation of the latest released version from the Python Package Index (PyPI) repository:
pip install dwave-ocean-sdk
Advanced users might directly install the latest (development) SDK from the D-Wave GitHub repository using a command such as,
pip install git+https://github.com/dwavesystems/dwave-ocean-sdk
Alternatively, you can clone the dwave-ocean-sdk repo and install the SDK to your virtual environment; for example:
git clone https://github.com/dwavesystems/dwave-ocean-sdk.git cd dwave-ocean-sdk python setup.py install
Note: To install a particular tool within the SDK only, follow the link to the GitHub repository for the tool, as listed in the navigation bar, and follow the installation instructions on the README file.
Set Up Your Environment¶
For a full and easy development experience it is recommended that before you start writing code, you complete the setup of your environment with two last steps:
Install Contributor Ocean Tools
Adds non-open-source tools such as the Problem Inspector.
Configuring Access to Leap’s Solvers
Sets defaults used for accessing D-Wave compute resources.
The dwave-ocean-sdk includes an interactive CLI that steps you through setup.
In the virtual environment you created as part of Installing Ocean Tools, run the
dwave setup command. The output shown below includes the interactive
prompts and placeholder replies for a full setup.
New users can accept the
dwave setup command’s defaults (press
Enter) for all prompts except the authentication token, which is displayed on
the Leap dashboard for your account.
Section Configuring Access to Leap’s Solvers explains how you can update your work environment’s
configuration at any time.
$ dwave setup Optionally install non-open-source packages and configure your environment. Do you want to select non-open-source packages to install (y/n)? [y]: ↵ D-Wave Drivers These drivers enable some automated performance-tuning features. This package is available under the 'D-Wave EULA' license. The terms of the license are available online: https://docs.ocean.dwavesys.com/eula Install (y/n)? [y]: ↵ Installing: D-Wave Drivers Successfully installed D-Wave Drivers. D-Wave Problem Inspector This tool visualizes problems submitted to the quantum computer and the results returned. This package is available under the 'D-Wave EULA' license. The terms of the license are available online: https://docs.ocean.dwavesys.com/eula Install (y/n)? [y]: ↵ Installing: D-Wave Problem Inspector Successfully installed D-Wave Problem Inspector. Creating the D-Wave configuration file. Using the simplified configuration flow. Try 'dwave config create --full' for more options. Creating new configuration file: /home/jane/.config/dwave/dwave.conf Profile [defaults]: ↵ Updating existing profile: defaults Authentication token [skip]: ABC-1234567890abcdef1234567890abcdef ↵ Configuration saved.
Install Contributor Ocean Tools¶
dwave setup and
dwave install commands of the
the dwave-ocean-sdk step
you through installation of non-open-source (“contrib”) tools.
If you did not install contributor packages with the
dwave setup command
in the Set Up Your Environment section, or want to add packages at a later time, you
can use it again then or use the
dwave install command.
$ dwave install --help Usage: dwave install [OPTIONS] [PACKAGES]... Install optional non-open-source Ocean packages. Options: -l, --list List available contrib (non-OSS) packages -a, --all Install all contrib (non-OSS) packages -v, --verbose Increase output verbosity --help Show this message and exit.
Both commands describe the tools and enable you to select which if any to install.
Most Ocean tools solve problems on a solver, which is a compute resource such as a D-Wave system or CPU, and might require that you configure a default solver. Configuring Access to Leap’s Solvers describes the next step of setting up your environment, how to configure your system to access D-Wave or other remote solvers.