Google Quantum Engine API

The Quantum Engine API (quantum.googleapis.com, v1alpha1) lets approved Google Cloud projects upload quantum circuits as programs, run them as jobs on Google's superconducting quantum processors (Willow, Sycamore-class), inspect device specifications and calibrations, and reserve processor time. The canonical client is the cirq-google Python package (cirq_google.Engine), which wraps the gRPC service exposed by google.cloud.quantum.v1alpha1.QuantumEngineService. Authentication uses Google Cloud Application Default Credentials and standard IAM; access requires Google sponsorship plus inclusion on the approved-user list.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

quantum-engine-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Google Quantum Engine 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: [email protected]
    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.
- name: Jobs
  description: Executions of a program against a processor or simulator backend.
- name: Processors
  description: Quantum processing units (Willow, Sycamore-class) available to the project.
- name: Calibrations
  description: Periodic device performance snapshots.
- name: Reservations
  description: Processor time-slot reservations and budgets.
- name: Results
  description: Measurement results returned by completed jobs.
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'
  /v1alpha1/{parent}/jobs:
    parameters:
    - $ref: '#/components/parameters/ParentProgram'
    post:
      tags: [Jobs]
      operationId: CreateQuantumJob
      summary: Create Quantum Job
      description: Submit a new job to execute a program on a processor or simulator backend.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuantumJob'
      responses:
        '200':
          description: Job created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuantumJob'
    get:
      tags: [Jobs]
      operationId: ListQuantumJobs
      summary: List Quantum Jobs
      description: List jobs belonging to a program. Supports filtering by state, label, and creation time.
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageToken'
      - $ref: '#/components/parameters/Filter'
      responses:
        '200':
          description: A page of jobs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListQuantumJobsResponse'
  /v1alpha1/{name}/job:
    parameters:
    - $ref: '#/components/parameters/JobName'
    get:
      tags: [Jobs]
      operationId: GetQuantumJob
      summary: Get Quantum Job
      description: Retrieve a single quantum job by resource name.
      responses:
        '200':
          description: The requested job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuantumJob'
    patch:
      tags: [Jobs]
      operationId: UpdateQuantumJob
      summary: Update Quantum Job
      description: Update mutable fields (labels, description, priority) on a job.
      parameters:
      - $ref: '#/components/parameters/UpdateMask'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuantumJob'
      responses:
        '200':
          description: Updated job.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuantumJob'
    delete:
      tags: [Jobs]
      operationId: DeleteQuantumJob
      summary: Delete Quantum Job
      description: Delete a quantum job and its results.
      responses:
        '200':
          description: Job deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Empty'
  /v1alpha1/{name}:cancel:
    parameters:
    - $ref: '#/components/parameters/JobName'
    post:
      tags: [Jobs]
      operationId: CancelQuantumJob
      summary: Cancel Quantum Job
      description: Cancel a queued or running quantum job.
      responses:
        '200':
          description: Job cancellation accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Empty'
  /v1alpha1/{parent}/result:
    parameters:
    - $ref: '#/components/parameters/JobParent'
    get:
      tags: [Results]
      operationId: GetQuantumResult
      summary: Get Quantum Result
      description: Retrieve the serialised measurement result of a completed quantum job.
      responses:
        '200':
          description: Job result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuantumResult'
  /v1alpha1/{parent}/events:
    parameters:
    - $ref: '#/components/parameters/JobParent'
    get:
      tags: [Jobs]
      operationId: ListQuantumJobEvents
      summary: List Quantum Job Events
      description: List lifecycle events emitted for a job (queued, running, completed, failed).
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageToken'
      responses:
        '200':
          description: A page of job events.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListQuantumJobEventsResponse'
  /v1alpha1/{parent}/processors:
    parameters:
    - $ref: '#/components/parameters/ParentProject'
    get:
      tags: [Processors]
      operationId: ListQuantumProcessors
      summary: List Quantum Processors
      description: List processors visible to the Google Cloud project.
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageToken'
      - $ref: '#/components/parameters/Filter'
      responses:
        '200':
          description: A page of processors.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListQuantumProcessorsResponse'
  /v1alpha1/{name}/processor:
    parameters:
    - $ref: '#/components/parameters/ProcessorName'
    get:
      tags: [Processors]
      operationId: GetQuantumProcessor
      summary: Get Quantum Processor
      description: Retrieve a single quantum processor and its current device specification.
      responses:
        '200':
          description: The requested processor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuantumProcessor'
  /v1alpha1/{parent}/calibrations:
    parameters:
    - $ref: '#/components/parameters/ProcessorParent'
    get:
      tags: [Calibrations]
      operationId: ListQuantumCalibrations
      summary: List Quantum Calibrations
      description: List historical calibration snapshots for a processor.
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageToken'
      - $ref: '#/components/parameters/Filter'
      responses:
        '200':
          description: A page of calibrations.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListQuantumCalibrationsResponse'
  /v1alpha1/{name}/calibration:
    parameters:
    - $ref: '#/components/parameters/CalibrationName'
    get:
      tags: [Calibrations]
      operationId: GetQuantumCalibration
      summary: Get Quantum Calibration
      description: Retrieve a single calibration snapshot for a processor.
      responses:
        '200':
          description: The requested calibration.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuantumCalibration'
  /v1alpha1/{parent}/reservations:
    parameters:
    - $ref: '#/components/parameters/ProcessorParent'
    post:
      tags: [Reservations]
      operationId: CreateQuantumReservation
      summary: Create Quantum Reservation
      description: Reserve a future time window on a quantum processor.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuantumReservation'
      responses:
        '200':
          description: Reservation created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuantumReservation'
    get:
      tags: [Reservations]
      operationId: ListQuantumReservations
      summary: List Quantum Reservations
      description: List reservations on a processor.
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageToken'
      - $ref: '#/components/parameters/Filter'
      responses:
        '200':
          description: A page of reservations.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListQuantumReservationsResponse'
  /v1alpha1/{name}/reservation:
    parameters:
    - $ref: '#/components/parameters/ReservationName'
    get:
      tags: [Reservations]
      operationId: GetQuantumReservation
      summary: Get Quantum Reservation
      description: Retrieve a single processor reservation.
      responses:
        '200':
          description: The requested reservation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuantumReservation'
    patch:
      tags: [Reservations]
      operationId: UpdateQuantumReservation
      summary: Update Quantum Reservation
      description: Update a reservation's window or whitelisted users.
      parameters:
      - $ref: '#/components/parameters/UpdateMask'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuantumReservation'
      responses:
        '200':
          description: Updated reservation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuantumReservation'
    delete:
      tags: [Reservations]
      operationId: DeleteQuantumReservation
      summary: Delete Quantum Reservation
      description: Delete an upcoming reservation.
      responses:
        '200':
          description: Reservation deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Empty'
  /v1alpha1/{name}/reservation:cancel:
    parameters:
    - $ref: '#/components/parameters/ReservationName'
    post:
      tags: [Reservations]
      operationId: CancelQuantumReservation
      summary: Cancel Quantum Reservation
      description: Cancel an in-progress reservation, freeing its remaining time.
      responses:
        '200':
          description: Reservation cancellation accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Empty'
  /v1alpha1/{parent}/timeSlots:
    parameters:
    - $ref: '#/components/parameters/ProcessorParent'
    get:
      tags: [Reservations]
      operationId: ListQuantumTimeSlots
      summary: List Quantum Time Slots
      description: List the OPEN_SWIM / MAINTENANCE / RESERVATION / UNALLOCATED time slots for a processor.
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageToken'
      - $ref: '#/components/parameters/Filter'
      responses:
        '200':
          description: A page of time slots.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListQuantumTimeSlotsResponse'
  /v1alpha1/{parent}/reservationBudgets:
    parameters:
    - $ref: '#/components/parameters/ParentProject'
    get:
      tags: [Reservations]
      operationId: ListQuantumReservationBudgets
      summary: List Quantum Reservation Budgets
      description: List the reservation budgets allocated to a project.
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageToken'
      responses:
        '200':
          description: A page of reservation budgets.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListQuantumReservationBudgetsResponse'
  /v1alpha1/{parent}/reservationGrant:
    parameters:
    - $ref: '#/components/parameters/ParentProject'
    get:
      tags: [Reservations]
      operationId: ListQuantumReservationGrants
      summary: List Quantum Reservation Grants
      description: List the reservation grants (sponsorship records) available to a project.
      parameters:
      - $ref: '#/components/parameters/PageSize'
      - $ref: '#/components/parameters/PageToken'
      responses:
        '200':
          description: A page of reservation grants.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListQuantumReservationGrantsResponse'
  /v1alpha1/{name}:reallocate:
    parameters:
    - $ref: '#/components/parameters/ReservationGrantName'
    post:
      tags: [Reservations]
      operationId: ReallocateQuantumReservationGrant
      summary: Reallocate Quantum Reservation Grant
      description: Move budget between projects sharing a reservation grant.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReallocateRequest'
      responses:
        '200':
          description: Grant reallocated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuantumReservationGrant'
components:
  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.
  parameters:
    ParentProject:
      name: parent
      in: path
      required: true
      description: The parent project resource, formatted as `projects/{project_id}`.
      schema:
        type: string
        pattern: '^projects/[^/]+$'
    ParentProgram:
      name: parent
      in: path
      required: true
      description: The parent program resource, formatted as `projects/{project_id}/programs/{program_id}`.
      schema:
        type: string
        pattern: '^projects/[^/]+/programs/[^/]+$'
    ProcessorParent:
      name: parent
      in: path
      required: true
      description: The parent processor resource, formatted as `projects/{project_id}/processors/{processor_id}`.
      schema:
        type: string
        pattern: '^projects/[^/]+/processors/[^/]+$'
    JobParent:
      name: parent
      in: path
      required: true
      description: The parent job resource, formatted as `projects/{project_id}/programs/{program_id}/jobs/{job_id}`.
      schema:
        type: string
        pattern: '^projects/[^/]+/programs/[^/]+/jobs/[^/]+$'
    ProgramName:
      name: name
      in: path
      required: true
      description: The program resource name.
      schema:
        type: string
    JobName:
      name: name
      in: path
      required: true
      description: The job resource name.
      schema:
        type: string
    ProcessorName:
      name: name
      in: path
      required: true
      description: The processor resource name.
      schema:
        type: string
    CalibrationName:
      name: name
      in: path
      required: true
      description: The calibration resource name.
      schema:
        type: string
    ReservationName:
      name: name
      in: path
      required: true
      description: The reservation resource name.
      schema:
        type: string
    ReservationGrantName:
      name: name
      in: path
      required: true
      description: The reservation grant resource name.
      schema:
        type: string
    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
    Filter:
      name: filter
      in: query
      description: AIP-160 filter expression (e.g., `labels.team = quantum`, `executionStatus.state = SUCCESS`).
      schema:
        type: string
    UpdateMask:
      name: updateMask
      in: query
      description: FieldMask listing fields to update.
      schema:
        type: string
  schemas:
    Empty:
      type: object
      description: An empty response body.
    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`).
    QuantumJob:
      type: object
      description: An execution of a quantum program on a processor or simulator.
      properties:
        name:
          type: string
          description: Resource name `projects/{project_id}/programs/{program_id}/jobs/{job_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
        scheduling_config:
          $ref: '#/components/schemas/SchedulingConfig'
        run_context:
          type: object
          description: Serialised `google.protobuf.Any` run context (sweep parameters, repetitions).
        executionStatus:
          $ref: '#/components/schemas/ExecutionStatus'
    SchedulingConfig:
      type: object
      description: Job scheduling configuration including processor selector and priority.
      properties:
        processor_selector:
          type: object
          properties:
            processor_names:
              type: array
              items:
                type: string
        priority:
          type: integer
          format: int32
    ExecutionStatus:
      type: object
      description: Current state of a quantum job.
      properties:
        state:
          type: string
          enum:
          - STATE_UNSPECIFIED
          - READY
          - RUNNING
          - CANCELLING
          - CANCELLED
          - SUCCESS
          - FAILURE
        processorName:
          type: string
        failure:
          type: object
          properties:
            errorCode:
              type: string
            errorMessage:
              type: string
    QuantumResult:
      type: object
      description: Measurement results for a completed quantum job.
      properties:
        parent:
          type: string
        result:
          type: object
          description: Serialised `google.protobuf.Any` Cirq result payload.
    QuantumProcessor:
      type: object
      description: A quantum processing unit available to the project.
      properties:
        name:
          type: string
        health:
          type: string
          enum:
          - HEALTH_UNSPECIFIED
          - OK
          - DOWN
          - UNAVAILABLE
        expectedDownTime:
          type: string
          format: date-time
        expectedRecoveryTime:
          type: string
          format: date-time
        supportedDeviceTypes:
          type: array
          items:
            type: string
        deviceSpec:
          type: object
          description: Serialised `DeviceSpecification` protobuf.
    QuantumCalibration:
      type: object
      description: A calibration snapshot for a processor.
      properties:
        name:
          type: string
        timestamp:
          type: string
          format: date-time
        data:
          type: object
          description: Serialised `Metrics` protobuf with per-gate and per-qubit calibration metrics.
    QuantumReservation:
      type: object
      description: A reservation of processor time.
      properties:
        name:
          type: string
        startTime:
          type: string
          format: date-time
        endTime:
          type: string
          format: date-time
        whitelistedUsers:
          type: array
          items:
            type: string
    QuantumReservationGrant:
      type: object
      description: A reservation budget allocation granted to a project.
      properties:
        name:
          type: string
        grantedDuration:
          type: string
        consumedDuration:
          type: string
        whitelistedProjects:
          type: array
          items:
            type: string
    ReallocateRequest:
      type: object
      properties:
        projectId:
          type: string
        duration:
          type: string
          description: Duration in seconds (e.g. `3600s`).
    ListQuantumProgramsResponse:
      type: object
      properties:
        programs:
          type: array
          items:
            $ref: '#/components/schemas/QuantumProgram'
        nextPageToken:
          type: string
    ListQuantumJobsResponse:
      type: object
      properties:
        jobs:
          type: array
          items:
            $ref: '#/components/schemas/QuantumJob'
        nextPageToken:
          type: string
    ListQuantumJobEventsResponse:
      type: object
      properties:
        events:
          type: array
          items:
            type: object
            properties:
              eventTime:
                type: string
                format: date-time
              executionStatus:
                $ref: '#/components/schemas/ExecutionStatus'
        nextPageToken:
          type: string
    ListQuantumProcessorsResponse:
      type: object
      properties:
        processors:
          type: array
          items:
            $ref: '#/components/schemas/QuantumProcessor'
        nextPageToken:
          type: string
    ListQuantumCalibrationsResponse:
      type: object
      properties:
        calibrations:
          type: array
          items:
            $ref: '#/components/schemas/QuantumCalibration'
        nextPageToken:
          type: string
    ListQuantumReservationsResponse:
      type: object
      properties:
        reservations:
          type: array
          items:
            $ref: '#/components/schemas/QuantumReservation'
        nextPageToken:
          type: string
    ListQuantumTimeSlotsResponse:
      type: object
      properties:
        timeSlots:
          type: array
          items:
            type: object
            properties:
              startTime:
                type: string
                format: date-time
              endTime:
                type: string
                format: date-time
              slotType:
                type: string
                enum:
                - TIME_SLOT_TYPE_UNSPECIFIED
                - OPEN_SWIM
                - MAINTENANCE
                - RESERVATION
                - UNALLOCATED
        nextPageToken:
          type: string
    ListQuantumReservationBudgetsResponse:
      type: object
      properties:
        reservationBudgets:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              grantedDuration:
                type: string
              availableDuration:
                type: string
        nextPageToken:
          type: string
    ListQuantumReservationGrantsResponse:
      type: object
      properties:
        reservationGrants:
          type: array
          items:
            $ref: '#/components/schemas/QuantumReservationGrant'
        nextPageToken:
          type: string