Run a qudit job
run_quditRun a qudit job (wai.quantum.qudit/1, quantum-sim.md §9): a register of qudits of dimension 2, 3, 4 or 6, a program of shift, clock, fourier, csum and phase gates run on it from |0…0⟩ in whole numbers at 2^-30, and the register measured with a seed. The answer gives the counts keyed by the qudits' digits (highest qudit first), the amplitudes asked for as integers, the state's BLAKE3 and norm, the digest of the constants its dimension reads, the work, and the accuracy: bit-exact, the same integers on every host, with a bound on the state's distance from the ideal and on the outcomes' total variation. Sealed with the service's key; verify_quantum_receipt checks the seal, and anyone can run the request again for the same bits. A request past a bound is refused before anything runs (J090, J091, J092).
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": {
"d": "<d>",
"qudits": "<qudits>",
"gates": "<gates>"
},
"name": "run_qudit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| d | Yes | The register's dimension, the levels of each qudit: 2, 3, 4 or 6, the dimensions whose roots of unity the engine holds exactly or to the nearest 2^-30 (quantum-sim.md §9). | |
| seed | No | The seed the shots are drawn with (default 1). | |
| gates | Yes | The program, in order, from |0…0⟩: shift (X^power), clock (Z^power), fourier (F^power, power 0 to 3), csum (CSUM^power, qudits the control then the target), phase (level j takes ω^powers[j]). A power is below d (below 4 for fourier) and 1 when it is not given. | |
| shots | No | Shots to draw (default 1024). | |
| intent | No | What the counts must do, checked by the engine and sealed with them as the result's verdict (wai.quantum.verdict/1): one intent or a list, each of the counts: {"outcomes": ["00", "11"]} (the outcomes the samples may be), {"conserves": {"weight": 2}} or {"parity": 0} (the sum of an outcome's digits, or that sum modulo d), or {"counts": {"00": 0.5, "11": 0.5}, "test": "chi_squared", "alpha": 0.01} (the samples held to a distribution, by a test at a level or within a "tolerance" in total variation distance). Each is evidence about the samples returned, never proof. | |
| qudits | Yes | How many qudits: d^qudits amplitudes, at most 2^24 (24 qubits, 15 qutrits, 12 ququarts, 9 of six levels). | |
| amplitudes | No | Amplitudes to give, each as the qudits' digits with the highest qudit first: the integers they are at 2^-30. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||