Skip to content

Results are limited to the current section: Pulser

Product news

Occupation

class pulser.backend.Occupation(*, evaluation_times=None, one_state=None, tag_suffix=None, default_aggregation_method=AggregationMethod.MEAN)

Bases: Observable

Stores the occupation number of an eigenstate on each qudit.

For every qudit i, calculates <φ(t)|n_i|φ(t)>, where n_i = |one_state><one_state|.

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

  • one_state (Literal['u', 'd', 'r', 'g', 'h', 'x'] | Literal['0', '1'] | None, default: None) – The eigenstate to measure the population of. Can be left undefined if the state’s eigenstates form a known eigenbasis with a defined “one state”.

  • 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.

  • default_aggregation_method (AggregationMethod, default: <AggregationMethod.MEAN: 2>) – How to combine the values of this observable from multiple results.

Attributes

default_aggregation_method

How the values from multiple results are combined.

tag

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

uuid

A universal unique identifier for this instance.

evaluation_times

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:

list

property default_aggregation_method: AggregationMethod

How the values from multiple results are combined.

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.