Library / Observable Ledger / Observable Ledger API
Observable Ledger API
Record fields and calls.
Record fields
| Field | Exact | Sample |
|---|---|---|
| method | exact | sample |
| source | state-register | bond-contract | noise-channel | same |
| observable | canonical Pauli sum | same |
| values or mean | contraction | sample mean |
| tolerance | present | absent |
| shots, seed, standard_error, bits | absent | present |
| discarded | present only for bond-contract | same rule |
| map | present only for noise-channel | same rule |
| workers | present when the source is a Device Span | same rule |
Calls
| Call | Faults |
|---|---|
| expect(observables) | Syntax, support, empty, hermiticity of a non-real coefficient |
| sample(observable, shots, seed) | Seed, empty, support |
| Ledger.agree(left, right) | Mismatch when method, source, or tolerance band disagrees |
A change of measurement basis for a sample is a unitary on a copy of the state, then a Z sample, then the copy is dropped. The basis-change script is stored on the record. Exact expect of an X or Y string does not need that copy.