A typical instantiation of an Ocean sampler, such as
>>> from dwave.system import DWaveSampler
>>> sampler = DWaveSampler()
selects from the available solvers---compute resources such as quantum computers and hybrid solvers---based on features (e.g., number of qubits, algorithm version, etc.) that are either configured by the user or by default. Developers can configure feature-selection parameters at various levels with different priorities: settings in the user’s configuration file can be overridden by settings in environment variables which can be overridden by explicit parameters in the code submitting problems.
To enable solver selection from a particular region and/or Solver API endpoint, Ocean's dwave-cloud-client supports use of parameters region and endpoint and environment variables DWAVE_API_REGION and DWAVE_API_ENDPOINT. The default for solver selection is North America (na-west-1 and https://na-west-1.cloud.dwavesys.com/sapi/v2/).
You can select a solver in Europe by setting the region to eu-central-1 (recommended) or by setting the endpoint to https://eu-central-1.cloud.dwavesys.com/sapi/v2/ in one of the following ways:
- Select a default region and/or endpoint in your dwave-cloud-client configuration file. You can run the dwave config command with the - -full option or edit an existing configuration file to set a preferred region.
- Set the appropriate environment variable, DWAVE_API_REGION and/or DWAVE_API_ENDPOINT. For example, export DWAVE_API_REGION=eu-central-1 in a Unix shell for your current terminal or working session to select solvers from a preferred region.
- Explicitly select the region and/or endpoint in your code. For example, the region parameter in the code line sampler = DWaveSampler(region="na-west-1") selects a D-Wave quantum computer located in North America.
Setting both an endpoint and region on the same level results in selection based on the endpoint. Setting a region at a higher level (e.g., explicitly versus an environment variable or in the configuration file) overrides an endpoint configured using a lower level.