Module qcs_api_client_common::configuration
source · Expand description
This module is used for loading configuration that will be used to connect either to real QPUs (and supporting services) or the QVM.
By default, all settings are loaded from files located under your home directory in the
.qcs folder. Within that folder:
settings.tomlwill be used to load general settings (e.g. which URLs to connect to).secrets.tomlwill be used to load tokens for authentication.
Both files should contain profiles. Your settings should contain a default_profile_name
that determines which profile is loaded when no other profile is explicitly provided.
If you don’t have either of these files, see the QCS credentials guide for details on how to obtain them.
You can use environment variables to override values in your configuration:
SETTINGS_PATH_VAR: Set the path of thesettings.tomlfile to load.SECRETS_PATH_VAR: Set the path of thesecrets.tomlfile to load.PROFILE_NAME_VAR: Override the profile that is loaded by defaultQUILC_URL_VAR: Override the URL used for requests to the quilc server.QVM_URL_VAR: Override the URL used for requests to the QVM server.API_URL_VAR: Override the URL used for requests to the QCS REST API server.GRPC_API_URL_VAR: Override the URL used for requests to the QCS gRPC API.
The ClientConfiguration exposes an API for loading and accessing your
configuration.
Structs§
- Okta authorization server.
- A configuration suitable for use as a QCS API Client.
- Builder for
ClientConfiguration. - A wrapper for
Tokensthat provides thread-safe access to the inner tokens. - A single type containing an access token and an associated refresh token.
Enums§
- Error type for ClientConfigurationBuilder
- Errors that can occur when loading a configuration.
- Errors that can occur when managing authorization tokens.
Constants§
- Setting this environment variable will override the URL used to connect to the GRPC server.
- Default URL to access the QCS API.
- Default URL to access the gRPC API.
- Default profile name.
- Default URL to access
quilc. - Default URL to access QVM.
- The default path that [
Secrets] will be loaded from; - The default path that [
Settings] will be loaded from; - Setting this environment variable will override the URL used to connect to the GRPC server.
- Setting this environment variable will change which profile is used from the loaded config files
- Setting this environment variable will override the URL used to access quilc.
- Setting this environment variable will override the URL used to access the QVM.
- Setting the
QCS_SECRETS_FILE_PATHenvironment variable will change which file is used for loading secrets - Setting the
QCS_SETTINGS_FILE_PATHenvironment variable will change which file is used for loading [Settings].
Traits§
- Get and refresh access tokens