Leap’s Hybrid Solvers


Not all accounts have access to this type of solver.

Leap’s quantum-classical hybrid solvers are intended to solve arbitrary application problems formulated as binary quadratic models (BQM) or discrete[1] quadratic models.

[1]Where the standard problems submitted to quantum computers have binary valued variables (\(0,1\) for QUBO and \(+1,-1\) for Ising formulation), discrete quadratic model (DQM) solvers solve problems with variables that have more than two values; for example, variables that represent colors or DNA bases.

These solvers, which implement state-of-the-art classical algorithms together with intelligent allocation of the quantum processing unit (QPU) to parts of the problem where it benefits most, are designed to accommodate even very large problems. Leap’s solvers can relieve you of the burden of any current and future development and optimization of hybrid algorithms that best solve your problem.

These solvers have the following characteristics:

  • There is no fixed problem structure. In particular, these solvers do not have properties num_qubits, qubits, and couplers.

  • Solvers may return one solution or more, depending on the solver, the problem, and the time allowed for solution. Returned solutions are not guaranteed to be optimal.

  • Solver properties and parameters are entirely disjoint from those of other solvers.

  • Maximum problem size and solution times differ between solvers and might change with subsequent versions of the solver: always check your selected solver’s relevant properties. For example, the solver selected below has limits on maximum_number_of_biases and maximum_number_of_variables that restrict problem size, and requirements on minimum_time_limit and maximum_time_limit_hrs that restrict solution time.

    >>> sampler = LeapHybridDQMSampler()                         
    >>> sampler.properties.keys()                                
     >>> sampler.properties["maximum_time_limit_hrs"]           

Generally Available Solvers

The generally available hybrid solvers depend on your Leap™ account. Check your Leap dashboard to see which hybrid solvers are available to you.

Generally-available hybrid solvers currently supported in Leap include:

  • Hybrid BQM solver (e.g., hybrid_binary_quadratic_model_version2)

    These solvers solve arbitrary application problems formulated as binary quadratic models (BQM).

  • Hybrid DQM solver (e.g., hybrid_discrete_quadratic_model_version1)

    These solvers solve arbitrary application problems formulated as discrete quadratic models (DQM).


This section describes the properties of Leap’s solvers, in alphabetical order.


Type of solver. Hybrid solvers support the following categories:

  • hybrid—quantum-classical hybrid; typically one or more classical algorithms run on the problem while outsourcing to a quantum processing unit (QPU) parts of the problem where it benefits most.


Maximum number of biases, both linear and quadratic in total, accepted by the solver.


Maximum number of problem variables accepted by the solver.


Minimum required run time, in seconds, the solver must be allowed to work on the given problem. Specifies the minimum time required for the given problem, as a piecewise-linear curve defined by a set of floating-point pairs. The second element is the minimum required time; the first element in each pair is some measure of the problem, dependent on the solver:

  • For hybrid BQM solvers, this is the number of variables.
  • For hybrid DQM solvers, this is a combination of the numbers of interactions, variables, and cases that reflects the “density” of connectivity between the problem’s variables.

The minimum time for any particular problem is a linear interpolation calculated on two pairs that represent the relevant range for the given measure of the problem. For example, if minimum_time_limit for a hybrid BQM solver were [[1, 0.1], [100, 10.0], [1000, 20.0]], then the minimum time for a 50-variable problem would be 5 seconds, the linear interpolation of the first two pairs that represent problems with between 1 to 100 variables.

For more details, see the Ocean samplers documentation for solver methods that calculate this parameter, and their descriptions.


Maximum allowed run time, in hours, that can be specified for the solver.


Ratio of time charged to Leap account quotas between QPU and hybrid solver usage. For example, for a value of 20, using 20 seconds of hybrid solver time is has an equivalent cost to using 1 second of QPU time.


Indicates what problem types are supported for the solver. Hybrid solvers support the following energy-minimization problem types:

  • bqm—binary quadratic model (BQM) problems; use \(0/1\)-valued variables and \(-1/1\)-valued variables.
  • dqm—discrete quadratic model (DQM) problems; use variables that can represent a set of values such as {red, green, blue, yellow} or {3.2, 67}.


Version number of the solver (e.g., “1.0”).


This section describes the parameters accepted by Leap’ s hybrid solvers, in alphabetical order. See Summary of Hybrid Solver Parameters for a summary and for the default values.


Specifies the maximum run time, in seconds, the solver is allowed to work on the given problem. Can be a float or integer in the range defined by minimum_time_limit for the given problem.

Summary of Hybrid Solver Parameters

Hybrid solver parameters and their default values are summarized in the table below.

Table 3 Hybrid Solver Parameters
Parameter Range Default Value
time_limit See minimum_time_limit Problem dependent