What is Feature-Based Solver Selection?

Feature-based solver selection is a method of programmatically selecting a solver by feature, rather than specifying it by name.  This is good practice as it makes your code more robust and safeguards against hitting an error when a specific QPU goes offline. For example, we swap out Advantage solvers during maintenance events and occasionally decommission old solvers to bring new ones online. 

QPU solvers can be selected based on:

Highest number of qubits

Assuming your configuration file is properly set up, with the first profile in dwave.conf only containing your API token and the SAPI endpoint, the QPU with the highest number of qubits is returned by default:

sampler = DWaveSampler()
clique_sampler = DWaveCliqueSampler()

Note that specifying a solver preference on any configuration level (in the config file, environment variables or code) will override the behavior of the code snippet above. 



Two chip topologies are currently available: Pegasus and Zephyr. Assuming your configuration file is properly set up, here's how you specify a solver based on topology:

pegasus_sampler = DWaveSampler(solver=dict(topology__type='pegasus'))
zephyr_sampler = DWaveSampler(solver=dict(topology__type='zephyr'))


Solver properties

To select a solver based on other properties, such as online status, a minimum number of active qubits, least average load, and more, use the get_solvers function in the cloud-client and filter on the property you're interested in. 


For more information, code examples and troubleshooting tips check out the following resoures:


Was this article helpful?
2 out of 2 found this helpful
Have more questions? Submit a request



Please sign in to leave a comment.