Skip to content

dwave-training/ocean-composites

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Open in GitHub Codespaces

Ocean Composites

Composites are available in several packages in the D-Wave Ocean SDK. Composites inherit their name from the design pattern they follow, the Composite Pattern.

Using one or more composites, a sampler can be composed with a number of pre- and post-processing layers.

Note: As it stands, composites can only be used to compose samplers for Binary Quadratic Model problems.

Composites covered in lecture material

The lecture notebook covers several composites, exploring how they can be used and why they are useful!

Installation

You can run this example without installation in cloud-based IDEs that support the Development Containers specification (aka "devcontainers").

For development environments that do not support devcontainers, install requirements:

pip install -r requirements.txt

If you are cloning the repo to your local system, working in a virtual environment is recommended.

Usage

Your development environment should be configured to access Leap’s Solvers. You can see information about supported IDEs and authorizing access to your Leap account here.

The notebook can be opened by clicking on the Ocean-Composites.ipynb file in VS Code-based IDEs.

To run a locally installed notebook:

jupyter notebook

License

Released under the Apache License 2.0. See LICENSE file.