bloqade.task.DeviceTaskExpectMixin
← Module overview
class
method
source
classDeviceTaskExpectMixin¶source
bloqade.task.DeviceTaskExpectMixin
Bases: AbstractTask
class DeviceTaskExpectMixinAttributes
| Name | Type | Default | Description |
|---|---|---|---|
ObsType | — | TypeVar('ObsType') |
methodexpect¶source
bloqade.task.DeviceTaskExpectMixin.expect
Signature
def expect(observable: ir.Method[[RetType], ObsType], shots: int) -> ObsTypeReturns the expectation value of the given observable after running the task.
Parameters
| Name | Type | Description |
|---|---|---|
observable | ir.Method[[RetType], ObsType] | |
shots | int |
Returns
ObsType