Sampling Models
After defining your model and configuring a backend, sampling is the core operation. TheDynexSampler 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.
| Backend | Recommended range |
|---|---|
| GPU (production) | 1000–10000 |
| CPU | 500–5000 |
| QPU | 1–100 |
| LOCAL | 100–1000 |
annealing_time
Controls the ODE integration depth. Longer annealing gives the system more time to find lower-energy states.
| Backend | Recommended range |
|---|---|
| GPU (production) | 200–1000 |
| CPU | 100–500 |
| QPU | 10–1000 |
| LOCAL | 50–500 |
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 dimodSampleSet: