Skip to main content
Glama

WAI Quantum job service

Minimise a Hamiltonian's expectation over a program's parameters

optimize_qasm
Read-onlyIdempotent

Minimise E = ⟨ψ|H|ψ⟩ over a program's parameters from the given params, deterministically: gradient descent with a fixed step, Adam, or SPSA from a seeded stream (at most 2000 steps). Every step's parameters and value (and gradient, or SPSA's perturbation and estimate) are listed, each step a link of a digest chain from the request, best and final given; the same request gives the same bytes on every platform. Sealed with the service's key: the receipt binds the program, every step, the method and the seed, and verify_quantum_result (or wai-quantum verify) re-runs it. A minimum found is a minimum along this path, not a proof of the global one.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "qasm": "<qasm>",
      "params": "<params>",
      "hamiltonian": "<hamiltonian>"
    },
    "name": "optimize_qasm"
  }
}

Input Schema

NameRequiredDescriptionDefault
qasmYesThe program, OpenQASM 3: its parameters declared `input float theta;` (or `input angle theta;`) and used in gates' arguments, through arithmetic, the built-in functions and gate definitions (not under a modifier, in a variable, a condition or an index: refused with Q129).
seedNoSPSA's seed (default 1).
stepsNoSteps to take (default 100).
paramsYesA value for each parameter, by name, as {"theta": 0.3}: bound exactly. Every parameter the program declares needs one (J050).
gradientNoadjoint (the default: one pass forward, one back) or parameter_shift (each gate a parameter moves run at shifted angles: two terms, four for a controlled rotation); both exact up to f64 rounding.
optimizerNogradient_descent (θ ← θ − step·∇E), adam (default; beta1, beta2, epsilon), or spsa (two evaluations a step along a ±1 perturbation from the seeded stream; c, A, alpha, gamma).
step_sizeNoThe step (gradient descent 0.1, Adam 0.05) or SPSA's gain a (0.2).
hamiltonianYesA Hamiltonian as Pauli terms summed: "Z0 Z1", "0.5 X2", "-1.5" (a constant), or {"pauli": "Y0 Y1", "coeff": -0.7}; qubit 0 is q[0].

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / anyOf
      Previous value: -[
      -  {
      -    "description": "An answer of the variational and algorithm library as every host gives it (engine::variational and engine::algorithms: gradient_qasm, optimize_qasm, vqe_ground_state, qaoa_maxcut and build_algorithm on both servers, wai-quantum gradient, optimize, vqe, qaoa and build, POST /v1/gradient, /v1/optimize, /v1/vqe, /v1/qaoa and /v1/build, and the Studio): the request, and the result sealed in a job's form. A result names the engine that made it and this schema (engine and schema) and the call that made it. docs/variational.md explains each.",
      -    "properties": {
      -      "request": {
      -        "description": "The call's request, as given.",
      -        "type": "object"
      -      },
      -      "result": {
      -        "anyOf": [
      -          {
      -            "description": "A Hamiltonian's expectation at the request's params and its exact gradient by each parameter (engine::variational::gradient).",
      -            "properties": {
      -              "call": {
      -                "const": "gradient"
      -              },
      -              "engine": {
      -                "description": "The engine that made the result: the wai-quantum crate's name and version.",
      -                "properties": {
      -                  "name": {
      -                    "const": "wai-quantum"
      -                  },
      -                  "version": {
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "name",
      -                  "version"
      -                ],
      -                "type": "object"
      -              },
      -              "evaluations": {
      -                "description": "Circuit evaluations (adjoint: the forward run and each gate derivative applied; parameter shift: each shifted run).",
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "gates": {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "gradient": {
      -                "additionalProperties": {
      -                  "type": "number"
      -                },
      -                "description": "∂E/∂p for each parameter p, by name.",
      -                "type": "object"
      -              },
      -              "how": {
      -                "type": "string"
      -              },
      -              "method": {
      -                "enum": [
      -                  "adjoint",
      -                  "parameter_shift"
      -                ]
      -              },
      -              "moved_gates": {
      -                "description": "Gates a parameter moves.",
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "parameters": {
      -                "description": "The program's parameters, in the order it declares them.",
      -                "items": {
      -                  "properties": {
      -                    "name": {
      -                      "type": "string"
      -                    },
      -                    "type": {
      -                      "enum": [
      -                        "float",
      -                        "angle",
      -                        "float[64]"
      -                      ]
      -                    }
      -                  },
      -                  "required": [
      -                    "name",
      -                    "type"
      -                  ],
      -                  "type": "object"
      -                },
      -                "type": "array"
      -              },
      -              "params": {
      -                "additionalProperties": {
      -                  "type": "number"
      -                },
      -                "description": "The point, by name.",
      -                "type": "object"
      -              },
      -              "precision": {
      -                "description": "What the arithmetic is: IEEE-754 double precision, approximate, and an a priori bound on each reported number's rounding (first order in 2^-53, doubled), from the value the same circuit has in exact arithmetic.",
      -                "properties": {
      -                  "arithmetic": {
      -                    "const": "f64"
      -                  },
      -                  "exact": {
      -                    "const": false
      -                  },
      -                  "reading": {
      -                    "type": "string"
      -                  },
      -                  "rounding_bound": {
      -                    "properties": {
      -                      "gradient": {
      -                        "additionalProperties": {
      -                          "minimum": 0,
      -                          "type": "number"
      -                        },
      -                        "description": "Each component's bound, by parameter.",
      -                        "type": "object"
      -                      },
      -                      "value": {
      -                        "minimum": 0,
      -                        "type": "number"
      -                      }
      -                    },
      -                    "required": [
      -                      "value"
      -                    ],
      -                    "type": "object"
      -                  }
      -                },
      -                "required": [
      -                  "arithmetic",
      -                  "exact",
      -                  "rounding_bound",
      -                  "reading"
      -                ],
      -                "type": "object"
      -              },
      -              "qubits": {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "receipt": {
      -                "description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify.",
      -                "properties": {
      -                  "alg": {
      -                    "const": "ed25519"
      -                  },
      -                  "canon": {
      -                    "const": "rfc8785",
      -                    "description": "The canonical form the digest is taken over."
      -                  },
      -                  "digest": {
      -                    "description": "The digest signed, 32 bytes in hex.",
      -                    "maxLength": 64,
      -                    "minLength": 64,
      -                    "type": "string"
      -                  },
      -                  "key": {
      -                    "description": "The signing key, 32 bytes in hex.",
      -                    "maxLength": 64,
      -                    "minLength": 64,
      -                    "type": "string"
      -                  },
      -                  "signature": {
      -                    "description": "The signature, 64 bytes in hex.",
      -                    "maxLength": 128,
      -                    "minLength": 128,
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "alg",
      -                  "canon",
      -                  "key",
      -                  "digest",
      -                  "signature"
      -                ],
      -                "title": "wai.quantum.receipt/2",
      -                "type": "object"
      -              },
      -              "schema": {
      -                "const": "wai.quantum.algorithms/1"
      -              },
      -              "terms": {
      -                "description": "The Hamiltonian's Pauli terms.",
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "value": {
      -                "description": "⟨ψ|H|ψ⟩ at the params.",
      -                "type": "number"
      -              }
      -            },
      -            "required": [
      -              "call",
      -              "value",
      -              "gradient",
      -              "params",
      -              "method",
      -              "how",
      -              "evaluations",
      -              "qubits",
      -              "gates",
      -              "moved_gates",
      -              "parameters",
      -              "terms",
      -              "precision"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "description": "An optimisation of a Hamiltonian's expectation over the program's parameters, every step a link of a digest chain from the request (engine::variational::optimize).",
      -            "properties": {
      -              "best": {
      -                "properties": {
      -                  "params": {
      -                    "additionalProperties": {
      -                      "type": "number"
      -                    },
      -                    "type": "object"
      -                  },
      -                  "step": {
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  },
      -                  "value": {
      -                    "type": "number"
      -                  }
      -                },
      -                "required": [
      -                  "step",
      -                  "params",
      -                  "value"
      -                ],
      -                "type": "object"
      -              },
      -              "call": {
      -                "const": "optimize"
      -              },
      -              "chain": {
      -                "description": "The chain's last link.",
      -                "maxLength": 64,
      -                "minLength": 64,
      -                "type": "string"
      -              },
      -              "engine": {
      -                "description": "The engine that made the result: the wai-quantum crate's name and version.",
      -                "properties": {
      -                  "name": {
      -                    "const": "wai-quantum"
      -                  },
      -                  "version": {
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "name",
      -                  "version"
      -                ],
      -                "type": "object"
      -              },
      -              "evaluations": {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "final": {
      -                "properties": {
      -                  "params": {
      -                    "additionalProperties": {
      -                      "type": "number"
      -                    },
      -                    "type": "object"
      -                  },
      -                  "step": {
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  },
      -                  "value": {
      -                    "type": "number"
      -                  }
      -                },
      -                "required": [
      -                  "step",
      -                  "params",
      -                  "value"
      -                ],
      -                "type": "object"
      -              },
      -              "gates": {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "note": {
      -                "type": "string"
      -              },
      -              "optimizer": {
      -                "properties": {
      -                  "A": {
      -                    "type": "number"
      -                  },
      -                  "alpha": {
      -                    "type": "number"
      -                  },
      -                  "beta1": {
      -                    "type": "number"
      -                  },
      -                  "beta2": {
      -                    "type": "number"
      -                  },
      -                  "c": {
      -                    "type": "number"
      -                  },
      -                  "epsilon": {
      -                    "type": "number"
      -                  },
      -                  "gamma": {
      -                    "type": "number"
      -                  },
      -                  "gradient": {
      -                    "enum": [
      -                      "adjoint",
      -                      "parameter_shift"
      -                    ]
      -                  },
      -                  "name": {
      -                    "enum": [
      -                      "gradient_descent",
      -                      "adam",
      -                      "spsa"
      -                    ]
      -                  },
      -                  "seed": {
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  },
      -                  "step_size": {
      -                    "type": "number"
      -                  },
      -                  "steps": {
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  }
      -                },
      -                "required": [
      -                  "name",
      -                  "steps",
      -                  "step_size"
      -                ],
      -                "type": "object"
      -              },
      -              "parameters": {
      -                "description": "The program's parameters, in the order it declares them.",
      -                "items": {
      -                  "properties": {
      -                    "name": {
      -                      "type": "string"
      -                    },
      -                    "type": {
      -                      "enum": [
      -                        "float",
      -                        "angle",
      -                        "float[64]"
      -                      ]
      -                    }
      -                  },
      -                  "required": [
      -                    "name",
      -                    "type"
      -                  ],
      -                  "type": "object"
      -                },
      -                "type": "array"
      -              },
      -              "precision": {
      -                "description": "What the arithmetic is: IEEE-754 double precision, approximate, and an a priori bound on each reported number's rounding (first order in 2^-53, doubled), from the value the same circuit has in exact arithmetic.",
      -                "properties": {
      -                  "arithmetic": {
      -                    "const": "f64"
      -                  },
      -                  "exact": {
      -                    "const": false
      -                  },
      -                  "reading": {
      -                    "type": "string"
      -                  },
      -                  "rounding_bound": {
      -                    "properties": {
      -                      "gradient": {
      -                        "additionalProperties": {
      -                          "minimum": 0,
      -                          "type": "number"
      -                        },
      -                        "description": "Each component's bound, by parameter.",
      -                        "type": "object"
      -                      },
      -                      "value": {
      -                        "minimum": 0,
      -                        "type": "number"
      -                      }
      -                    },
      -                    "required": [
      -                      "value"
      -                    ],
      -                    "type": "object"
      -                  }
      -                },
      -                "required": [
      -                  "arithmetic",
      -                  "exact",
      -                  "rounding_bound",
      -                  "reading"
      -                ],
      -                "type": "object"
      -              },
      -              "qubits": {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "receipt": {
      -                "description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify.",
      -                "properties": {
      -                  "alg": {
      -                    "const": "ed25519"
      -                  },
      -                  "canon": {
      -                    "const": "rfc8785",
      -                    "description": "The canonical form the digest is taken over."
      -                  },
      -                  "digest": {
      -                    "description": "The digest signed, 32 bytes in hex.",
      -                    "maxLength": 64,
      -                    "minLength": 64,
      -                    "type": "string"
      -                  },
      -                  "key": {
      -                    "description": "The signing key, 32 bytes in hex.",
      -                    "maxLength": 64,
      -                    "minLength": 64,
      -                    "type": "string"
      -                  },
      -                  "signature": {
      -                    "description": "The signature, 64 bytes in hex.",
      -                    "maxLength": 128,
      -                    "minLength": 128,
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "alg",
      -                  "canon",
      -                  "key",
      -                  "digest",
      -                  "signature"
      -                ],
      -                "title": "wai.quantum.receipt/2",
      -                "type": "object"
      -              },
      -              "schema": {
      -                "const": "wai.quantum.algorithms/1"
      -              },
      -              "start": {
      -                "description": "The chain's first link: BLAKE3 of the domain wai.quantum.trace/1 and the request's canonical text.",
      -                "maxLength": 64,
      -                "minLength": 64,
      -                "type": "string"
      -              },
      -              "steps": {
      -                "items": {
      -                  "properties": {
      -                    "digest": {
      -                      "description": "This step's link of the chain: BLAKE3 of the previous link and the step's canonical text without its digest.",
      -                      "maxLength": 64,
      -                      "minLength": 64,
      -                      "type": "string"
      -                    },
      -                    "estimate": {
      -                      "description": "SPSA: the gradient's estimate.",
      -                      "items": {
      -                        "type": "number"
      -                      },
      -                      "type": "array"
      -                    },
      -                    "gains": {
      -                      "description": "SPSA: the step's gains a_k and c_k.",
      -                      "properties": {
      -                        "a": {
      -                          "type": "number"
      -                        },
      -                        "c": {
      -                          "type": "number"
      -                        }
      -                      },
      -                      "required": [
      -                        "a",
      -                        "c"
      -                      ],
      -                      "type": "object"
      -                    },
      -                    "gradient": {
      -                      "additionalProperties": {
      -                        "type": "number"
      -                      },
      -                      "description": "Gradient descent and Adam: the gradient at the step's params.",
      -                      "type": "object"
      -                    },
      -                    "params": {
      -                      "additionalProperties": {
      -                        "type": "number"
      -                      },
      -                      "type": "object"
      -                    },
      -                    "perturbation": {
      -                      "description": "SPSA: the step's perturbation, from the seeded stream.",
      -                      "items": {
      -                        "enum": [
      -                          1,
      -                          -1
      -                        ]
      -                      },
      -                      "type": "array"
      -                    },
      -                    "step": {
      -                      "minimum": 0,
      -                      "type": "integer"
      -                    },
      -                    "value": {
      -                      "type": "number"
      -                    }
      -                  },
      -                  "required": [
      -                    "step",
      -                    "params",
      -                    "value",
      -                    "digest"
      -                  ],
      -                  "type": "object"
      -                },
      -                "minItems": 2,
      -                "type": "array"
      -              },
      -              "terms": {
      -                "minimum": 0,
      -                "type": "integer"
      -              }
      -            },
      -            "required": [
      -              "call",
      -              "optimizer",
      -              "qubits",
      -              "gates",
      -              "parameters",
      -              "terms",
      -              "start",
      -              "steps",
      -              "chain",
      -              "best",
      -              "final",
      -              "evaluations",
      -              "precision"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "description": "The variational eigensolver: an optimisation, and the exact ground energy by diagonalisation beside the energy found (engine::variational::vqe).",
      -            "properties": {
      -              "ansatz": {
      -                "properties": {
      -                  "kind": {
      -                    "const": "hardware_efficient"
      -                  },
      -                  "params": {
      -                    "additionalProperties": {
      -                      "type": "number"
      -                    },
      -                    "type": "object"
      -                  },
      -                  "qasm": {
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "qasm",
      -                  "params",
      -                  "kind"
      -                ],
      -                "type": "object"
      -              },
      -              "best": {
      -                "properties": {
      -                  "params": {
      -                    "additionalProperties": {
      -                      "type": "number"
      -                    },
      -                    "type": "object"
      -                  },
      -                  "step": {
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  },
      -                  "value": {
      -                    "type": "number"
      -                  }
      -                },
      -                "required": [
      -                  "step",
      -                  "params",
      -                  "value"
      -                ],
      -                "type": "object"
      -              },
      -              "call": {
      -                "const": "vqe"
      -              },
      -              "chain": {
      -                "description": "The chain's last link.",
      -                "maxLength": 64,
      -                "minLength": 64,
      -                "type": "string"
      -              },
      -              "engine": {
      -                "description": "The engine that made the result: the wai-quantum crate's name and version.",
      -                "properties": {
      -                  "name": {
      -                    "const": "wai-quantum"
      -                  },
      -                  "version": {
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "name",
      -                  "version"
      -                ],
      -                "type": "object"
      -              },
      -              "evaluations": {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "final": {
      -                "properties": {
      -                  "params": {
      -                    "additionalProperties": {
      -                      "type": "number"
      -                    },
      -                    "type": "object"
      -                  },
      -                  "step": {
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  },
      -                  "value": {
      -                    "type": "number"
      -                  }
      -                },
      -                "required": [
      -                  "step",
      -                  "params",
      -                  "value"
      -                ],
      -                "type": "object"
      -              },
      -              "gates": {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "note": {
      -                "type": "string"
      -              },
      -              "optimizer": {
      -                "properties": {
      -                  "A": {
      -                    "type": "number"
      -                  },
      -                  "alpha": {
      -                    "type": "number"
      -                  },
      -                  "beta1": {
      -                    "type": "number"
      -                  },
      -                  "beta2": {
      -                    "type": "number"
      -                  },
      -                  "c": {
      -                    "type": "number"
      -                  },
      -                  "epsilon": {
      -                    "type": "number"
      -                  },
      -                  "gamma": {
      -                    "type": "number"
      -                  },
      -                  "gradient": {
      -                    "enum": [
      -                      "adjoint",
      -                      "parameter_shift"
      -                    ]
      -                  },
      -                  "name": {
      -                    "enum": [
      -                      "gradient_descent",
      -                      "adam",
      -                      "spsa"
      -                    ]
      -                  },
      -                  "seed": {
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  },
      -                  "step_size": {
      -                    "type": "number"
      -                  },
      -                  "steps": {
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  }
      -                },
      -                "required": [
      -                  "name",
      -                  "steps",
      -                  "step_size"
      -                ],
      -                "type": "object"
      -              },
      -              "parameters": {
      -                "description": "The program's parameters, in the order it declares them.",
      -                "items": {
      -                  "properties": {
      -                    "name": {
      -                      "type": "string"
      -                    },
      -                    "type": {
      -                      "enum": [
      -                        "float",
      -                        "angle",
      -                        "float[64]"
      -                      ]
      -                    }
      -                  },
      -                  "required": [
      -                    "name",
      -                    "type"
      -                  ],
      -                  "type": "object"
      -                },
      -                "type": "array"
      -              },
      -              "precision": {
      -                "description": "What the arithmetic is: IEEE-754 double precision, approximate, and an a priori bound on each reported number's rounding (first order in 2^-53, doubled), from the value the same circuit has in exact arithmetic.",
      -                "properties": {
      -                  "arithmetic": {
      -                    "const": "f64"
      -                  },
      -                  "exact": {
      -                    "const": false
      -                  },
      -                  "reading": {
      -                    "type": "string"
      -                  },
      -                  "rounding_bound": {
      -                    "properties": {
      -                      "gradient": {
      -                        "additionalProperties": {
      -                          "minimum": 0,
      -                          "type": "number"
      -                        },
      -                        "description": "Each component's bound, by parameter.",
      -                        "type": "object"
      -                      },
      -                      "value": {
      -                        "minimum": 0,
      -                        "type": "number"
      -                      }
      -                    },
      -                    "required": [
      -                      "value"
      -                    ],
      -                    "type": "object"
      -                  }
      -                },
      -                "required": [
      -                  "arithmetic",
      -                  "exact",
      -                  "rounding_bound",
      -                  "reading"
      -                ],
      -                "type": "object"
      -              },
      -              "qubits": {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "receipt": {
      -                "description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify.",
      -                "properties": {
      -                  "alg": {
      -                    "const": "ed25519"
      -                  },
      -                  "canon": {
      -                    "const": "rfc8785",
      -                    "description": "The canonical form the digest is taken over."
      -                  },
      -                  "digest": {
      -                    "description": "The digest signed, 32 bytes in hex.",
      -                    "maxLength": 64,
      -                    "minLength": 64,
      -                    "type": "string"
      -                  },
      -                  "key": {
      -                    "description": "The signing key, 32 bytes in hex.",
      -                    "maxLength": 64,
      -                    "minLength": 64,
      -                    "type": "string"
      -                  },
      -                  "signature": {
      -                    "description": "The signature, 64 bytes in hex.",
      -                    "maxLength": 128,
      -                    "minLength": 128,
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "alg",
      -                  "canon",
      -                  "key",
      -                  "digest",
      -                  "signature"
      -                ],
      -                "title": "wai.quantum.receipt/2",
      -                "type": "object"
      -              },
      -              "reference": {
      -                "anyOf": [
      -                  {
      -                    "properties": {
      -                      "first_excited": {
      -                        "anyOf": [
      -                          {
      -                            "type": "number"
      -                          },
      -                          {
      -                            "type": "null"
      -                          }
      -                        ]
      -                      },
      -                      "gap": {
      -                        "description": "The best energy found above the ground energy.",
      -                        "type": "number"
      -                      },
      -                      "ground_energy": {
      -                        "type": "number"
      -                      },
      -                      "how": {
      -                        "type": "string"
      -                      }
      -                    },
      -                    "required": [
      -                      "ground_energy",
      -                      "how",
      -                      "gap"
      -                    ],
      -                    "type": "object"
      -                  },
      -                  {
      -                    "properties": {
      -                      "unchecked": {
      -                        "type": "string"
      -                      }
      -                    },
      -                    "required": [
      -                      "unchecked"
      -                    ],
      -                    "type": "object"
      -                  }
      -                ]
      -              },
      -              "schema": {
      -                "const": "wai.quantum.algorithms/1"
      -              },
      -              "start": {
      -                "description": "The chain's first link: BLAKE3 of the domain wai.quantum.trace/1 and the request's canonical text.",
      -                "maxLength": 64,
      -                "minLength": 64,
      -                "type": "string"
      -              },
      -              "steps": {
      -                "items": {
      -                  "properties": {
      -                    "digest": {
      -                      "description": "This step's link of the chain: BLAKE3 of the previous link and the step's canonical text without its digest.",
      -                      "maxLength": 64,
      -                      "minLength": 64,
      -                      "type": "string"
      -                    },
      -                    "estimate": {
      -                      "description": "SPSA: the gradient's estimate.",
      -                      "items": {
      -                        "type": "number"
      -                      },
      -                      "type": "array"
      -                    },
      -                    "gains": {
      -                      "description": "SPSA: the step's gains a_k and c_k.",
      -                      "properties": {
      -                        "a": {
      -                          "type": "number"
      -                        },
      -                        "c": {
      -                          "type": "number"
      -                        }
      -                      },
      -                      "required": [
      -                        "a",
      -                        "c"
      -                      ],
      -                      "type": "object"
      -                    },
      -                    "gradient": {
      -                      "additionalProperties": {
      -                        "type": "number"
      -                      },
      -                      "description": "Gradient descent and Adam: the gradient at the step's params.",
      -                      "type": "object"
      -                    },
      -                    "params": {
      -                      "additionalProperties": {
      -                        "type": "number"
      -                      },
      -                      "type": "object"
      -                    },
      -                    "perturbation": {
      -                      "description": "SPSA: the step's perturbation, from the seeded stream.",
      -                      "items": {
      -                        "enum": [
      -                          1,
      -                          -1
      -                        ]
      -                      },
      -                      "type": "array"
      -                    },
      -                    "step": {
      -                      "minimum": 0,
      -                      "type": "integer"
      -                    },
      -                    "value": {
      -                      "type": "number"
      -                    }
      -                  },
      -                  "required": [
      -                    "step",
      -                    "params",
      -                    "value",
      -                    "digest"
      -                  ],
      -                  "type": "object"
      -                },
      -                "minItems": 2,
      -                "type": "array"
      -              },
      -              "terms": {
      -                "minimum": 0,
      -                "type": "integer"
      -              }
      -            },
      -            "required": [
      -              "call",
      -              "optimizer",
      -              "qubits",
      -              "gates",
      -              "parameters",
      -              "terms",
      -              "start",
      -              "steps",
      -              "chain",
      -              "best",
      -              "final",
      -              "evaluations",
      -              "precision",
      -              "reference"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "description": "Max-Cut by QAOA: the program and Hamiltonian built from the graph, optimised, and the cut set beside the maximum cut by brute force (engine::variational::qaoa).",
      -            "properties": {
      -              "best": {
      -                "properties": {
      -                  "params": {
      -                    "additionalProperties": {
      -                      "type": "number"
      -                    },
      -                    "type": "object"
      -                  },
      -                  "step": {
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  },
      -                  "value": {
      -                    "type": "number"
      -                  }
      -                },
      -                "required": [
      -                  "step",
      -                  "params",
      -                  "value"
      -                ],
      -                "type": "object"
      -              },
      -              "call": {
      -                "const": "qaoa"
      -              },
      -              "chain": {
      -                "description": "The chain's last link.",
      -                "maxLength": 64,
      -                "minLength": 64,
      -                "type": "string"
      -              },
      -              "engine": {
      -                "description": "The engine that made the result: the wai-quantum crate's name and version.",
      -                "properties": {
      -                  "name": {
      -                    "const": "wai-quantum"
      -                  },
      -                  "version": {
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "name",
      -                  "version"
      -                ],
      -                "type": "object"
      -              },
      -              "evaluations": {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "final": {
      -                "properties": {
      -                  "params": {
      -                    "additionalProperties": {
      -                      "type": "number"
      -                    },
      -                    "type": "object"
      -                  },
      -                  "step": {
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  },
      -                  "value": {
      -                    "type": "number"
      -                  }
      -                },
      -                "required": [
      -                  "step",
      -                  "params",
      -                  "value"
      -                ],
      -                "type": "object"
      -              },
      -              "gates": {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "graph": {
      -                "properties": {
      -                  "edges": {
      -                    "items": {
      -                      "maxItems": 3,
      -                      "minItems": 3,
      -                      "type": "array"
      -                    },
      -                    "type": "array"
      -                  },
      -                  "nodes": {
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  }
      -                },
      -                "required": [
      -                  "nodes",
      -                  "edges"
      -                ],
      -                "type": "object"
      -              },
      -              "hamiltonian": {
      -                "type": "array"
      -              },
      -              "layers": {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "maxcut": {
      -                "properties": {
      -                  "bits": {
      -                    "type": "string"
      -                  },
      -                  "expected_cut": {
      -                    "type": "number"
      -                  },
      -                  "how": {
      -                    "type": "string"
      -                  },
      -                  "max_cut": {
      -                    "type": "number"
      -                  },
      -                  "most_likely": {
      -                    "properties": {
      -                      "bits": {
      -                        "type": "string"
      -                      },
      -                      "cut": {
      -                        "type": "number"
      -                      },
      -                      "optimal": {
      -                        "type": "boolean"
      -                      },
      -                      "probability": {
      -                        "type": "number"
      -                      }
      -                    },
      -                    "required": [
      -                      "bits",
      -                      "probability",
      -                      "cut",
      -                      "optimal"
      -                    ],
      -                    "type": "object"
      -                  },
      -                  "optimal": {
      -                    "items": {
      -                      "type": "string"
      -                    },
      -                    "type": "array"
      -                  },
      -                  "optimal_count": {
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  },
      -                  "p_optimal": {
      -                    "type": "number"
      -                  },
      -                  "ratio": {
      -                    "type": "number"
      -                  }
      -                },
      -                "required": [
      -                  "max_cut",
      -                  "optimal",
      -                  "optimal_count",
      -                  "how",
      -                  "expected_cut",
      -                  "ratio",
      -                  "most_likely",
      -                  "p_optimal",
      -                  "bits"
      -                ],
      -                "type": "object"
      -              },
      -              "note": {
      -                "type": "string"
      -              },
      -              "optimizer": {
      -                "properties": {
      -                  "A": {
      -                    "type": "number"
      -                  },
      -                  "alpha": {
      -                    "type": "number"
      -                  },
      -                  "beta1": {
      -                    "type": "number"
      -                  },
      -                  "beta2": {
      -                    "type": "number"
      -                  },
      -                  "c": {
      -                    "type": "number"
      -                  },
      -                  "epsilon": {
      -                    "type": "number"
      -                  },
      -                  "gamma": {
      -                    "type": "number"
      -                  },
      -                  "gradient": {
      -                    "enum": [
      -                      "adjoint",
      -                      "parameter_shift"
      -                    ]
      -                  },
      -                  "name": {
      -                    "enum": [
      -                      "gradient_descent",
      -                      "adam",
      -                      "spsa"
      -                    ]
      -                  },
      -                  "seed": {
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  },
      -                  "step_size": {
      -                    "type": "number"
      -                  },
      -                  "steps": {
      -                    "minimum": 0,
      -                    "type": "integer"
      -                  }
      -                },
      -                "required": [
      -                  "name",
      -                  "steps",
      -                  "step_size"
      -                ],
      -                "type": "object"
      -              },
      -              "parameters": {
      -                "description": "The program's parameters, in the order it declares them.",
      -                "items": {
      -                  "properties": {
      -                    "name": {
      -                      "type": "string"
      -                    },
      -                    "type": {
      -                      "enum": [
      -                        "float",
      -                        "angle",
      -                        "float[64]"
      -                      ]
      -                    }
      -                  },
      -                  "required": [
      -                    "name",
      -                    "type"
      -                  ],
      -                  "type": "object"
      -                },
      -                "type": "array"
      -              },
      -              "precision": {
      -                "description": "What the arithmetic is: IEEE-754 double precision, approximate, and an a priori bound on each reported number's rounding (first order in 2^-53, doubled), from the value the same circuit has in exact arithmetic.",
      -                "properties": {
      -                  "arithmetic": {
      -                    "const": "f64"
      -                  },
      -                  "exact": {
      -                    "const": false
      -                  },
      -                  "reading": {
      -                    "type": "string"
      -                  },
      -                  "rounding_bound": {
      -                    "properties": {
      -                      "gradient": {
      -                        "additionalProperties": {
      -                          "minimum": 0,
      -                          "type": "number"
      -                        },
      -                        "description": "Each component's bound, by parameter.",
      -                        "type": "object"
      -                      },
      -                      "value": {
      -                        "minimum": 0,
      -                        "type": "number"
      -                      }
      -                    },
      -                    "required": [
      -                      "value"
      -                    ],
      -                    "type": "object"
      -                  }
      -                },
      -                "required": [
      -                  "arithmetic",
      -                  "exact",
      -                  "rounding_bound",
      -                  "reading"
      -                ],
      -                "type": "object"
      -              },
      -              "program": {
      -                "type": "string"
      -              },
      -              "qubits": {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "receipt": {
      -                "description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify.",
      -                "properties": {
      -                  "alg": {
      -                    "const": "ed25519"
      -                  },
      -                  "canon": {
      -                    "const": "rfc8785",
      -                    "description": "The canonical form the digest is taken over."
      -                  },
      -                  "digest": {
      -                    "description": "The digest signed, 32 bytes in hex.",
      -                    "maxLength": 64,
      -                    "minLength": 64,
      -                    "type": "string"
      -                  },
      -                  "key": {
      -                    "description": "The signing key, 32 bytes in hex.",
      -                    "maxLength": 64,
      -                    "minLength": 64,
      -                    "type": "string"
      -                  },
      -                  "signature": {
      -                    "description": "The signature, 64 bytes in hex.",
      -                    "maxLength": 128,
      -                    "minLength": 128,
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "alg",
      -                  "canon",
      -                  "key",
      -                  "digest",
      -                  "signature"
      -                ],
      -                "title": "wai.quantum.receipt/2",
      -                "type": "object"
      -              },
      -              "schema": {
      -                "const": "wai.quantum.algorithms/1"
      -              },
      -              "start": {
      -                "description": "The chain's first link: BLAKE3 of the domain wai.quantum.trace/1 and the request's canonical text.",
      -                "maxLength": 64,
      -                "minLength": 64,
      -                "type": "string"
      -              },
      -              "steps": {
      -                "items": {
      -                  "properties": {
      -                    "digest": {
      -                      "description": "This step's link of the chain: BLAKE3 of the previous link and the step's canonical text without its digest.",
      -                      "maxLength": 64,
      -                      "minLength": 64,
      -                      "type": "string"
      -                    },
      -                    "estimate": {
      -                      "description": "SPSA: the gradient's estimate.",
      -                      "items": {
      -                        "type": "number"
      -                      },
      -                      "type": "array"
      -                    },
      -                    "gains": {
      -                      "description": "SPSA: the step's gains a_k and c_k.",
      -                      "properties": {
      -                        "a": {
      -                          "type": "number"
      -                        },
      -                        "c": {
      -                          "type": "number"
      -                        }
      -                      },
      -                      "required": [
      -                        "a",
      -                        "c"
      -                      ],
      -                      "type": "object"
      -                    },
      -                    "gradient": {
      -                      "additionalProperties": {
      -                        "type": "number"
      -                      },
      -                      "description": "Gradient descent and Adam: the gradient at the step's params.",
      -                      "type": "object"
      -                    },
      -                    "params": {
      -                      "additionalProperties": {
      -                        "type": "number"
      -                      },
      -                      "type": "object"
      -                    },
      -                    "perturbation": {
      -                      "description": "SPSA: the step's perturbation, from the seeded stream.",
      -                      "items": {
      -                        "enum": [
      -                          1,
      -                          -1
      -                        ]
      -                      },
      -                      "type": "array"
      -                    },
      -                    "step": {
      -                      "minimum": 0,
      -                      "type": "integer"
      -                    },
      -                    "value": {
      -                      "type": "number"
      -                    }
      -                  },
      -                  "required": [
      -                    "step",
      -                    "params",
      -                    "value",
      -                    "digest"
      -                  ],
      -                  "type": "object"
      -                },
      -                "minItems": 2,
      -                "type": "array"
      -              },
      -              "terms": {
      -                "minimum": 0,
      -                "type": "integer"
      -              }
      -            },
      -            "required": [
      -              "call",
      -              "optimizer",
      -              "qubits",
      -              "gates",
      -              "parameters",
      -              "terms",
      -              "start",
      -              "steps",
      -              "chain",
      -              "best",
      -              "final",
      -              "evaluations",
      -              "precision",
      -              "graph",
      -              "layers",
      -              "program",
      -              "hamiltonian",
      -              "maxcut"
      -            ],
      -            "type": "object"
      -          },
      -          {
      -            "description": "A program an algorithm builder writes (engine::algorithms): its text, how to read it, what it gives, and the equivalence ladder's verdict against a reference built from the definitions.",
      -            "properties": {
      -              "algorithm": {
      -                "enum": [
      -                  "qpe",
      -                  "amplitude_estimation",
      -                  "adder",
      -                  "qsvt"
      -                ]
      -              },
      -              "call": {
      -                "const": "build"
      -              },
      -              "check": {
      -                "properties": {
      -                  "global_phase": {
      -                    "type": "number"
      -                  },
      -                  "how": {
      -                    "enum": [
      -                      "exact",
      -                      "random",
      -                      "none"
      -                    ]
      -                  },
      -                  "reference": {
      -                    "type": "string"
      -                  },
      -                  "verdict": {
      -                    "enum": [
      -                      "equivalent",
      -                      "different",
      -                      "unchecked"
      -                    ]
      -                  },
      -                  "why": {
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "verdict",
      -                  "how",
      -                  "why"
      -                ],
      -                "type": "object"
      -              },
      -              "engine": {
      -                "description": "The engine that made the result: the wai-quantum crate's name and version.",
      -                "properties": {
      -                  "name": {
      -                    "const": "wai-quantum"
      -                  },
      -                  "version": {
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "name",
      -                  "version"
      -                ],
      -                "type": "object"
      -              },
      -              "expected": {
      -                "description": "What it gives: a distribution's likeliest outcomes, a sum, or a polynomial's value.",
      -                "type": "object"
      -              },
      -              "gates": {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "qasm": {
      -                "type": "string"
      -              },
      -              "qubits": {
      -                "minimum": 0,
      -                "type": "integer"
      -              },
      -              "reads": {
      -                "description": "How to read the program's result.",
      -                "type": "object"
      -              },
      -              "receipt": {
      -                "description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) signed serde_json's own text under the domain ending \\x01; they still verify.",
      -                "properties": {
      -                  "alg": {
      -                    "const": "ed25519"
      -                  },
      -                  "canon": {
      -                    "const": "rfc8785",
      -                    "description": "The canonical form the digest is taken over."
      -                  },
      -                  "digest": {
      -                    "description": "The digest signed, 32 bytes in hex.",
      -                    "maxLength": 64,
      -                    "minLength": 64,
      -                    "type": "string"
      -                  },
      -                  "key": {
      -                    "description": "The signing key, 32 bytes in hex.",
      -                    "maxLength": 64,
      -                    "minLength": 64,
      -                    "type": "string"
      -                  },
      -                  "signature": {
      -                    "description": "The signature, 64 bytes in hex.",
      -                    "maxLength": 128,
      -                    "minLength": 128,
      -                    "type": "string"
      -                  }
      -                },
      -                "required": [
      -                  "alg",
      -                  "canon",
      -                  "key",
      -                  "digest",
      -                  "signature"
      -                ],
      -                "title": "wai.quantum.receipt/2",
      -                "type": "object"
      -              },
      -              "schema": {
      -                "const": "wai.quantum.algorithms/1"
      -              }
      -            },
      -            "required": [
      -              "call",
      -              "algorithm",
      -              "qasm",
      -              "qubits",
      -              "gates",
      -              "reads",
      -              "expected",
      -              "check"
      -            ],
      -            "type": "object"
      -          }
      -        ],
      -        "description": "A gradient, an optimisation, a VQE, a QAOA run or a built program, with its receipt."
      -      }
      -    },
      -    "required": [
      -      "request",
      -      "result"
      -    ],
      -    "title": "wai.quantum.algorithms/1",
      -    "type": "object"
      -  },
      -  {
      -    "description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone.",
      -    "properties": {
      -      "code": {
      -        "type": [
      -          "string",
      -          "null"
      -        ]
      -      },
      -      "codes": {
      -        "items": {
      -          "type": "string"
      -        },
      -        "type": "array"
      -      },
      -      "error": {
      -        "type": "string"
      -      },
      -      "meaning": {
      -        "type": "string"
      -      },
      -      "message": {
      -        "type": "string"
      -      },
      -      "outcome": {
      -        "enum": [
      -          "refused",
      -          "retry",
      -          "failed",
      -          "lowered",
      -          "carried",
      -          "preserved",
      -          "warned",
      -          "dropped",
      -          "defaulted"
      -        ]
      -      }
      -    },
      -    "required": [
      -      "error"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "description": "An answer of the variational and algorithm library as every host gives it (engine::variational and engine::algorithms: gradient_qasm, optimize_qasm, vqe_ground_state, qaoa_maxcut and build_algorithm on both servers, wai-quantum gradient, optimize, vqe, qaoa and build, POST /v1/gradient, /v1/optimize, /v1/vqe, /v1/qaoa and /v1/build, and the Studio): the request, and the result sealed in a job's form. A result names the engine that made it and this schema (engine and schema) and the call that made it. docs/variational.md explains each.",
      +    "properties": {
      +      "request": {
      +        "description": "The call's request, as given.",
      +        "type": "object"
      +      },
      +      "result": {
      +        "anyOf": [
      +          {
      +            "description": "A Hamiltonian's expectation at the request's params and its exact gradient by each parameter (engine::variational::gradient).",
      +            "properties": {
      +              "call": {
      +                "const": "gradient"
      +              },
      +              "engine": {
      +                "description": "The engine that made the result: the wai-quantum crate's name and version.",
      +                "properties": {
      +                  "name": {
      +                    "const": "wai-quantum"
      +                  },
      +                  "version": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "name",
      +                  "version"
      +                ],
      +                "type": "object"
      +              },
      +              "evaluations": {
      +                "description": "Circuit evaluations (adjoint: the forward run and each gate derivative applied; parameter shift: each shifted run).",
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "gates": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "gradient": {
      +                "additionalProperties": {
      +                  "type": "number"
      +                },
      +                "description": "∂E/∂p for each parameter p, by name.",
      +                "type": "object"
      +              },
      +              "how": {
      +                "type": "string"
      +              },
      +              "method": {
      +                "enum": [
      +                  "adjoint",
      +                  "parameter_shift"
      +                ]
      +              },
      +              "moved_gates": {
      +                "description": "Gates a parameter moves.",
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "parameters": {
      +                "description": "The program's parameters, in the order it declares them.",
      +                "items": {
      +                  "properties": {
      +                    "name": {
      +                      "type": "string"
      +                    },
      +                    "type": {
      +                      "enum": [
      +                        "float",
      +                        "angle",
      +                        "float[64]"
      +                      ]
      +                    }
      +                  },
      +                  "required": [
      +                    "name",
      +                    "type"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "params": {
      +                "additionalProperties": {
      +                  "type": "number"
      +                },
      +                "description": "The point, by name.",
      +                "type": "object"
      +              },
      +              "precision": {
      +                "description": "What the arithmetic is: IEEE-754 double precision, approximate, and an a priori bound on each reported number's rounding (first order in 2^-53, doubled), from the value the same circuit has in exact arithmetic.",
      +                "properties": {
      +                  "arithmetic": {
      +                    "const": "f64"
      +                  },
      +                  "exact": {
      +                    "const": false
      +                  },
      +                  "reading": {
      +                    "type": "string"
      +                  },
      +                  "rounding_bound": {
      +                    "properties": {
      +                      "gradient": {
      +                        "additionalProperties": {
      +                          "minimum": 0,
      +                          "type": "number"
      +                        },
      +                        "description": "Each component's bound, by parameter.",
      +                        "type": "object"
      +                      },
      +                      "value": {
      +                        "minimum": 0,
      +                        "type": "number"
      +                      }
      +                    },
      +                    "required": [
      +                      "value"
      +                    ],
      +                    "type": "object"
      +                  }
      +                },
      +                "required": [
      +                  "arithmetic",
      +                  "exact",
      +                  "rounding_bound",
      +                  "reading"
      +                ],
      +                "type": "object"
      +              },
      +              "qubits": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "receipt": {
      +                "description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks.",
      +                "properties": {
      +                  "alg": {
      +                    "const": "ed25519"
      +                  },
      +                  "canon": {
      +                    "const": "rfc8785",
      +                    "description": "The canonical form the digest is taken over."
      +                  },
      +                  "digest": {
      +                    "description": "The digest signed, 32 bytes in lower-case hex.",
      +                    "maxLength": 64,
      +                    "minLength": 64,
      +                    "pattern": "^[0-9a-f]{64}$",
      +                    "type": "string"
      +                  },
      +                  "key": {
      +                    "description": "The signing key, 32 bytes in lower-case hex.",
      +                    "maxLength": 64,
      +                    "minLength": 64,
      +                    "pattern": "^[0-9a-f]{64}$",
      +                    "type": "string"
      +                  },
      +                  "signature": {
      +                    "description": "The signature, 64 bytes in lower-case hex.",
      +                    "maxLength": 128,
      +                    "minLength": 128,
      +                    "pattern": "^[0-9a-f]{128}$",
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "alg",
      +                  "canon",
      +                  "key",
      +                  "digest",
      +                  "signature"
      +                ],
      +                "title": "wai.quantum.receipt/2",
      +                "type": "object"
      +              },
      +              "schema": {
      +                "const": "wai.quantum.algorithms/1"
      +              },
      +              "terms": {
      +                "description": "The Hamiltonian's Pauli terms.",
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "value": {
      +                "description": "⟨ψ|H|ψ⟩ at the params.",
      +                "type": "number"
      +              }
      +            },
      +            "required": [
      +              "call",
      +              "value",
      +              "gradient",
      +              "params",
      +              "method",
      +              "how",
      +              "evaluations",
      +              "qubits",
      +              "gates",
      +              "moved_gates",
      +              "parameters",
      +              "terms",
      +              "precision"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "description": "An optimisation of a Hamiltonian's expectation over the program's parameters, every step a link of a digest chain from the request (engine::variational::optimize).",
      +            "properties": {
      +              "best": {
      +                "properties": {
      +                  "params": {
      +                    "additionalProperties": {
      +                      "type": "number"
      +                    },
      +                    "type": "object"
      +                  },
      +                  "step": {
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  },
      +                  "value": {
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "step",
      +                  "params",
      +                  "value"
      +                ],
      +                "type": "object"
      +              },
      +              "call": {
      +                "const": "optimize"
      +              },
      +              "chain": {
      +                "description": "The chain's last link.",
      +                "maxLength": 64,
      +                "minLength": 64,
      +                "type": "string"
      +              },
      +              "engine": {
      +                "description": "The engine that made the result: the wai-quantum crate's name and version.",
      +                "properties": {
      +                  "name": {
      +                    "const": "wai-quantum"
      +                  },
      +                  "version": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "name",
      +                  "version"
      +                ],
      +                "type": "object"
      +              },
      +              "evaluations": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "final": {
      +                "properties": {
      +                  "params": {
      +                    "additionalProperties": {
      +                      "type": "number"
      +                    },
      +                    "type": "object"
      +                  },
      +                  "step": {
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  },
      +                  "value": {
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "step",
      +                  "params",
      +                  "value"
      +                ],
      +                "type": "object"
      +              },
      +              "gates": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "note": {
      +                "type": "string"
      +              },
      +              "optimizer": {
      +                "properties": {
      +                  "A": {
      +                    "type": "number"
      +                  },
      +                  "alpha": {
      +                    "type": "number"
      +                  },
      +                  "beta1": {
      +                    "type": "number"
      +                  },
      +                  "beta2": {
      +                    "type": "number"
      +                  },
      +                  "c": {
      +                    "type": "number"
      +                  },
      +                  "epsilon": {
      +                    "type": "number"
      +                  },
      +                  "gamma": {
      +                    "type": "number"
      +                  },
      +                  "gradient": {
      +                    "enum": [
      +                      "adjoint",
      +                      "parameter_shift"
      +                    ]
      +                  },
      +                  "name": {
      +                    "enum": [
      +                      "gradient_descent",
      +                      "adam",
      +                      "spsa"
      +                    ]
      +                  },
      +                  "seed": {
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  },
      +                  "step_size": {
      +                    "type": "number"
      +                  },
      +                  "steps": {
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  }
      +                },
      +                "required": [
      +                  "name",
      +                  "steps",
      +                  "step_size"
      +                ],
      +                "type": "object"
      +              },
      +              "parameters": {
      +                "description": "The program's parameters, in the order it declares them.",
      +                "items": {
      +                  "properties": {
      +                    "name": {
      +                      "type": "string"
      +                    },
      +                    "type": {
      +                      "enum": [
      +                        "float",
      +                        "angle",
      +                        "float[64]"
      +                      ]
      +                    }
      +                  },
      +                  "required": [
      +                    "name",
      +                    "type"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "precision": {
      +                "description": "What the arithmetic is: IEEE-754 double precision, approximate, and an a priori bound on each reported number's rounding (first order in 2^-53, doubled), from the value the same circuit has in exact arithmetic.",
      +                "properties": {
      +                  "arithmetic": {
      +                    "const": "f64"
      +                  },
      +                  "exact": {
      +                    "const": false
      +                  },
      +                  "reading": {
      +                    "type": "string"
      +                  },
      +                  "rounding_bound": {
      +                    "properties": {
      +                      "gradient": {
      +                        "additionalProperties": {
      +                          "minimum": 0,
      +                          "type": "number"
      +                        },
      +                        "description": "Each component's bound, by parameter.",
      +                        "type": "object"
      +                      },
      +                      "value": {
      +                        "minimum": 0,
      +                        "type": "number"
      +                      }
      +                    },
      +                    "required": [
      +                      "value"
      +                    ],
      +                    "type": "object"
      +                  }
      +                },
      +                "required": [
      +                  "arithmetic",
      +                  "exact",
      +                  "rounding_bound",
      +                  "reading"
      +                ],
      +                "type": "object"
      +              },
      +              "qubits": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "receipt": {
      +                "description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks.",
      +                "properties": {
      +                  "alg": {
      +                    "const": "ed25519"
      +                  },
      +                  "canon": {
      +                    "const": "rfc8785",
      +                    "description": "The canonical form the digest is taken over."
      +                  },
      +                  "digest": {
      +                    "description": "The digest signed, 32 bytes in lower-case hex.",
      +                    "maxLength": 64,
      +                    "minLength": 64,
      +                    "pattern": "^[0-9a-f]{64}$",
      +                    "type": "string"
      +                  },
      +                  "key": {
      +                    "description": "The signing key, 32 bytes in lower-case hex.",
      +                    "maxLength": 64,
      +                    "minLength": 64,
      +                    "pattern": "^[0-9a-f]{64}$",
      +                    "type": "string"
      +                  },
      +                  "signature": {
      +                    "description": "The signature, 64 bytes in lower-case hex.",
      +                    "maxLength": 128,
      +                    "minLength": 128,
      +                    "pattern": "^[0-9a-f]{128}$",
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "alg",
      +                  "canon",
      +                  "key",
      +                  "digest",
      +                  "signature"
      +                ],
      +                "title": "wai.quantum.receipt/2",
      +                "type": "object"
      +              },
      +              "schema": {
      +                "const": "wai.quantum.algorithms/1"
      +              },
      +              "start": {
      +                "description": "The chain's first link: BLAKE3 of the domain wai.quantum.trace/1 and the request's canonical text.",
      +                "maxLength": 64,
      +                "minLength": 64,
      +                "type": "string"
      +              },
      +              "steps": {
      +                "items": {
      +                  "properties": {
      +                    "digest": {
      +                      "description": "This step's link of the chain: BLAKE3 of the previous link and the step's canonical text without its digest.",
      +                      "maxLength": 64,
      +                      "minLength": 64,
      +                      "type": "string"
      +                    },
      +                    "estimate": {
      +                      "description": "SPSA: the gradient's estimate.",
      +                      "items": {
      +                        "type": "number"
      +                      },
      +                      "type": "array"
      +                    },
      +                    "gains": {
      +                      "description": "SPSA: the step's gains a_k and c_k.",
      +                      "properties": {
      +                        "a": {
      +                          "type": "number"
      +                        },
      +                        "c": {
      +                          "type": "number"
      +                        }
      +                      },
      +                      "required": [
      +                        "a",
      +                        "c"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    "gradient": {
      +                      "additionalProperties": {
      +                        "type": "number"
      +                      },
      +                      "description": "Gradient descent and Adam: the gradient at the step's params.",
      +                      "type": "object"
      +                    },
      +                    "params": {
      +                      "additionalProperties": {
      +                        "type": "number"
      +                      },
      +                      "type": "object"
      +                    },
      +                    "perturbation": {
      +                      "description": "SPSA: the step's perturbation, from the seeded stream.",
      +                      "items": {
      +                        "enum": [
      +                          1,
      +                          -1
      +                        ]
      +                      },
      +                      "type": "array"
      +                    },
      +                    "step": {
      +                      "minimum": 0,
      +                      "type": "integer"
      +                    },
      +                    "value": {
      +                      "type": "number"
      +                    }
      +                  },
      +                  "required": [
      +                    "step",
      +                    "params",
      +                    "value",
      +                    "digest"
      +                  ],
      +                  "type": "object"
      +                },
      +                "minItems": 2,
      +                "type": "array"
      +              },
      +              "terms": {
      +                "minimum": 0,
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "call",
      +              "optimizer",
      +              "qubits",
      +              "gates",
      +              "parameters",
      +              "terms",
      +              "start",
      +              "steps",
      +              "chain",
      +              "best",
      +              "final",
      +              "evaluations",
      +              "precision"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "description": "The variational eigensolver: an optimisation, and the exact ground energy by diagonalisation beside the energy found (engine::variational::vqe).",
      +            "properties": {
      +              "ansatz": {
      +                "properties": {
      +                  "kind": {
      +                    "const": "hardware_efficient"
      +                  },
      +                  "params": {
      +                    "additionalProperties": {
      +                      "type": "number"
      +                    },
      +                    "type": "object"
      +                  },
      +                  "qasm": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "qasm",
      +                  "params",
      +                  "kind"
      +                ],
      +                "type": "object"
      +              },
      +              "best": {
      +                "properties": {
      +                  "params": {
      +                    "additionalProperties": {
      +                      "type": "number"
      +                    },
      +                    "type": "object"
      +                  },
      +                  "step": {
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  },
      +                  "value": {
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "step",
      +                  "params",
      +                  "value"
      +                ],
      +                "type": "object"
      +              },
      +              "call": {
      +                "const": "vqe"
      +              },
      +              "chain": {
      +                "description": "The chain's last link.",
      +                "maxLength": 64,
      +                "minLength": 64,
      +                "type": "string"
      +              },
      +              "engine": {
      +                "description": "The engine that made the result: the wai-quantum crate's name and version.",
      +                "properties": {
      +                  "name": {
      +                    "const": "wai-quantum"
      +                  },
      +                  "version": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "name",
      +                  "version"
      +                ],
      +                "type": "object"
      +              },
      +              "evaluations": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "final": {
      +                "properties": {
      +                  "params": {
      +                    "additionalProperties": {
      +                      "type": "number"
      +                    },
      +                    "type": "object"
      +                  },
      +                  "step": {
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  },
      +                  "value": {
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "step",
      +                  "params",
      +                  "value"
      +                ],
      +                "type": "object"
      +              },
      +              "gates": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "note": {
      +                "type": "string"
      +              },
      +              "optimizer": {
      +                "properties": {
      +                  "A": {
      +                    "type": "number"
      +                  },
      +                  "alpha": {
      +                    "type": "number"
      +                  },
      +                  "beta1": {
      +                    "type": "number"
      +                  },
      +                  "beta2": {
      +                    "type": "number"
      +                  },
      +                  "c": {
      +                    "type": "number"
      +                  },
      +                  "epsilon": {
      +                    "type": "number"
      +                  },
      +                  "gamma": {
      +                    "type": "number"
      +                  },
      +                  "gradient": {
      +                    "enum": [
      +                      "adjoint",
      +                      "parameter_shift"
      +                    ]
      +                  },
      +                  "name": {
      +                    "enum": [
      +                      "gradient_descent",
      +                      "adam",
      +                      "spsa"
      +                    ]
      +                  },
      +                  "seed": {
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  },
      +                  "step_size": {
      +                    "type": "number"
      +                  },
      +                  "steps": {
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  }
      +                },
      +                "required": [
      +                  "name",
      +                  "steps",
      +                  "step_size"
      +                ],
      +                "type": "object"
      +              },
      +              "parameters": {
      +                "description": "The program's parameters, in the order it declares them.",
      +                "items": {
      +                  "properties": {
      +                    "name": {
      +                      "type": "string"
      +                    },
      +                    "type": {
      +                      "enum": [
      +                        "float",
      +                        "angle",
      +                        "float[64]"
      +                      ]
      +                    }
      +                  },
      +                  "required": [
      +                    "name",
      +                    "type"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "precision": {
      +                "description": "What the arithmetic is: IEEE-754 double precision, approximate, and an a priori bound on each reported number's rounding (first order in 2^-53, doubled), from the value the same circuit has in exact arithmetic.",
      +                "properties": {
      +                  "arithmetic": {
      +                    "const": "f64"
      +                  },
      +                  "exact": {
      +                    "const": false
      +                  },
      +                  "reading": {
      +                    "type": "string"
      +                  },
      +                  "rounding_bound": {
      +                    "properties": {
      +                      "gradient": {
      +                        "additionalProperties": {
      +                          "minimum": 0,
      +                          "type": "number"
      +                        },
      +                        "description": "Each component's bound, by parameter.",
      +                        "type": "object"
      +                      },
      +                      "value": {
      +                        "minimum": 0,
      +                        "type": "number"
      +                      }
      +                    },
      +                    "required": [
      +                      "value"
      +                    ],
      +                    "type": "object"
      +                  }
      +                },
      +                "required": [
      +                  "arithmetic",
      +                  "exact",
      +                  "rounding_bound",
      +                  "reading"
      +                ],
      +                "type": "object"
      +              },
      +              "qubits": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "receipt": {
      +                "description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks.",
      +                "properties": {
      +                  "alg": {
      +                    "const": "ed25519"
      +                  },
      +                  "canon": {
      +                    "const": "rfc8785",
      +                    "description": "The canonical form the digest is taken over."
      +                  },
      +                  "digest": {
      +                    "description": "The digest signed, 32 bytes in lower-case hex.",
      +                    "maxLength": 64,
      +                    "minLength": 64,
      +                    "pattern": "^[0-9a-f]{64}$",
      +                    "type": "string"
      +                  },
      +                  "key": {
      +                    "description": "The signing key, 32 bytes in lower-case hex.",
      +                    "maxLength": 64,
      +                    "minLength": 64,
      +                    "pattern": "^[0-9a-f]{64}$",
      +                    "type": "string"
      +                  },
      +                  "signature": {
      +                    "description": "The signature, 64 bytes in lower-case hex.",
      +                    "maxLength": 128,
      +                    "minLength": 128,
      +                    "pattern": "^[0-9a-f]{128}$",
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "alg",
      +                  "canon",
      +                  "key",
      +                  "digest",
      +                  "signature"
      +                ],
      +                "title": "wai.quantum.receipt/2",
      +                "type": "object"
      +              },
      +              "reference": {
      +                "anyOf": [
      +                  {
      +                    "properties": {
      +                      "first_excited": {
      +                        "anyOf": [
      +                          {
      +                            "type": "number"
      +                          },
      +                          {
      +                            "type": "null"
      +                          }
      +                        ]
      +                      },
      +                      "gap": {
      +                        "description": "The best energy found above the ground energy.",
      +                        "type": "number"
      +                      },
      +                      "ground_energy": {
      +                        "type": "number"
      +                      },
      +                      "how": {
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "ground_energy",
      +                      "how",
      +                      "gap"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  {
      +                    "properties": {
      +                      "unchecked": {
      +                        "type": "string"
      +                      }
      +                    },
      +                    "required": [
      +                      "unchecked"
      +                    ],
      +                    "type": "object"
      +                  }
      +                ]
      +              },
      +              "schema": {
      +                "const": "wai.quantum.algorithms/1"
      +              },
      +              "start": {
      +                "description": "The chain's first link: BLAKE3 of the domain wai.quantum.trace/1 and the request's canonical text.",
      +                "maxLength": 64,
      +                "minLength": 64,
      +                "type": "string"
      +              },
      +              "steps": {
      +                "items": {
      +                  "properties": {
      +                    "digest": {
      +                      "description": "This step's link of the chain: BLAKE3 of the previous link and the step's canonical text without its digest.",
      +                      "maxLength": 64,
      +                      "minLength": 64,
      +                      "type": "string"
      +                    },
      +                    "estimate": {
      +                      "description": "SPSA: the gradient's estimate.",
      +                      "items": {
      +                        "type": "number"
      +                      },
      +                      "type": "array"
      +                    },
      +                    "gains": {
      +                      "description": "SPSA: the step's gains a_k and c_k.",
      +                      "properties": {
      +                        "a": {
      +                          "type": "number"
      +                        },
      +                        "c": {
      +                          "type": "number"
      +                        }
      +                      },
      +                      "required": [
      +                        "a",
      +                        "c"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    "gradient": {
      +                      "additionalProperties": {
      +                        "type": "number"
      +                      },
      +                      "description": "Gradient descent and Adam: the gradient at the step's params.",
      +                      "type": "object"
      +                    },
      +                    "params": {
      +                      "additionalProperties": {
      +                        "type": "number"
      +                      },
      +                      "type": "object"
      +                    },
      +                    "perturbation": {
      +                      "description": "SPSA: the step's perturbation, from the seeded stream.",
      +                      "items": {
      +                        "enum": [
      +                          1,
      +                          -1
      +                        ]
      +                      },
      +                      "type": "array"
      +                    },
      +                    "step": {
      +                      "minimum": 0,
      +                      "type": "integer"
      +                    },
      +                    "value": {
      +                      "type": "number"
      +                    }
      +                  },
      +                  "required": [
      +                    "step",
      +                    "params",
      +                    "value",
      +                    "digest"
      +                  ],
      +                  "type": "object"
      +                },
      +                "minItems": 2,
      +                "type": "array"
      +              },
      +              "terms": {
      +                "minimum": 0,
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "call",
      +              "optimizer",
      +              "qubits",
      +              "gates",
      +              "parameters",
      +              "terms",
      +              "start",
      +              "steps",
      +              "chain",
      +              "best",
      +              "final",
      +              "evaluations",
      +              "precision",
      +              "reference"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "description": "Max-Cut by QAOA: the program and Hamiltonian built from the graph, optimised, and the cut set beside the maximum cut by brute force (engine::variational::qaoa).",
      +            "properties": {
      +              "best": {
      +                "properties": {
      +                  "params": {
      +                    "additionalProperties": {
      +                      "type": "number"
      +                    },
      +                    "type": "object"
      +                  },
      +                  "step": {
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  },
      +                  "value": {
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "step",
      +                  "params",
      +                  "value"
      +                ],
      +                "type": "object"
      +              },
      +              "call": {
      +                "const": "qaoa"
      +              },
      +              "chain": {
      +                "description": "The chain's last link.",
      +                "maxLength": 64,
      +                "minLength": 64,
      +                "type": "string"
      +              },
      +              "engine": {
      +                "description": "The engine that made the result: the wai-quantum crate's name and version.",
      +                "properties": {
      +                  "name": {
      +                    "const": "wai-quantum"
      +                  },
      +                  "version": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "name",
      +                  "version"
      +                ],
      +                "type": "object"
      +              },
      +              "evaluations": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "final": {
      +                "properties": {
      +                  "params": {
      +                    "additionalProperties": {
      +                      "type": "number"
      +                    },
      +                    "type": "object"
      +                  },
      +                  "step": {
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  },
      +                  "value": {
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "step",
      +                  "params",
      +                  "value"
      +                ],
      +                "type": "object"
      +              },
      +              "gates": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "graph": {
      +                "properties": {
      +                  "edges": {
      +                    "items": {
      +                      "maxItems": 3,
      +                      "minItems": 3,
      +                      "type": "array"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "nodes": {
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  }
      +                },
      +                "required": [
      +                  "nodes",
      +                  "edges"
      +                ],
      +                "type": "object"
      +              },
      +              "hamiltonian": {
      +                "type": "array"
      +              },
      +              "layers": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "maxcut": {
      +                "properties": {
      +                  "bits": {
      +                    "type": "string"
      +                  },
      +                  "expected_cut": {
      +                    "type": "number"
      +                  },
      +                  "how": {
      +                    "type": "string"
      +                  },
      +                  "max_cut": {
      +                    "type": "number"
      +                  },
      +                  "most_likely": {
      +                    "properties": {
      +                      "bits": {
      +                        "type": "string"
      +                      },
      +                      "cut": {
      +                        "type": "number"
      +                      },
      +                      "optimal": {
      +                        "type": "boolean"
      +                      },
      +                      "probability": {
      +                        "type": "number"
      +                      }
      +                    },
      +                    "required": [
      +                      "bits",
      +                      "probability",
      +                      "cut",
      +                      "optimal"
      +                    ],
      +                    "type": "object"
      +                  },
      +                  "optimal": {
      +                    "items": {
      +                      "type": "string"
      +                    },
      +                    "type": "array"
      +                  },
      +                  "optimal_count": {
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  },
      +                  "p_optimal": {
      +                    "type": "number"
      +                  },
      +                  "ratio": {
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [
      +                  "max_cut",
      +                  "optimal",
      +                  "optimal_count",
      +                  "how",
      +                  "expected_cut",
      +                  "ratio",
      +                  "most_likely",
      +                  "p_optimal",
      +                  "bits"
      +                ],
      +                "type": "object"
      +              },
      +              "note": {
      +                "type": "string"
      +              },
      +              "optimizer": {
      +                "properties": {
      +                  "A": {
      +                    "type": "number"
      +                  },
      +                  "alpha": {
      +                    "type": "number"
      +                  },
      +                  "beta1": {
      +                    "type": "number"
      +                  },
      +                  "beta2": {
      +                    "type": "number"
      +                  },
      +                  "c": {
      +                    "type": "number"
      +                  },
      +                  "epsilon": {
      +                    "type": "number"
      +                  },
      +                  "gamma": {
      +                    "type": "number"
      +                  },
      +                  "gradient": {
      +                    "enum": [
      +                      "adjoint",
      +                      "parameter_shift"
      +                    ]
      +                  },
      +                  "name": {
      +                    "enum": [
      +                      "gradient_descent",
      +                      "adam",
      +                      "spsa"
      +                    ]
      +                  },
      +                  "seed": {
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  },
      +                  "step_size": {
      +                    "type": "number"
      +                  },
      +                  "steps": {
      +                    "minimum": 0,
      +                    "type": "integer"
      +                  }
      +                },
      +                "required": [
      +                  "name",
      +                  "steps",
      +                  "step_size"
      +                ],
      +                "type": "object"
      +              },
      +              "parameters": {
      +                "description": "The program's parameters, in the order it declares them.",
      +                "items": {
      +                  "properties": {
      +                    "name": {
      +                      "type": "string"
      +                    },
      +                    "type": {
      +                      "enum": [
      +                        "float",
      +                        "angle",
      +                        "float[64]"
      +                      ]
      +                    }
      +                  },
      +                  "required": [
      +                    "name",
      +                    "type"
      +                  ],
      +                  "type": "object"
      +                },
      +                "type": "array"
      +              },
      +              "precision": {
      +                "description": "What the arithmetic is: IEEE-754 double precision, approximate, and an a priori bound on each reported number's rounding (first order in 2^-53, doubled), from the value the same circuit has in exact arithmetic.",
      +                "properties": {
      +                  "arithmetic": {
      +                    "const": "f64"
      +                  },
      +                  "exact": {
      +                    "const": false
      +                  },
      +                  "reading": {
      +                    "type": "string"
      +                  },
      +                  "rounding_bound": {
      +                    "properties": {
      +                      "gradient": {
      +                        "additionalProperties": {
      +                          "minimum": 0,
      +                          "type": "number"
      +                        },
      +                        "description": "Each component's bound, by parameter.",
      +                        "type": "object"
      +                      },
      +                      "value": {
      +                        "minimum": 0,
      +                        "type": "number"
      +                      }
      +                    },
      +                    "required": [
      +                      "value"
      +                    ],
      +                    "type": "object"
      +                  }
      +                },
      +                "required": [
      +                  "arithmetic",
      +                  "exact",
      +                  "rounding_bound",
      +                  "reading"
      +                ],
      +                "type": "object"
      +              },
      +              "program": {
      +                "type": "string"
      +              },
      +              "qubits": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "receipt": {
      +                "description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks.",
      +                "properties": {
      +                  "alg": {
      +                    "const": "ed25519"
      +                  },
      +                  "canon": {
      +                    "const": "rfc8785",
      +                    "description": "The canonical form the digest is taken over."
      +                  },
      +                  "digest": {
      +                    "description": "The digest signed, 32 bytes in lower-case hex.",
      +                    "maxLength": 64,
      +                    "minLength": 64,
      +                    "pattern": "^[0-9a-f]{64}$",
      +                    "type": "string"
      +                  },
      +                  "key": {
      +                    "description": "The signing key, 32 bytes in lower-case hex.",
      +                    "maxLength": 64,
      +                    "minLength": 64,
      +                    "pattern": "^[0-9a-f]{64}$",
      +                    "type": "string"
      +                  },
      +                  "signature": {
      +                    "description": "The signature, 64 bytes in lower-case hex.",
      +                    "maxLength": 128,
      +                    "minLength": 128,
      +                    "pattern": "^[0-9a-f]{128}$",
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "alg",
      +                  "canon",
      +                  "key",
      +                  "digest",
      +                  "signature"
      +                ],
      +                "title": "wai.quantum.receipt/2",
      +                "type": "object"
      +              },
      +              "schema": {
      +                "const": "wai.quantum.algorithms/1"
      +              },
      +              "start": {
      +                "description": "The chain's first link: BLAKE3 of the domain wai.quantum.trace/1 and the request's canonical text.",
      +                "maxLength": 64,
      +                "minLength": 64,
      +                "type": "string"
      +              },
      +              "steps": {
      +                "items": {
      +                  "properties": {
      +                    "digest": {
      +                      "description": "This step's link of the chain: BLAKE3 of the previous link and the step's canonical text without its digest.",
      +                      "maxLength": 64,
      +                      "minLength": 64,
      +                      "type": "string"
      +                    },
      +                    "estimate": {
      +                      "description": "SPSA: the gradient's estimate.",
      +                      "items": {
      +                        "type": "number"
      +                      },
      +                      "type": "array"
      +                    },
      +                    "gains": {
      +                      "description": "SPSA: the step's gains a_k and c_k.",
      +                      "properties": {
      +                        "a": {
      +                          "type": "number"
      +                        },
      +                        "c": {
      +                          "type": "number"
      +                        }
      +                      },
      +                      "required": [
      +                        "a",
      +                        "c"
      +                      ],
      +                      "type": "object"
      +                    },
      +                    "gradient": {
      +                      "additionalProperties": {
      +                        "type": "number"
      +                      },
      +                      "description": "Gradient descent and Adam: the gradient at the step's params.",
      +                      "type": "object"
      +                    },
      +                    "params": {
      +                      "additionalProperties": {
      +                        "type": "number"
      +                      },
      +                      "type": "object"
      +                    },
      +                    "perturbation": {
      +                      "description": "SPSA: the step's perturbation, from the seeded stream.",
      +                      "items": {
      +                        "enum": [
      +                          1,
      +                          -1
      +                        ]
      +                      },
      +                      "type": "array"
      +                    },
      +                    "step": {
      +                      "minimum": 0,
      +                      "type": "integer"
      +                    },
      +                    "value": {
      +                      "type": "number"
      +                    }
      +                  },
      +                  "required": [
      +                    "step",
      +                    "params",
      +                    "value",
      +                    "digest"
      +                  ],
      +                  "type": "object"
      +                },
      +                "minItems": 2,
      +                "type": "array"
      +              },
      +              "terms": {
      +                "minimum": 0,
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "call",
      +              "optimizer",
      +              "qubits",
      +              "gates",
      +              "parameters",
      +              "terms",
      +              "start",
      +              "steps",
      +              "chain",
      +              "best",
      +              "final",
      +              "evaluations",
      +              "precision",
      +              "graph",
      +              "layers",
      +              "program",
      +              "hamiltonian",
      +              "maxcut"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "description": "A program an algorithm builder writes (engine::algorithms): its text, how to read it, what it gives, and the equivalence ladder's verdict against a reference built from the definitions.",
      +            "properties": {
      +              "algorithm": {
      +                "enum": [
      +                  "qpe",
      +                  "amplitude_estimation",
      +                  "adder",
      +                  "qsvt"
      +                ]
      +              },
      +              "call": {
      +                "const": "build"
      +              },
      +              "check": {
      +                "properties": {
      +                  "global_phase": {
      +                    "type": "number"
      +                  },
      +                  "how": {
      +                    "enum": [
      +                      "exact",
      +                      "random",
      +                      "none"
      +                    ]
      +                  },
      +                  "reference": {
      +                    "type": "string"
      +                  },
      +                  "verdict": {
      +                    "enum": [
      +                      "equivalent",
      +                      "different",
      +                      "unchecked"
      +                    ]
      +                  },
      +                  "why": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "verdict",
      +                  "how",
      +                  "why"
      +                ],
      +                "type": "object"
      +              },
      +              "engine": {
      +                "description": "The engine that made the result: the wai-quantum crate's name and version.",
      +                "properties": {
      +                  "name": {
      +                    "const": "wai-quantum"
      +                  },
      +                  "version": {
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "name",
      +                  "version"
      +                ],
      +                "type": "object"
      +              },
      +              "expected": {
      +                "description": "What it gives: a distribution's likeliest outcomes, a sum, or a polynomial's value.",
      +                "type": "object"
      +              },
      +              "gates": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "qasm": {
      +                "type": "string"
      +              },
      +              "qubits": {
      +                "minimum": 0,
      +                "type": "integer"
      +              },
      +              "reads": {
      +                "description": "How to read the program's result.",
      +                "type": "object"
      +              },
      +              "receipt": {
      +                "description": "A result's receipt: an Ed25519 signature, by the key it names, over digest = BLAKE3(\"wai:quantum-service-receipt\\x02\" ‖ len ‖ request ‖ len ‖ result), each of request and result in its RFC 8785 canonical text (the result without its receipt member), each length 8 bytes big-endian. Whatever members the request and the result hold are sealed, the result's engine and schema among them. The first receipts (no canon member, $defs/first) sealed their writer's compact text under the domain ending \\x01; they still verify. wai/extensions/quantum-providers.md section 8.2 states the seal in full, and section 8.4 what a verifier checks.",
      +                "properties": {
      +                  "alg": {
      +                    "const": "ed25519"
      +                  },
      +                  "canon": {
      +                    "const": "rfc8785",
      +                    "description": "The canonical form the digest is taken over."
      +                  },
      +                  "digest": {
      +                    "description": "The digest signed, 32 bytes in lower-case hex.",
      +                    "maxLength": 64,
      +                    "minLength": 64,
      +                    "pattern": "^[0-9a-f]{64}$",
      +                    "type": "string"
      +                  },
      +                  "key": {
      +                    "description": "The signing key, 32 bytes in lower-case hex.",
      +                    "maxLength": 64,
      +                    "minLength": 64,
      +                    "pattern": "^[0-9a-f]{64}$",
      +                    "type": "string"
      +                  },
      +                  "signature": {
      +                    "description": "The signature, 64 bytes in lower-case hex.",
      +                    "maxLength": 128,
      +                    "minLength": 128,
      +                    "pattern": "^[0-9a-f]{128}$",
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "alg",
      +                  "canon",
      +                  "key",
      +                  "digest",
      +                  "signature"
      +                ],
      +                "title": "wai.quantum.receipt/2",
      +                "type": "object"
      +              },
      +              "schema": {
      +                "const": "wai.quantum.algorithms/1"
      +              }
      +            },
      +            "required": [
      +              "call",
      +              "algorithm",
      +              "qasm",
      +              "qubits",
      +              "gates",
      +              "reads",
      +              "expected",
      +              "check"
      +            ],
      +            "type": "object"
      +          }
      +        ],
      +        "description": "A gradient, an optimisation, a VQE, a QAOA run or a built program, with its receipt."
      +      }
      +    },
      +    "required": [
      +      "request",
      +      "result"
      +    ],
      +    "title": "wai.quantum.algorithms/1",
      +    "type": "object"
      +  },
      +  {
      +    "description": "A refusal as data: the message, every code in it (the last is the code), its outcome and meaning as the code's table gives them. A host that refuses for its own reasons gives the error alone.",
      +    "properties": {
      +      "code": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "codes": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "error": {
      +        "type": "string"
      +      },
      +      "meaning": {
      +        "type": "string"
      +      },
      +      "message": {
      +        "type": "string"
      +      },
      +      "outcome": {
      +        "enum": [
      +          "refused",
      +          "retry",
      +          "failed",
      +          "lowered",
      +          "carried",
      +          "preserved",
      +          "warned",
      +          "dropped",
      +          "defaulted"
      +        ]
      +      }
      +    },
      +    "required": [
      +      "error"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Added

TDQS

A3.9/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnly/idempotent annotations, the description discloses determinism ('the same request gives the same bytes on every platform'), the 2000-step ceiling, that every step's parameters, value and gradient/perturbation are listed, and that results are sealed with the service's key into a receipt that can be re-run for verification. It also warns about the local-versus-global minimum limitation, which is exactly the kind of expectation-setting an agent cannot get from structured fields. Nothing here contradicts the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The objective is front-loaded in the first clause and the guarantee/caveat ordering (what it does, how it is reproducible, what it does not prove) is logical. The opening sentence is a dense run-on packing determinism, step listing, digest chaining and platform equivalence into one breath. Nothing is truly wasted, but tightening would improve scanability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter tool with nested optimizer objects and an output schema, the description covers the important non-schema facts: determinism, receipt binding, verification path and the local-minimum caveat. It leaves optimizer selection guidance implicit and says nothing about failure modes beyond the schema's error codes. Given annotations and the output schema carry safety and return shape, this is nearly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the schema already documents every parameter, including optimizer variants, gradient methods, step sizes and Hamiltonian term formats. The description largely restates those facts (optimizer names, step cap, seeded SPSA) rather than adding new meaning. Its one genuine addition is framing the objective so the agent understands how params and hamiltonian combine, which is modest value over the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a precise verb-and-object: 'Minimise E = ⟨ψ|H|ψ⟩ over a program's parameters', which tells an agent exactly what computation happens. It does not distinguish this from plausible siblings such as gradient_qasm or vqe_ground_state, so the agent must infer the boundary. The mention of verify_quantum_result also names a tool not present in the sibling list (verify_quantum_receipt is listed), which slightly muddies routing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: an agent can infer it is used when a Hamiltonian expectation must be minimised, and the closing caveat that a found minimum is path-local rather than global is genuinely useful decision context. There is no explicit when-to-use or when-not-to-use relative to alternatives like gradient_qasm or vqe_ground_state. The description says nothing about prerequisites such as parameter binding failures (J050) beyond what the schema already carries.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources