Overview¶
A problem is a plain, JSON-safe description of a computational task — never an execution and never an algorithm. Problems feed Algorithms, which translate them into circuits and run them.
The problem contract¶
Every problem subclasses Problem and provides:
validate() -> list[str]— human-readable diagnostics (empty list = valid). Never raises.to_dict()/from_dict()andto_json()/from_json()— JSON-safe serialization.type/namemetadata.
The five built-ins¶
Problem |
Generalization |
|---|---|
|
Obtain samples |
|
Minimize a binary-objective function, in QUBO or spin-Ising view. Payload: QUBO/Ising coefficients. |
|
The spectrum of a Hermitian operator.
Payload: an |
|
Like HamiltonianProblem, but requests the lowest |
|
Find marked items in a |
Design notes¶
Positional-first payloads:
SamplingProblem(circuit),HamiltonianProblem(H),EigenvalueProblem(H, k=2)— the payload is the first argument.Hamiltonian-backed problems serialize through
hamiltonian_to_dict(labeled Pauli terms with complex coefficients or an explicit matrix).Problems are the input contract of the SDK; results are never a problem.