> ## Documentation Index
> Fetch the complete documentation index at: https://docs.haiqu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Device Details

> Get one backend with its basis gates and qubit connectivity.

Use this tool when a workflow needs the hardware constraints of a specific
backend rather than the whole catalog: which gates it supports and which
qubit pairs are physically coupled. Those constraints determine what
``transpile_circuits`` can target.

When to Use:
    - Call this after ``list_qpus_and_simulators`` has narrowed the choice to
      one ``device_id``.
    - Call this before transpiling or before explaining why a circuit needs
      routing on a given backend.

Constraints:
    - ``operation_names`` and ``coupling_map`` are ``null`` for backends that
      publish no transpilation target, which is common for simulators.
    - ``status`` and ``pending_jobs`` are point-in-time snapshots.

Notes:
    - ``coupling_map`` can hold hundreds of qubit pairs on large QPUs. Check
      ``coupling_map_edges`` first and summarize connectivity instead of
      pasting the full list into agent-facing output.

Args:
    device_id: Backend identifier returned by ``list_qpus_and_simulators``.
    user: Authenticated user resolved from the API key.
    db: Active database session.

Returns:
    The backend record extended with basis gates and coupling map.

Raises:
    HTTPException: Raised with ``404`` when no backend matches ``device_id``.



## OpenAPI

````yaml https://api.haiqu.ai/openapi.json get /ai/device/{device_id}
openapi: 3.1.0
info:
  title: Haiqu API
  summary: Haiqu RESTful API service.
  description: Cloud service providing the access to Haiqu cloud runtime
  contact:
    name: Haiqu Inc.
    url: https://haiqu.ai/
    email: info@haiqu.ai
  version: 1.5.0
servers: []
security: []
paths:
  /ai/device/{device_id}:
    get:
      summary: Get Device Details
      description: >-
        Get one backend with its basis gates and qubit connectivity.


        Use this tool when a workflow needs the hardware constraints of a
        specific

        backend rather than the whole catalog: which gates it supports and which

        qubit pairs are physically coupled. Those constraints determine what

        ``transpile_circuits`` can target.


        When to Use:
            - Call this after ``list_qpus_and_simulators`` has narrowed the choice to
              one ``device_id``.
            - Call this before transpiling or before explaining why a circuit needs
              routing on a given backend.

        Constraints:
            - ``operation_names`` and ``coupling_map`` are ``null`` for backends that
              publish no transpilation target, which is common for simulators.
            - ``status`` and ``pending_jobs`` are point-in-time snapshots.

        Notes:
            - ``coupling_map`` can hold hundreds of qubit pairs on large QPUs. Check
              ``coupling_map_edges`` first and summarize connectivity instead of
              pasting the full list into agent-facing output.

        Args:
            device_id: Backend identifier returned by ``list_qpus_and_simulators``.
            user: Authenticated user resolved from the API key.
            db: Active database session.

        Returns:
            The backend record extended with basis gates and coupling map.

        Raises:
            HTTPException: Raised with ``404`` when no backend matches ``device_id``.
      operationId: get_device_details
      parameters:
        - name: device_id
          in: path
          required: true
          schema:
            type: string
            title: Device Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContextDeviceDetailsModel'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyQuery: []
        - APIKeyHeader: []
components:
  schemas:
    ContextDeviceDetailsModel:
      properties:
        id:
          type: string
          title: Id
        vendor:
          type: string
          title: Vendor
        name:
          type: string
          title: Name
        qubits:
          type: integer
          title: Qubits
        status:
          type: string
          title: Status
        pending_jobs:
          type: integer
          title: Pending Jobs
        simulator:
          type: boolean
          title: Simulator
        last_updated:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Last Updated
        operation_names:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Operation Names
        coupling_map:
          anyOf:
            - items:
                items:
                  type: integer
                type: array
              type: array
            - type: 'null'
          title: Coupling Map
        coupling_map_edges:
          anyOf:
            - type: integer
            - type: 'null'
          title: Coupling Map Edges
      type: object
      required:
        - id
        - vendor
        - name
        - qubits
        - status
        - pending_jobs
        - simulator
      title: ContextDeviceDetailsModel
      description: |-
        Extend the device catalog entry with transpilation-relevant topology.

        Attributes:
            last_updated: Timestamp of the last catalog refresh for this backend.
            operation_names: Basis gates and instructions the backend supports.
            coupling_map: Directed qubit pairs supporting two-qubit operations.
            coupling_map_edges: Number of entries in ``coupling_map``, provided so
                callers can judge topology size before expanding the full list.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyQuery:
      type: apiKey
      in: query
      name: HAIQU_API_KEY
    APIKeyHeader:
      type: apiKey
      in: header
      name: authorization

````