# Software Environment and Tools¶

## Working with the D-Wave System¶

Fig. 42 shows a simplified diagram of the computation workflow on a D-Wave system. Each problem consists of a single input together with parameters specifying, for example, the number of reads and whether postprocessing (PP) should be invoked. A problem is sent across a network to the SAPI server and joins a queue. Queued problems are assigned to workers, which can run in parallel. A worker prepares the problem for the QPU and optionally for postprocessing, sends the problem to the QPU queue, receives results, and bundles the results with additional information about the problem (such as runtime information).

The total time for a problem to pass through the system is the service time. Note that service time includes wait time in two queues, which can vary according to the number of problems and workers active at any moment. The QPU handles problems one at a time; the time for one problem to move through the QPU is the QPU access time.

Note the following considerations and recommendations on system overhead and network latency:

- Timing anomalies (spikes) are present in any system.
- Submit jobs at time of least contention; for example, small jobs versus large jobs.

**Further Information**

- The
*Measuring Computation Time on D-Wave Systems*guide describes the computation process, in the context of system timing, on D-Wave quantum computers.

## Problem Reformulation¶

SAPI client libraries provide utilities for problem reformulation; for example,

`ising_to_qubo()`

converts an Ising problem to a QUBO equivalent.`qubo_to_ising()`

converts an QUBO problem to a Ising equivalent.`reduce_degree()`

reduces the polynomial degree of an array of terms to two by introducing ancillary variables.`make_quadratic()`

reduces the polynomial degree of a vector of numbers to two by introducing ancillary variables.

**Further Information**

- See the C, MATLAB, and Python developer guides, which describe the APIs used for programming a D-Wave system.

## Problem Decomposition¶

SAPI client libraries provide utilities for problem decomposition; for example,

`fix_variables()`

fixes variables for solving Ising problems.- QSage (accessed through the
`solve_qsage()`

utility) is a hybrid extension of the tabu search algorithm that uses quantum annealing to heuristically minimize objective functions that might not be mathematically expressible.

**Further Information**

- See the C, MATLAB, and Python developer guides, which describe the APIs used for programming a D-Wave system.

## Minor Embedding¶

SAPI client libraries provide utilities for minor embedding; for example,

`find_embedding()`

heuristic to find an embedding of a QUBO/Ising problem in a graph.`embed_problem()`

embeds an Ising problem into a graph.`unembed_answer()`

unembeds answer to the original problem from solver.`get_chimera_adjacency()`

returns the pairs of interconnected qubits on a Chimera graph.`get_hardware_adjacency()`

returns the pairs of interconnected qubits on a solver.`linear_index_to_chimera()`

and`chimera_to_linear_index()`

convert between Chimera indexing schemes.

**Further Information**

- See the C, MATLAB, and Python developer guides, which describe the APIs used for programming a D-Wave system.

## Submitting Problems to the QPU¶

SAPI client libraries provide utilities for managing connections to solvers and solving problems; for example,

`RemoteConnection()`

and`local_connection()`

connect to remote or local solvers.`solve_ising()`

and`async_solve_ising()`

solve an Ising problem synchronously or asynchronously.`solve_qubo`

and`async_solve_qubo()`

solve a QUBO problem synchronously or asynchronously.

**Further Information**

## Sampling Service¶

D-Wave simplifies the training of probabilistic models by providing access to high performance classical and quantum resources through the D-Wave Sampling Service—a set of Python libraries that make it easy to sample and perform the required Monte Carlo calculations. The service provides access to statistics from undirected graphical models based on samples from Boltzmann and quantum Boltzmann distributions.

## Open-Source Environment¶

The D-Wave GitHub site is located here: https://github.com/dwavesystems.

D-Wave GitHub provides an open-source development environment for utilities that many users can find helpful in solving the types of problems relevant to the D-Wave system; for example,

`minorminer()`

,`chimera-embedding()`

, and`dwave_virtual_graph()`

tools for minor embedding.`dimod()`

provides a shared API for Binary Quadratic Program (BQP) samplers.`dwave_micro_client()`

is a minimal implementation of the REST interface used to communicate with D-Wave Solver API (SAPI) servers.`dwave_neal()`

is a C++ simulated annealing sampler for general Ising model graphs.`dwave_sapi_dimod()`

is a dimod wrapper for D-Wave’s SAPI Client Library.`dw_sa_chi()`

simulated annealing solvers.`Qbsolv()`

is a decomposing solver that finds a minimum value of large QUBO problems.- D-Wave NetworkX extension to NetworkX, a Python language package for exploration and analysis of networks and network algorithms.

For the latest software in this environment, see the documentation on the site.