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)

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#
maximum_time_limit_hrs defines the maximum runtime for problems submitted to the solver.
maximum_decision_state_size defines the maximum size of all decision-variable states in a problem accepted by the solver.
maximum_number_of_nodes defines the maximum number of nodes in a problem accepted by the solver.
maximum_number_of_states defines the maximum number of initialized states in a problem accepted by the solver.
maximum_state_size defines the maximum size of all states in a problem accepted by the solver.
state_size_multiplier, num_nodes_multiplier, num_nodes_state_size_multiplier, and time_constant are used in the internal estimate of the problem’s minimum runtime.
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#
state_size_multiplier, num_nodes_multiplier, num_nodes_state_size_multiplier, and time_constant are used in the internal estimate of the problem’s minimum runtime.
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)