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
  • Commands
  • Basic Commands
  • API Commands
  • Tool Commands
  • Configuration Commands

Was this helpful?

  1. References

QCS CLI Reference

PreviousQCS API SpecificationNextQCS Client Configuration

Last updated 1 year ago

Was this helpful?

This document serves as a reference for QCS CLI commands and configuration.

For a guided tour of the QCS CLI, including how to install it and configure credentials, see .

Commands

Basic Commands

help

Usage: qcs help [<command>]

Display help for any specified command (or subcommand). If no command is given, this will display help for available top-level commands.

Alternately, use the -h or --h flag with any command to display help.

help-config

Usage: qcs help-config

Display guidance.

help-input

Usage: qcs help-input

Display guidance on formatting input to .

version

Usage: qcs version [current|latest|update]

current: Display version information for installed CLI (default).

latest: Display version information for latest available CLI.

update: Update installed CLI to latest available version.

API Commands

Usage: qcs api [<command>]

Tool Commands

Usage: qcs tools [<command>]

The tools commands provide convenient helpers for common tasks.

See below (or use qcs help tools) for details on available commands.

format-date

Usage: qcs tools format-date <date-string>

Example:

qcs tools format-date "Jan  2 15:04:05 PDT 2006"

will output:

2006-01-02T14:04:05-08:00

reserve

Usage: qcs tools reserve --quantum-processor-id <id> [<options>]

List available reservations for a QPU and interactively book.

Available Options:

--duration , -d

string, default: 15m0s

Duration of reservation, specified as a sequence of positive or negative numbers, each with a time unit suffix.

Examples: 300ms, -1.5h or 2h45m

Valid time units are:

  • ns: Nanoseconds

  • us (or µs): Microseconds

  • ms: Milliseconds

  • s: Seconds

  • m: Minutes

  • h: Hours

--next-available

boolean

Book the next available reservation.

Including this flag will immediately purchase the next available reservation, without additional confirmation.

--notes

string

Notes to add to reservation.

--quantum-processor-id, -q

string, required

ID of quantum processor to reserve.

--start-time-from, -s

string, default: current time

Time after which to search for available reservations.

Configuration Commands

QCS CLI commands derive configuration from the environment:

Environment Variable
Default Value
Description

QCS_PROFILE_NAME

default

QCS_SETTINGS_FILE

~/.qcs/settings.toml

QCS_SECRETS_FILE

~/.qcs/secrets.toml

  • QCS_SETTINGS_FILE (default

The default locations for settings and secrets are ~/.qcs/settings.toml and ~/.qcs/secrets.toml, respectively.

These locations can be overridden by setting the QCS_SETTINGS_FILE_PATHandQCS_SECRETS_FILE_PATH environment variables, respectively.

The api commands provide a comprehensive set of ways to interact with the .

Use qcs help api and for full details on using API commands.

All timestamps supplied to qcs api subcommands must be in . Use to format a human-friendly date as an RFC3339 timestamp.

Format a human-friendly date string as an timestamp, for use with .

For details on allowed time formats, refer to .

The and secrets commands provide functionality for reading and updating settings and credentials for the QCS CLI.

Use qcs help settings, qcs help secrets, and for full details on all available commands.

QCS API
this page
Using the QCS CLI
CLI configuration
API commands
qcs help-input
RFC3339 format
qcs tools format-date
RFC3339
API commands
settings
qcs help-config