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.
Commands
Basic Commands
help
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
help-config
Usage:
qcs help-config
Display CLI configuration guidance.
help-input
help-input
Usage:
qcs help-input
Display guidance on formatting input to API commands.
version
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>]
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.
format-date
format-date
Usage:
qcs tools format-date <date-string>
Format a human-friendly date string as an RFC3339 timestamp, for use with API commands.
Example:
will output:
reserve
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
: Nanosecondsus
(orµs
): Microsecondsms
: Millisecondss
: Secondsm
: Minutesh
: 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.
For details on allowed time formats, refer to this page.
Configuration Commands
QCS CLI commands derive configuration from the environment:
QCS_SETTINGS_FILE
(default
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_PATH
andQCS_SECRETS_FILE_PATH
environment variables, respectively.
Last updated