QCS CLI Reference
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 Using the QCS CLI.


Basic Commands


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.


Usage: qcs help-config
Display CLI configuration guidance.


Usage: qcs help-input
Display guidance on formatting input to API commands.


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>]
The api commands provide a comprehensive set of ways to interact with the QCS API.
Use qcs help api and qcs help-input for full details on using API commands.
All timestamps supplied to qcs api subcommands must be in RFC3339 format. Use qcs tools format-date to format a human-friendly date as an RFC3339 timestamp.

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.


Usage: qcs tools format-date <date-string>
Format a human-friendly date string as an RFC3339 timestamp, for use with API commands.
qcs tools format-date "Jan 2 15:04:05 PDT 2006"
will output:


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
Book the next available reservation.
Including this flag will immediately purchase the next available reservation, without additional confirmation.
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.
For details on allowed time formats, refer to this page.

Configuration Commands

The settings and secrets commands provide functionality for reading and updating settings and credentials for the QCS CLI.
Use qcs help settings, qcs help secrets, and qcs help-config for full details on all available commands.
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.
Last modified 7mo ago