QCS Client Configuration

Details on environment configuration for QCS clients.

One set of configuration values is used for all QCS software on your computer - CLI, pyQuil, all SDKs, etc. Those settings can be applied using a configuration file, environment variables, or at runtime by editing the configuration object in your chosen language's SDK.

Download your personal secrets.toml and settings.toml files at https://qcs.rigetti.com/auth/token

QCS Settings and Secrets files are automatically downloaded and configured when using the QCS CLI Client. See Using the QCS CLI for more information.

JupyterLab environments are preconfigured.

See also PyQuil Configuration.

Environment Variables and Configuration Files

QCS clients derive configuration from the environment:


    • Name of settings profile to use (optional)


    • File path to API configurations options toml file, default is ~/.qcs/settings.toml


    • File path to API authentication token toml file, default is ~/.qcs/secrets.toml


    • URL to use for QVM when running pyQuil, default is


    • URL to use for quilc when running pyQuil, default is tcp://

QCS Settings File

A toml -formatted file with configuration details for using QCS Clients.

An annotated example:

# Name of profile to use when one is not otherwise specified.
# Used in order of precedence:
# 1. The `--profile-name` flag via the QCS CLI.
# 2. The `QCS_PROFILE_NAME` environment variable.
# 3. This `default_profile_name` value in this toml file.
default_profile_name = "default"

# (Required) One or more named profiles used for
# configuring QCS applications like the CLI.

  # A named profile.
    # (Required) QCS API origin.
    api_url = "https://api.qcs.rigetti.com"
    # (Optional) Named credentials to use from `QCS_SECRETS_FILE`.
    credentials_name = "default"
    # (Optional) OAuth server name to use.
    auth_server_name = "default"

  # (Optional) Application-specific settings
    # (Optional) QCS CLI configurations
      # (Optional) Log verbosity - lower levels include messages from
      # all levels above them.
      # Options:
      # - "panic"
      # - "fatal"
      # - "error"
      # - "warn" (default)
      # - "info"
      # - "debug"
      verbosity = "warn"
      # (Optional) Returned data output format.
      # Options:
      # - "yaml"
      # - "json" (default)
      output_format = "json"
    # (Optional) PyQuil configurations

      # Endpoints for qvm
      # Overridden by environment variable: QCS_SETTINGS_APPLICATIONS_PYQUIL_QVM_URL
      qvm_url = ""
      # Endpoint for quilc
      # Overridden by environment variable: QCS_SETTINGS_APPLICATIONS_PYQUIL_QUILC_URL
      quilc_url = "tcp://"

# (Required) One or more named OAuth server configurations.

  # A named OAuth configuration.
  # The following example uses the values expected for authenticating to https://api.qcs.rigetti.com/ 
    # (Required) OAuth Client ID.
    # This is the Client ID used to authenticate to https://api.qcs.rigetti.com/ 
    client_id = "0oa3ykoirzDKpkfzk357"
    # (Required) OAuth OpenID issuer base URL.
    # This is the issuer URL used to authenticate to https://api.qcs.rigetti.com/ 
    issuer = "https://auth.qcs.rigetti.com/oauth2/aus8jcovzG0gW2TUG355"

QCS Secrets File

A toml -formatted file with credentials for authenticating with QCS clients. You shouldn't have to create or edit this file manually - if your file is corrupted, download a new copy at https://qcs.rigetti.com/auth/token

Note that this file contains secrets and should be kept safe!

# One or more authentication credentials.

  # A named set of credentials.

    # OAuth access token response payload.
    # You shouldn't have to configure this 
      id_token = "<JWT HERE>"
      access_token = "<JWT HERE>"

      expires_in = 86400
      refresh_token = "<SECRET HERE>"
      scope = "offline_access openid profile email"
      token_type = "Bearer"

Last updated