dwave.cloud.client.Client.from_config

classmethod Client.from_config(config_file=None, profile=None, client=None, **kwargs)[source]

Client factory method to instantiate a client instance from configuration.

Configuration values can be specified in multiple ways, ranked in the following order (with 1 the highest ranked):

  1. Values specified as keyword arguments in from_config()
  2. Values specified as environment variables
  3. Values specified in the configuration file
  4. Values specified as Client instance defaults
  5. Values specified in Client class Client.DEFAULTS

Configuration-file format and environment variables are described in dwave.cloud.config.

File/environment configuration loading mechanism is described in load_config().

Parameters:
Returns:

Appropriate instance of a QPU/software/hybrid client.

Return type:

Client subclass

Raises: