{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/roroquantum-com/json-schema/roroquantum-com-machine-properties-schema.json",
  "title": "MachineProperties",
  "description": "`GET /v1/machines/{id}/properties` — what to compile against, the machine's pricing basis and, when the quantum service can read it, its topology right now.",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/roroquantum-com-openapi.yml#/components/schemas/MachineProperties",
  "type": "object",
  "properties": {
    "targetId": {
      "type": "string"
    },
    "displayName": {
      "type": "string"
    },
    "provider": {
      "type": "string",
      "description": "As in `Machine.provider`."
    },
    "kind": {
      "type": "string",
      "enum": [
        "sim",
        "qpu"
      ]
    },
    "type": {
      "type": "string",
      "enum": [
        "aer",
        "qsimulator",
        "qtester",
        "qpu"
      ]
    },
    "qubits": {
      "type": "integer"
    },
    "nativeGates": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "What the hardware physically executes."
    },
    "acceptedGates": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "What the API accepts for this machine — the server transpiles the rest."
    },
    "connectivity": {
      "type": "string",
      "enum": [
        "all-to-all",
        "nearest-neighbour",
        "programmable",
        "limited"
      ]
    },
    "minShots": {
      "type": "integer",
      "description": "The smallest shot count this backend accepts."
    },
    "maxShots": {
      "type": "integer",
      "description": "The largest shot count this backend accepts."
    },
    "modality": {
      "type": "string",
      "enum": [
        "simulator",
        "superconducting",
        "trapped-ion",
        "neutral-atom"
      ]
    },
    "availability": {
      "type": "string"
    },
    "analog": {
      "type": "boolean"
    },
    "resilience": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": [
          "readout",
          "zne",
          "dd",
          "twirling"
        ]
      },
      "description": "Error-mitigation methods a run on this machine may request right now (`resilience` on a run). Empty when none — `resilienceNote` says why."
    },
    "resilienceNote": {
      "type": "string",
      "description": "Why nothing is offered (e.g. an exact simulator has no readout error to mitigate), or a note on what is (e.g. a layout hint is advisory). Empty when there is nothing to add."
    },
    "resilienceState": {
      "type": "string",
      "enum": [
        "offered",
        "switched-off-by-operator",
        "not-offered"
      ],
      "description": "`offered`; `switched-off-by-operator` (available on this class of machine, switched off right now); `not-offered` (does not apply here)."
    },
    "resilienceMaxEffectiveShots": {
      "type": [
        "integer",
        "null"
      ],
      "description": "The most shot-equivalents one resilience run may bill here; null when nothing is offered."
    },
    "calibration": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/$defs/MachineCalibration"
        }
      ],
      "description": "The provider's own published calibration summary. Present only for brand-kept machines whose provider publishes one (today `ibm`) and only once it has been read; the key is absent otherwise."
    },
    "priceModel": {
      "type": "string",
      "enum": [
        "free",
        "per-shot",
        "per-second",
        "per-job"
      ],
      "description": "How this machine prices a run: `free` (RoRo's own simulators), `per-shot` (every rate below is 0), `per-second` (a rate per projected quantum-second, usually with a per-job minimum), or `per-job` (a job fee or minimum on top of the per-shot rate). These are RATES; what a run costs is what `POST /v1/runs/quote` answers."
    },
    "costPerSecond": {
      "type": "number",
      "format": "double",
      "description": "Credits per projected quantum-second (0 when the machine has no time rate)."
    },
    "costPerJob": {
      "type": "number",
      "format": "double",
      "description": "Credits added to every job (0 when none)."
    },
    "minJobCredits": {
      "type": "number",
      "format": "double",
      "description": "The least a job costs, in credits (0 when there is no floor)."
    },
    "topology": {
      "allOf": [
        {
          "$ref": "#/$defs/MachineTopology"
        }
      ],
      "description": "What the quantum service can route a circuit onto right now. The key is absent when it could not be read (never a stale or guessed map)."
    }
  },
  "$defs": {
    "MachineCalibration": {
      "type": "object",
      "description": "Calibration summary as the provider publishes it (brand-kept machines only). Figures are refreshed by a periodic sync; `syncedAt` is when they were last actually read — a figure the provider stopped reporting keeps its old timestamp.",
      "properties": {
        "processorType": {
          "type": [
            "string",
            "null"
          ],
          "description": "Processor family and revision."
        },
        "twoQubitErrorMedian": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "description": "Median two-qubit gate error, as a fraction (0.0035 = 0.35 %)."
        },
        "readoutErrorMedian": {
          "type": [
            "number",
            "null"
          ],
          "format": "double",
          "description": "Median readout (measurement) error, as a fraction."
        },
        "syncedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When these figures were last read from the provider."
        }
      }
    },
    "MachineTopology": {
      "type": "object",
      "description": "A machine's qubits and coupling as the quantum service sees them now. Brand-kept machines (`amazon`, `ibm`) carry their own qubit indices and edges; a white-labeled machine carries its public qubit count, how many are usable, and the coarse connectivity word — no edge list and no edge count.",
      "properties": {
        "qubits": {
          "type": "integer",
          "description": "Qubits on the device (the public count for a white-labeled machine)."
        },
        "usableQubits": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Qubits a circuit may be placed on now (offline ones removed); null when the provider does not say."
        },
        "couplingEdges": {
          "type": [
            "integer",
            "null"
          ],
          "description": "Coupling edges (brand-kept machines only)."
        },
        "connectivity": {
          "type": "string",
          "enum": [
            "all-to-all",
            "nearest-neighbour",
            "programmable",
            "limited"
          ]
        },
        "coupling": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "array",
            "items": {
              "type": "integer"
            },
            "minItems": 2,
            "maxItems": 2
          },
          "description": "Coupling edges as pairs of qubit indices (brand-kept machines only)."
        },
        "source": {
          "type": [
            "string",
            "null"
          ],
          "description": "Where the figures were read from."
        },
        "fetchedAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "When they were read."
        }
      }
    }
  }
}