LogoLogo
  • Welcome to Quantum Cloud Services
  • Getting Started
    • Set up your environment
      • JupyterLab IDE
      • Install Locally
        • Quil SDK Docker Image
    • Quil SDK Overview
    • Running your first Quantum Program
  • Guides
    • Quil
      • What is Quil?
      • Language Support
      • Dynamic Control Flow
      • Customizing Program Readout
    • QPU vs. Simulator (QVM)
    • How to Use Rigetti QPUs
    • Access a QPU
      • QPU Reservations
      • On-Demand Access
      • QCS QPU Gateway
    • QCS Group Accounts
    • Interactive Tutorials
    • How Programs Are Built & Run
      • Execution and Request timeouts
    • The Lifecycle of a Program
    • The Rigetti QCS API
    • Using the QCS CLI
      • Using the Legacy QCS CLI
    • QCS Credentials
    • Benchmarking and Fidelity
  • Troubleshooting
    • Gathering Diagnostics
    • Report an Issue
  • Glossary
  • FAQ
  • References
    • pyQuil Reference
    • QCS API Specification
    • QCS CLI Reference
    • QCS Client Configuration
    • Quil / Quil-T Specification
    • quilc Reference
    • quil-rs Reference
    • QVM Reference
    • Rigetti Module for Cirq
    • Rigetti Provider for Qiskit
Powered by GitBook
On this page
  • Initialization
  • JupyterHub
  • Using the QCS CLI
  • Browser Download

Was this helpful?

  1. Guides

QCS Credentials

PreviousUsing the Legacy QCS CLINextBenchmarking and Fidelity

Last updated 1 year ago

Was this helpful?

Credentials are needed to authenticate all requests to the QCS API. By default, your credentials and QCS settings are stored in the ~/.qcs directory and managed by QCS software.

The process is different for the first time you get your credentials (Initialization) vs. updating them when they expire (Refresh). There are two different expirations to be aware of:

  1. Every hour, for security reasons, your Access Token expires. It is automatically and silently refreshed by all QCS software when needed (to include our SDKs, CLI, and pyquil). You don't have to do anything special to refresh it; stored alongside your Access Token is a Refresh Token which is used for this purpose.

  2. After 90 days (or in other uncommon situations), your Refresh Token itself may expire. When this happens, you must obtain a new token following the steps below in Initialization.

If you're seeing errors related to your credentials, it's often a good idea to re-initialize your credentials as described below.

Initialization

The best way to configure or refresh your credentials depend on your environment:

JupyterHub

If you are using QCS JupyterHub, your credentials are automatically configured for you when you start your server. The easiest way to refresh them is to restart your server using the instructions.

Using the QCS CLI

If you are in an environment with the QCS CLI and a web browser, then you can use it to trigger a credentials refresh by using it to make a request to the QCS API. For example, using the command:

qcs api auth-get-user

After running this command, you may be prompted to login to QCS using your browser. Do so, and the CLI will finish configuring your credentials for you. If there is no prompt and the command shows you your current account information, then your credentials are already up to date.

See Using the QCS CLI for details on setting up and using the QCS CLI.

Browser Download

You can acquire your credentials from the on QCS. Follow the instructions on the page to download and install your credentials. You can then copy these files to wherever you use them.

tokens page
Stop Or Change Your Server