Skip to content

bloqade.task.DeviceTaskExpectMixin

← Module overview

classDeviceTaskExpectMixinsource

bloqade.task.DeviceTaskExpectMixin

Bases: AbstractTask

class DeviceTaskExpectMixin

Attributes

NameTypeDefaultDescription
ObsType—TypeVar('ObsType')

methodexpectsource

bloqade.task.DeviceTaskExpectMixin.expect

Signature
def expect(observable: ir.Method[[RetType], ObsType], shots: int) -> ObsType

Returns the expectation value of the given observable after running the task.

Parameters

NameTypeDescription
observableir.Method[[RetType], ObsType]
shotsint

Returns

ObsType

source