Nonlinear Solver Parameters#

This section describes the parameters of quantum-classical hybrid nonlinear-model solvers such as the Leap service’s hybrid_nonlinear_program_version1. For the properties that inform and restrict your use of the solver, see the Nonlinear Solver Properties section.

label#

Problem label you can optionally tag submissions with. You can set as a label a non-empty string of up to 1024 Windows-1252 characters that has meaning to you or is generated by your application, which can help you identify your problem submission. You can see this label on the Leap service’s dashboard and in solutions returned from SAPI.

Example#

This example sets a label on a submitted problem.

>>> from dwave.optimization.generators import bin_packing
>>> from dwave.system import LeapHybridNLSampler
...
>>> model = bin_packing([3, 5, 1, 3], 7)
>>> results = LeapHybridNLSampler().sample(model)    
Problem labels on dashboard.

Fig. 21 Problem labels on the dashboard.#

model#

Ocean software’s Model contains symbols and states for problems formulated as a nonlinear model.

Relevant Properties#

Example#

This example creates a nonlinear model representing a flow-shop-scheduling problem with processing times for two jobs, each on three machines.

>>> from dwave.optimization.generators import flow_shop_scheduling
...
>>> processing_times = [[10, 5, 7], [20, 10, 15]]
>>> model = flow_shop_scheduling(processing_times=processing_times)

time_limit#

Specifies the maximum runtime, in seconds, the solver is allowed to work on the given problem. Can be a float or integer.

Default value is problem dependent.

Attention

The Leap service’s hybrid nonlinear-program solver does not prevent you from setting a time_limit smaller than the minimum time estimated by Ocean software’s estimated_min_time_limit() method in the sampler's class; however, runtime (and charge time) is not guaranteed to be shorter than the estimated time.

Relevant Properties#

Example#

This illustrative example configures a time limit of 6 seconds.

>>> from dwave.optimization.generators import flow_shop_scheduling
...
>>> processing_times = [[10, 5, 7], [20, 10, 15]]
>>> model = flow_shop_scheduling(processing_times=processing_times)
>>> results = LeapHybridNLSampler().sample(
...     model,
...     time_limit=6)