WrappedScalarGradientCallback#

class cuquantum.bindings.cudensitymat.WrappedScalarGradientCallback(
callback: ScalarGradientCallbackType,
device: CallbackDevice,
direction: DifferentiationDir = DifferentiationDir.BACKWARD,
)[source]#

Wrapped scalar gradient callback Python extension type.

Methods

__init__(
callback: ScalarGradientCallbackType,
device: CallbackDevice,
direction: DifferentiationDir = DifferentiationDir.BACKWARD,
)#

Create a wrapped scalar gradient callback.

Parameters:
  • callback – The scalar gradient callback function.

  • device – The device on which the callback is invoked.

  • direction – The direction of differentiation.

Attributes

callback#

object

Type:

callback