Fidelity
- class pulser.backend.Fidelity(state, *, evaluation_times=None, tag_suffix=None)
Bases:
Observable
Stores the fidelity with a pure state at the evaluation times.
The fidelity uses the overlap between the given state and the state of the system at each evaluation time. For pure states, this corresponds to
|<ψ|φ(t)>|^2
for the given state|ψ>
and the state|φ(t)>
obtained by time evolution.- Parameters:
state (
State
) – The state|ψ>
. Note that this must be of an appropriate type for the backend.evaluation_times (
Sequence
[float
] |None
, default:None
) – The relative times at which to compute the fidelity. 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
- apply(*, state, **kwargs)
Calculates the observable to store in the Results.
- Return type:
Any
- 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.