{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://sidrichardsquantum.github.io/Quantum_Backend_Bench/schemas/workflow-json.schema.json",
  "additionalProperties": false,
  "properties": {
    "measurements": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "observable": {
            "$ref": "pauli-json.schema.json"
          },
          "targets": {
            "items": {
              "minimum": 0,
              "type": "integer"
            },
            "type": "array"
          },
          "type": {
            "enum": [
              "counts",
              "probabilities",
              "samples",
              "expectation"
            ],
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "n_qubits": {
      "minimum": 1,
      "type": "integer"
    },
    "name": {
      "minLength": 1,
      "type": "string"
    },
    "operations": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "controls": {
            "items": {
              "minimum": 0,
              "type": "integer"
            },
            "type": "array"
          },
          "gate": {
            "enum": [
              "H",
              "X",
              "Y",
              "Z",
              "RX",
              "RY",
              "RZ",
              "CNOT",
              "CX",
              "MEASURE",
              "S",
              "T",
              "SX",
              "P",
              "PHASE",
              "CZ",
              "SWAP",
              "CCX",
              "CRX",
              "CRY",
              "CRZ",
              "CPHASE"
            ],
            "type": "string"
          },
          "parameter": {
            "description": "Numeric value, declared parameter name, or arithmetic expression over declared parameters.",
            "type": [
              "string",
              "number",
              "null"
            ]
          },
          "targets": {
            "items": {
              "minimum": 0,
              "type": "integer"
            },
            "type": "array"
          }
        },
        "required": [
          "gate",
          "targets"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "parameter_bindings": {
      "additionalProperties": {
        "type": "number"
      },
      "type": "object"
    },
    "parameters": {
      "items": {
        "minLength": 1,
        "type": "string"
      },
      "type": "array",
      "uniqueItems": true
    },
    "schema_version": {
      "const": "0.1"
    },
    "seed": {
      "type": [
        "integer",
        "null"
      ]
    },
    "shots": {
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "schema_version",
    "name",
    "n_qubits",
    "parameters",
    "parameter_bindings",
    "operations",
    "measurements",
    "shots"
  ],
  "title": "quantum-backend-bench workflow-json",
  "type": "object"
}
