Rigetti QCS API (2020-07-31)

Download OpenAPI specification:Download

Introduction

This is the documentation for the Rigetti QCS HTTP API.

You can find out more about Rigetti at https://rigetti.com, and also interact with QCS via the web at https://qcs.rigetti.com.

This API is documented in OpenAPI format and so is compatible with the dozens of language-specific client generators available here and elsewhere on the web.

Principles

This API follows REST design principles where appropriate, and otherwise an HTTP RPC paradigm. We adhere to the Google API Improvement Proposals where reasonable to provide a consistent, intuitive developer experience. HTTP response codes match their specifications, and error messages fit a common format.

Authentication

All access to the QCS API requires OAuth2 authentication provided by Okta. You can request access here. Once you have a user account, you can download your access token from QCS here.

That access token is valid for 24 hours after issuance. The value of access_token within the JSON file is the token used for authentication (don't use the entire JSON file).

Authenticate requests using the Authorization header and a Bearer prefix:

curl --header "Authorization: Bearer eyJraW...Iow"

JWTBearer

Security Scheme Type HTTP
HTTP Authorization Scheme bearer

JWTBearerOptional

Same as JWTBearer, but the Authorization header is optionally parsed. Clients will receive a 401 response if an invalid or expired token is provided. Otherwise, the server authorizes the request against either the valid token claims or an unauthenticated user. In either case, the client may receive a 403 response.

Security Scheme Type HTTP
HTTP Authorization Scheme bearer
Bearer format "JWT"

Quantum Processor Access

Access to the quantum processors themselves is not yet provided directly by this HTTP API, but is instead performed over ZeroMQ/rpcq. Until that changes, we suggest using pyquil to build and execute quantum programs via the Legacy API.

Legacy API

Our legacy HTTP API remains accessible at https://forest-server.qcs.rigetti.com, and it shares a source of truth with this API's services. You can use either service with the same user account and means of authentication. We strongly recommend using the API documented here, as the legacy API is on the path to deprecation.

Account

List users belonging to a group

List users belonging to a group.

Authorizations:
path Parameters
groupName
required
string

URL encoded name of group for which to retrieve users.

query Parameters
pageSize
integer
pageToken
string

An opaque token that can be appended to a request query to retrieve the next page of results. Empty if there are no more results to retrieve.

Responses

200

Group users successfully retrieved.

404

The requested group does not exist.

422

Request validation failed.

get/v1/groups/{groupName}/users

Rigetti API

https://api.qcs.rigetti.com/v1/groups/{groupName}/users

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "nextPageToken": "string",
  • "users":
    [
    ]
}

Add user to a group

Add a user to a group.

Authorizations:
Request Body schema: application/json
groupId
string
groupName
string
userEmail
string
userId
string

Responses

204

User successfully added to group.

404

Group or user does not exist.

422

Request validation failed.

post/v1/groups:addUser

Rigetti API

https://api.qcs.rigetti.com/v1/groups:addUser

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "groupId": "string",
  • "groupName": "string",
  • "userEmail": "string",
  • "userId": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "code": "string",
  • "message": "string",
  • "requestId": "string",
  • "validationErrors":
    [
    ]
}

Remove user from a group.

Remove a user from a group.

Authorizations:
Request Body schema: application/json
groupId
string
groupName
string
userEmail
string
userId
string

Responses

204

User successfully removed from group.

404

Group does not exist.

422

Request validation failed, possibly because the user does not belong to the group.

post/v1/groups:removeUser

Rigetti API

https://api.qcs.rigetti.com/v1/groups:removeUser

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "groupId": "string",
  • "groupName": "string",
  • "userEmail": "string",
  • "userId": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "code": "string",
  • "message": "string",
  • "requestId": "string",
  • "validationErrors":
    [
    ]
}

List QCS groups for the requested user

List QCS groups for the requested user

Authorizations:
path Parameters
userId
required
string
query Parameters
pageSize
integer
pageToken
string

An opaque token that can be appended to a request query to retrieve the next page of results. Empty if there are no more results to retrieve.

Responses

200

Successfully retrieved groups.

422

Request validation failed.

get/v1/users/{userId}/groups

Rigetti API

https://api.qcs.rigetti.com/v1/users/{userId}/groups

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "groups":
    [
    ],
  • "nextPageToken": "string"
}

Authentication

Email Password Reset Token

Send a password reset link to the provided email address, if that email matches a registered user.

Request Body schema: application/json
email
required
string

Responses

204

Request completed successfully.

422

Request validation failed.

post/v1/auth:emailPasswordResetToken

Rigetti API

https://api.qcs.rigetti.com/v1/auth:emailPasswordResetToken

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "email": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "code": "string",
  • "message": "string",
  • "requestId": "string",
  • "validationErrors":
    [
    ]
}

Get User

Retrieve the profile of the authenticated user.

Authorizations:

Responses

200

Request completed successfully.

401

Request authentication failed.

404

The authenticated user could not be located within our records. Please contact support@rigetti.com if you reach this error.

get/v1/auth:getUser

Rigetti API

https://api.qcs.rigetti.com/v1/auth:getUser

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "createdTime": "2021-07-16T12:26:46Z",
  • "id": 0,
  • "idpId": "string",
  • "profile":
    {
    }
}

Reset Password

Reset the password using the user's existing password. Note, this is an authenticated route.

Authorizations:
Request Body schema: application/json
newPassword
required
string
oldPassword
required
string

Responses

204

Password successfully reset.

401

Request authentication failed.

422

Request validation failed.

post/v1/auth:resetPassword

Rigetti API

https://api.qcs.rigetti.com/v1/auth:resetPassword

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "newPassword": "string",
  • "oldPassword": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "code": "string",
  • "message": "string",
  • "requestId": "string",
  • "validationErrors":
    [
    ]
}

Reset Password With Token

Complete the forgot password flow, resetting the new password in exchange for an emailed token.

Request Body schema: application/json
newPassword
required
string
token
required
string

Responses

204

Password successfully reset.

404

No account exists for the requested email.

422

Request validation failed.

post/v1/auth:resetPasswordWithToken

Rigetti API

https://api.qcs.rigetti.com/v1/auth:resetPasswordWithToken

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "newPassword": "string",
  • "token": "string"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "code": "string",
  • "message": "string",
  • "requestId": "string",
  • "validationErrors":
    [
    ]
}

Quantum Processor Endpoints

The Endpoint is the means of access to a Quantum Processor.

List Endpoints

List all endpoints, optionally filtering by attribute.

Authorizations:
query Parameters
filter
string (Filter)

Filtering logic specified using rule-engine grammar

pageSize
integer (Pagesize)
Default: 10
pageToken
string (Pagetoken)

Responses

200

Successful Response

422

Unprocessable Entity

get/v1/endpoints

Rigetti API

https://api.qcs.rigetti.com/v1/endpoints

Response samples