Observable
- class pulser.backend.Observable(*, evaluation_times=None, tag_suffix=None)
Bases:
Callback
The Observable abstract base class.
- Parameters:
evaluation_times (
Sequence
[float
] |None
, default:None
) – The times at which to add a result to Results. If left as None, uses thedefault_evaluation_times
of the backend’sEmulationConfig
.tag_suffix (
str
|None
, default:None
) – An optional suffix to append to the tag. Needed if multiple instances of the same observable are given to the same EmulationConfig.
Attributes
Label for the observable, used to index the Results object.
A universal unique identifier for this instance.
Methods
Calculates the observable to store in the Results.
Signatures
- abstract apply(*, config, state, hamiltonian)
Calculates the observable to store in the Results.
- Parameters:
config (
EmulationConfig
) – The config object passed to the backend.state (
State
) – The current state.hamiltonian (
Operator
) – The Hamiltonian at this time.
- Return type:
Any
- Returns:
The result to put in Results.
- property tag: str
Label for the observable, used to index the Results object.
Within a Results instance, all computed observables must have different tags.
- Returns:
The tag of the observable.
- property uuid: UUID
A universal unique identifier for this instance.