Skip to main content

Sampling Models

After defining your model and configuring a backend, sampling is the core operation. The DynexSampler translates your model into a neuromorphic circuit and runs it on the selected compute backend.

Common pattern

Core parameters

Parameter guidance

num_reads Controls the number of independent samples. More reads means better coverage of the solution space. annealing_time Controls the ODE integration depth. Longer annealing gives the system more time to find lower-energy states. shots For network backends (CPU/GPU/QPU), sets the minimum number of solutions to collect from workers before returning. Useful when you need multiple diverse solutions, not just the global optimum. Current recommended maximum: 5. qpu_max_coeff (default: 9.0, QPU only) Maximum allowed absolute value for any BQM coefficient when using a QPU backend. If any linear or quadratic coefficient exceeds this threshold, the sampler automatically scales the entire BQM down proportionally before submitting the job. Solutions are returned in the original variable space. Useful when your QUBO contains large penalty terms that exceed hardware bounds. preprocess Enables automatic scaling and normalization of QUBO coefficients. Recommended for QPU backends to stay within hardware bounds.

Model-specific examples

BQM

CQM

DQM

GPU (production)

QPU with preprocessing

QPU backends require smaller parameter values due to hardware constraints.

Working with results

The sampler returns a dimod SampleSet:

Advanced ODE parameters

For fine-grained control of the ODE integration, the following parameters can be set. These define upper bounds for automatic parameter tuning:
See the equations of motion for the mathematical background.

Block fee (spot compute)

For priority compute on the Dynex network, specify a block fee in nanoDNX:
Higher block fees prioritize your jobs on the network. If not specified, the current average network fee is used.