QCS Group Accounts
QCS group accounts provide a means for QCS users to share reservations and billing accounts.
Users may perform actions on behalf of a group, such as:
- Creating a reservation for the group.
- Executing a program on a QPU using a group's reservation.
Using a group for these actions allows multiple users to share resources and QPU time amongst each other. In these cases, QCS will bill the shared group account for the reservation and usage rather than the individual user accounts.
In the examples below, we will use the string literal "my-group-profile" for a profile name and "my-group" for a group name.
In practice, you can name your profile whatever you like; we just recommend you use something that is easy to remember and type. The profile name does not necessarily need to be the same between individual members of the same group; it does not need to match the group name.
However, the group is named by the Rigetti support team and cannot be renamed by you. You should not change this value in any way when using it in the contexts below. In contrast to the profile name, the group name will match for all members of the same group.
qcs tools add-group-profile my-group-profile my-group
To confirm the operation successfully saved the new profile to your QCS configuration, you may run the following command:
qcs settings list-profiles
After confirmation, you may set the
--profile-nameargument on any API command or set the
QCS_PROFILE_NAMEenvironment variable to
my-group-profileto create a group reservation or a group engagement:
qcs --profile-name my-group-profile api create-reservation # ...
QCS_PROFILE_NAME=my-group-profile qcs api create-reservation # ...
If you would like to use your group profile by default you may run the following:
qcs settings set default_profile_name my-group-profile
Note, however, that setting the
QCS_PROFILE_NAMEenvironment variable will override your default profile name.
In many cases, you will be sending programs to a Rigetti QPU using pyQuil. In order to submit a QPU job on behalf of a group, you can set the
QCS_PROFILE_NAMEas described above.
QCS_PROFILE_NAME=my-group-profile python my_pyquil_script.py
Note, this feature requires pyQuil >= 3.2.0.
Below are some useful commands related to group accounts; each of these CLI commands has corresponding support in the qcs_api_client Python package. You can always use
qcs api --helpfor the latest, non-abridged list of available commands.
qcs api get-group-balance my-group
qcs api list-group-reservations my-group
qcs api list-group-users my-group