Using the Legacy QCS CLI

Your IDE comes pre-configured with the QCS Command-Line Interface (CLI). The CLI allows you to view a list of available QPU lattices, and easily book and manage reservations. The CLI is available directly after logging into your IDE, or from a terminal window of your JupyterLab notebook environment.

Usage and Help

Once you've connected to your IDE, you can list all available CLI commands with the following command:

$ qcs help

The Rigetti QCS Command Line Interface (CLI)

VERSION
  qcs-cli/1.0.0 linux-x64 node-v8.16.1

USAGE
  $ qcs [COMMAND]

COMMANDS
  cancel        Cancel reservations in the compute schedule.
  devices       View available QPU devices.
  help          display help for qcs
  lattices      View available lattices.
  reservations  View the compute block schedule.
  reserve       Book reservations in the compute schedule.
  

To use a command, simply type qcs followed by the command:

To obtain more information about any command and possible flags type the command with --help flag

From the example above you can see that qcs will often display display its output in a variety of formats including JSON. The default tabular format is intended to be easy to read on a terminal. For certain commands, using one of the JSON formats will provide you with more detailed information than is available through the tabular format. JSON output is designed to support integrating CLI output into scripts or programs.

System Status Commands

devices - obtain a list of QPUs available for your account.

To obtain a list of available Rigetti QPUs use the devices command:

If you use either --format=json or --format-json-pretty then you will see a JSON object containing additional information about each QPU that is available. It is beyond the scope of this document to describe the JSON format and that format is subject to change without notice.

QPU Reservation Commands

reserve - make a reservation for QPU time

To create a new reservation for QPU time, use the reserve command and follow the prompts. The following describes

If you type n at the prompt asking to accept the next available block, you will be presented with a list of alternative reservations to choose from.

Flag

Action

start

Specify a start time for the reservation (defalut is now). You can be fairly free form, but if you have spaces use quotes. e.g. "Friday at 5pm".

duration

Duration of requested reservation.

reservations - list QPU reservations for your account.

To obtain a list of pending reservations for your account, use the reservations command.

cancel - cancel a reservation

To delete a pending reservation use the cancel command. This is the same as deleting a reservation with the reserve --delete command.

Last updated

Was this helpful?