Skip to content
Pasqal Documentation

EnergySecondMoment

class pulser.backend.EnergySecondMoment(*, evaluation_times=None, tag_suffix=None)

Bases: Observable

Stores the expectation value of H(t)^2 at the evaluation times.

Useful for computing the variance when averaging over many executions of the program.

Parameters:
  • evaluation_times (Sequence[float] | None, default: None) – The relative times at which to compute the variance. If left as None, uses the default_evaluation_times of the backend’s EmulationConfig.

  • 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

tag

Label for the observable, used to index the Results object.

uuid

A universal unique identifier for this instance.

Methods

apply

Calculates the observable to store in the Results.

Signatures

apply(*, state, hamiltonian, **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.