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
  • Installation
  • macOS / Linux
  • Windows
  • Configuring Credentials
  • Staying Up-to-Date
  • Making a QPU Reservation
  • Going Further

Was this helpful?

  1. Guides

Using the QCS CLI

The QCS CLI is a tool for interacting with QCS from the command line.

This guide refers to the new QCS CLI, made for working with pyQuil v3. If you're using pyQuil v2, refer to Using the Legacy QCS CLI.

Installation

If you're using QCS via your provisioned JupyterLab IDE, qcs is already installed for you. Otherwise, follow the steps below to install it locally.

macOS / Linux

Run the following in a terminal to download and install the CLI:

macOS

curl -s "https://qcs-cli.s3-us-west-2.amazonaws.com/latest/osx/install" | bash

Linux

curl -s "https://qcs-cli.s3-us-west-2.amazonaws.com/latest/linux/install" | bash

Next, add the following to the appropriate startup script for your shell environment ($HOME/.bashrc or $HOME/.zshrc, for instance), to ensure the qcs command is available to every terminal session:

export PATH=$PATH:$HOME/.qcs/bin

Windows

We don't currently have installation scripts for Windows. We recommend running the Linux instructions above in the Windows Subsystem for Linux.

Configuring Credentials

To run many commands, the CLI will need to know your QCS credentials. To add them to the CLI, run the following:

qcs secrets add-credentials default default

Once that completes, check that the following command executes successfully (requires a QCS account and access to a web browser):

qcs api auth-get-user

Staying Up-to-Date

The qcs version command displays the version of your current installation:

qcs version

You can check the latest available version with the latest subcommand:

qcs version latest

To update to the latest available version, use the update subcommand:

qcs version update

Making a QPU Reservation

To make a reservation against a QPU, use the qcs tools reserve command, as described in our guide Reserving Time on a QPU.

Going Further

This guide touched on only the most commonly-used commands. For details on all available QCS CLI commands and configuration options, see the QCS CLI Reference.

PreviousThe Rigetti QCS APINextUsing the Legacy QCS CLI

Last updated 1 year ago

Was this helpful?