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:
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.
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