.. _gs:
===============
Getting Started
===============
New to Ocean? The following sections describe how to install Ocean tools, what they are
and how they fit together, and give examples of using them to solve hard problems
on a D-Wave quantum computer.
.. _gs_initial_setup:
Initial Set Up
==============
The following steps set up your development environment for Ocean:
.. toctree::
:maxdepth: 1
:hidden:
overview/install
overview/leap_auth
overview/sapi
1. :ref:`install`
Installation is **not needed** if you are using an IDE that implements the
`Development Containers specification `_
(aka "devcontainers"), whether locally on your system (e.g., VS Code) or
cloud-based (e.g., `GitHub Codespaces `_),
because you can work in an updated Ocean environment through the
`Ocean Docker file `_.
2. :ref:`leap_auth`
Optionally authorize Ocean to access your Leap account to facilitate
token management.
3. :ref:`sapi_access`
Enable the running problems on D-Wave remote compute resources, including
quantum-classical hybrid solvers and the D-Wave quantum processing unit (QPU).
Ocean's Programming Model
=========================
Learn Ocean software's workflow for problem solving.
.. toctree::
:maxdepth: 1
overview/solving_problems
overview/formulation
overview/samplers
overview/stack
D-Wave Compute Resources
========================
Use Ocean's :term:`sampler`\ s to solve problems on D-Wave's compute resources (:term:`solver`\ s)
or locally on your CPU.
.. toctree::
:maxdepth: 1
overview/hybrid
overview/cpu
overview/qpu
Because most industrial problems (large, complex, and hard) are best approached
with quantum-classical hybrid solvers, a good place to start is with examples of
the :ref:`examples_hybrid` section. If you wish to learn how to work directly with
the quantum computer, see the examples of the :ref:`examples_qpu` section.
.. _examples_hybrid:
End-to-End Examples: Hybrid
===========================
For beginners, formulating problems as `Quadratic Models`_ can be a more
intuitive introduction to solving optimization problems. `Nonlinear Models`_
may be more familiar for users with experience in non-linear programming; for
many problems, these models---if effectively formulated---are expected to
enable superior performance.
Quadratic Models
----------------
.. toctree::
:maxdepth: 1
:hidden:
examples/hybrid_cqm_diet
examples/hybrid_cqm_binpacking
examples/hybrid_cqm_stock_selling
examples/hybrid_solver_service
examples/map_kerberos
examples/map_dqm
examples/hybrid1
* :ref:`example_cqm_diet_reals` solves a mixed-integer linear-programming (MILP)
problem using a `Leap `_ hybrid :term:`CQM`
solver.
* :ref:`example_cqm_binpacking` solves a binary constrained problem using a
`Leap `_ hybrid :term:`CQM` solver.
* :ref:`example_cqm_stock_selling` solves an integer constrained problem using a
Leap hybrid :term:`CQM` solver.
* :ref:`hss` solves an unconstrained problem using a
Leap hybrid :term:`BQM` solver.
* :ref:`map_kerberos` demonstrates using an out-of-the-box Ocean hybrid solver.
* :ref:`map_dqm` solves a discrete quadratic model (:term:`DQM`) using a
Leap hybrid DQM solver.
* :ref:`hybrid1` builds a hybrid workflow and solver for a large graph problem.
Nonlinear Models
----------------
These examples solve small instances of known optimization problems using
a `Leap `_ hybrid
:term:`nonlinear-model ` solver.
.. toctree::
:maxdepth: 1
:hidden:
examples/nl_tsp
examples/nl_cvrp
* :ref:`example_nl_tsp` helps you start using Leap's hybrid nonlinear-model solver.
* :ref:`example_nl_cvrp` demonstrates more advanced usage options for solving
nonlinear models.
.. _examples_qpu:
End-to-End Examples: QPU
========================
.. toctree::
:maxdepth: 1
:hidden:
examples/min_vertex
examples/scheduling
examples/not
examples/and
examples/map_coloring
examples/multi_gate
examples/pp_greedy
examples/inspector_graph_partitioning
examples/topology_samplers
* :ref:`min_vertex` solves a small graph problem.
* :ref:`scheduling` solves a small constraint satisfaction problem.
* :ref:`not` mathematically formulates a BQM for a two-variable problem.
* :ref:`and` demonstrates programming the QPU more directly (:term:`minor-embedding`).
* :ref:`map_coloring` example solves a more complex constraint satisfaction problem.
* :ref:`multi_gate` looks more deeply at :term:`minor-embedding`.
* :ref:`pp_greedy` improves samples returned from a QPU by post-processing with a
classical greedy algorthim.
* :ref:`inspector_graph_partitioning` improves :term:`minor-embedding` on a graph partition problem.
* :ref:`topology_samplers` runs your code on software samplers with different :term:`QPU`-inspired topologies.
.. _projects-Demonstrations:
Additional Examples
===================
D-Wave's `dwave-examples `_ GitHub repo
contains many more code examples:
* Demos
Typically in the form of short code examples you can open in
a supported cloud-based IDE or copy (clone) locally and run. For example:
* `Nurse scheduling `_,
`maze `_,
`circuit fault diagnosis `_,
and others provide examples of constraint-satisfaction problems.
* `Map coloring `_,
`job-shop scheduling `_,
and others can complement similar examples presented here.
* `RNA folding `_,
`portfolio optimization `_,
and others provide prototype applications in a variety of industries.
* Jupyter Notebooks
These examples, in a web-based interactive environment that includes documentation
and code, are helpful for both walking beginners through the theory and practice
of problem solving and explaining complex features. They can also serve as
a framework in which to develop your own code. For example:
* `Structural imbalance notebook `_
can complement the :ref:`hss` example.
* `Hybrid computing notebooks `_
walk you through using and developing hybrid solvers.
* `Pegasus notebook `_,
`reverse annealing notebook `_,
and others explain features of the quantum computer.
.. _additional_tutorials:
Further Learning
================
* :std:doc:`Getting Started with the D-Wave System `
This guide in the
:std:doc:`System Documentation `
introduces the D-Wave quantum computer, provides some key background information on
how the system works, and explains how to construct a simple problem that the system
can solve.
* :std:doc:`D-Wave Problem-Solving Handbook `
This guide provides advanced guidance on using D-Wave solvers, in particular QPU solvers.
It lists, explains, and demonstrates techniques of problem formulation, minor-embedding,
and configuring QPU parameters to optimize performance.
* Package introductions
The following Ocean packages have extended introductions:
* The :ref:`introduction to dimod ` describes Ocean's supported
models (e.g., BQMs), the format of returned solutions, :ref:`intro_symbolic_math`,
and :ref:`intro_scaling`.
* The :ref:`introduction to dwave-cloud-client ` discusses how to
configure selection of and communications with solvers.
* The :ref:`introduction to dwave-hybrid ` explains how to use
the Python framework for running and building hybrid samplers.