Google Quantum AI Programs API

Hardware-compatible circuits uploaded to a Google Cloud project.

OpenAPI Specification

google-quantum-ai-programs-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Google Quantum Engine Calibrations Programs API
  version: v1alpha1
  description: 'REST surface of the Google Quantum Engine service (`quantum.googleapis.com`,

    `google.cloud.quantum.v1alpha1.QuantumEngineService`). The Quantum Engine

    accepts hardware-compatible quantum circuits as **programs**, executes them

    as **jobs** on Google''s superconducting **processors** (Willow- and

    Sycamore-class), manages **reservations** of processor time, and exposes

    processor **calibration** snapshots. The canonical client is the

    `cirq-google` Python package (`cirq_google.Engine`).


    Access is restricted: callers must use a Google Cloud project with the

    Quantum Engine API enabled, be on the approved-user list, and authenticate

    using Application Default Credentials (OAuth 2.0 with the

    `https://www.googleapis.com/auth/cloud-platform` scope).

    '
  contact:
    name: Cirq Maintainers
    email: cirq-maintainers@googlegroups.com
    url: https://quantumai.google/cirq/google/engine
  license:
    name: Google APIs Terms of Service
    url: https://developers.google.com/terms
servers:
- url: https://quantum.googleapis.com
  description: Production Quantum Engine endpoint
security:
- googleOAuth:
  - https://www.googleapis.com/auth/cloud-platform
tags:
- name: Programs
  description: Hardware-compatible circuits uploaded to a Google Cloud project.
paths:
  /v1alpha1/{parent}/programs:
    parameters:
    - $ref: '#/components/parameters/ParentProject'
    post:
      tags:
      - Programs
      operationId: CreateQuantumProgram
      summary: Create Quantum Program
      description: Upload a quantum program (a hardware-compatible serialised circuit) to a Google Cloud project.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuantumProgram'
      responses:
        '200':
          description: Program created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuantumProgram'
    get:
      tags:
      - Programs
      operationId: ListQuantumPrograms
      summary: List Quantum Programs
      description: List programs in a project, with optional label, time, and pagination filters.
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageToken'
      - $ref: '#/components/parameters/Filter'
      responses:
        '200':
          description: A page of programs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListQuantumProgramsResponse'
  /v1alpha1/{name}:
    parameters:
    - $ref: '#/components/parameters/ProgramName'
    get:
      tags:
      - Programs
      operationId: GetQuantumProgram
      summary: Get Quantum Program
      description: Retrieve a single quantum program by resource name.
      responses:
        '200':
          description: The requested program.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuantumProgram'
    patch:
      tags:
      - Programs
      operationId: UpdateQuantumProgram
      summary: Update Quantum Program
      description: Update mutable fields (labels, description) on a quantum program.
      parameters:
      - $ref: '#/components/parameters/UpdateMask'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuantumProgram'
      responses:
        '200':
          description: Updated program.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuantumProgram'
    delete:
      tags:
      - Programs
      operationId: DeleteQuantumProgram
      summary: Delete Quantum Program
      description: Delete a quantum program (and cascade-delete its jobs).
      responses:
        '200':
          description: Program deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Empty'
components:
  schemas:
    QuantumProgram:
      type: object
      description: A quantum program — a serialised quantum circuit uploaded to a project.
      properties:
        name:
          type: string
          description: Resource name `projects/{project_id}/programs/{program_id}`.
        createTime:
          type: string
          format: date-time
        updateTime:
          type: string
          format: date-time
        labels:
          type: object
          additionalProperties:
            type: string
        labelFingerprint:
          type: string
        description:
          type: string
        code:
          type: object
          description: Serialised Cirq/Quantum Engine circuit payload (`google.protobuf.Any`).
    ListQuantumProgramsResponse:
      type: object
      properties:
        programs:
          type: array
          items:
            $ref: '#/components/schemas/QuantumProgram'
        nextPageToken:
          type: string
    Empty:
      type: object
      description: An empty response body.
  parameters:
    ProgramName:
      name: name
      in: path
      required: true
      description: The program resource name.
      schema:
        type: string
    ParentProject:
      name: parent
      in: path
      required: true
      description: The parent project resource, formatted as `projects/{project_id}`.
      schema:
        type: string
        pattern: ^projects/[^/]+$
    PageSize:
      name: pageSize
      in: query
      description: Maximum number of items to return in a page.
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 1000
    PageToken:
      name: pageToken
      in: query
      description: Continuation token from a previous list response.
      schema:
        type: string
    UpdateMask:
      name: updateMask
      in: query
      description: FieldMask listing fields to update.
      schema:
        type: string
    Filter:
      name: filter
      in: query
      description: AIP-160 filter expression (e.g., `labels.team = quantum`, `executionStatus.state = SUCCESS`).
      schema:
        type: string
  securitySchemes:
    googleOAuth:
      type: oauth2
      description: OAuth 2.0 via Google Cloud Application Default Credentials.
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/cloud-platform: Read/write access to Google Cloud resources, including Quantum Engine.