Search…
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.

Environment Variables and Configuration Files

QCS clients derive configuration from the environment:
  • QCS_PROFILE_NAME
    • Name of settings profile to use (optional)
  • QCS_SETTINGS_PATH or QCS_SETTINGS_FILE_PATH
    • File path to API configurations options toml file, default is ~/.qcs/settings.toml
  • QCS_SECRETS_PATH or QCS_SECRETS_FILE_PATH
    • File path to API authentication token toml file, default is ~/.qcs/secrets.toml
  • QCS_SETTINGS_APPLICATIONS_PYQUIL_QVM_URL
    • URL to use for QVM when running pyQuil, default is http://127.0.0.1:5000
  • QCS_SETTINGS_APPLICATIONS_PYQUIL_QUILC_URL
    • URL to use for quilc when running pyQuil, default is tcp://127.0.0.1:5555

QCS Settings File

A toml -formatted file with configuration details for using QCS Clients.
An annotated example:
1
# Name of profile to use when one is not otherwise specified.
2
# Used in order of precedence:
3
# 1. The `--profile-name` flag via the QCS CLI.
4
# 2. The `QCS_PROFILE_NAME` environment variable.
5
# 3. This `default_profile_name` value in this toml file.
6
default_profile_name = "default"
7
8
# (Required) One or more named profiles used for
9
# configuring QCS applications like the CLI.
10
[profiles]
11
12
# A named profile.
13
[profiles.default]
14
15
# (Required) QCS API origin.
16
api_url = "https://api.qcs.rigetti.com"
17
18
# (Optional) Named credentials to use from `QCS_SECRETS_FILE`.
19
credentials_name = "default"
20
21
# (Optional) OAuth server name to use.
22
auth_server_name = "default"
23
24
# (Optional) Application-specific settings
25
[profiles.default.applications]
26
27
# (Optional) QCS CLI configurations
28
[profiles.default.applications.cli]
29
# (Optional) Log verbosity - lower levels include messages from
30
# all levels above them.
31
# Options:
32
# - "panic"
33
# - "fatal"
34
# - "error"
35
# - "warn" (default)
36
# - "info"
37
# - "debug"
38
verbosity = "warn"
39
40
# (Optional) Returned data output format.
41
# Options:
42
# - "yaml"
43
# - "json" (default)
44
output_format = "json"
45
46
# (Optional) PyQuil configurations
47
[profiles.default.applications.pyquil]
48
49
# Endpoints for qvm
50
# Overridden by environment variable: QCS_SETTINGS_APPLICATIONS_PYQUIL_QVM_URL
51
qvm_url = "http://127.0.0.1:5000"
52
53
# Endpoint for quilc
54
# Overridden by environment variable: QCS_SETTINGS_APPLICATIONS_PYQUIL_QUILC_URL
55
quilc_url = "tcp://127.0.0.1:5555"
56
57
# (Required) One or more named OAuth server configurations.
58
[auth_servers]
59
60
# A named OAuth configuration.
61
# The following example uses the values expected for authenticating to https://api.qcs.rigetti.com/
62
[auth_servers.default]
63
64
# (Required) OAuth Client ID.
65
# This is the Client ID used to authenticate to https://api.qcs.rigetti.com/
66
client_id = "0oa3ykoirzDKpkfzk357"
67
68
# (Required) OAuth OpenID issuer base URL.
69
# This is the issuer URL used to authenticate to https://api.qcs.rigetti.com/
70
issuer = "https://auth.qcs.rigetti.com/oauth2/aus8jcovzG0gW2TUG355"
Copied!

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!
1
# One or more authentication credentials.
2
[credentials]
3
4
# A named set of credentials.
5
[credentials.default]
6
7
# OAuth access token response payload.
8
# You shouldn't have to configure this
9
[credentials.default.token_payload]
10
id_token = "<JWT HERE>"
11
access_token = "<JWT HERE>"
12
13
expires_in = 86400
14
refresh_token = "<SECRET HERE>"
15
scope = "offline_access openid profile email"
16
token_type = "Bearer"
Copied!