Learn a detector error model's rates from detection events
qec_learnLearn every mechanism's rate of a detector error model from detection events alone; observable flips are never read. The model's structure is bb ({code, cycles, p, basis}: a bivariate-bicycle memory at circuit level), memory ({distance, rounds, p}: the rotated surface-code memory experiment), circuit (the circuit text) or model (detector error model text). The events are records (each shot's fired detectors) or shots sampled with seed, from the circuit (source circuit, the default) or from the model itself, every mechanism independent at its rate (source model). Mechanisms that light the same detectors are one class, and only their combined rate is seen. Each class's θ = −ln(1 − 2p) is inverted from the logarithms of the shots' parity means on its detectors and one detector of each class that contains it, with its standard error by the delta method; a class whose detectors and separators exceed max_support (default 16) keeps its given rate and says why. against_given scores the estimates against the model's own rates, an accuracy only when the events were drawn from that model; rates: false leaves the list of classes out. Sealed with the service's key. Quote each rate with its standard error.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "qec_learn"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bb | No | A bivariate-bicycle memory at circuit level: the code (bb:72 to bb:288, gross), noisy cycles, the uniform circuit-level rate and the basis. | |
| seed | No | The sampling seed (default 1). | |
| model | No | A detector error model in its text: the structure, and the rates the estimates are scored against. | |
| rates | No | Give every class's rate (default true), or only the summary. | |
| shots | No | Sample this many shots instead of giving records. | |
| memory | No | The rotated surface-code memory experiment at circuit level. | |
| source | No | Sample from the circuit (the default) or from the model, every mechanism independent at its rate. | |
| circuit | No | A noisy Clifford circuit in the circuit text. | |
| records | No | Detection records: each shot's fired detectors (a detector named twice in a shot cancels). | |
| max_support | No | The most detectors one class's estimate reads (default 16). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||