qml.operation.operation_derivative¶
- operation_derivative(operation)[source]¶
Calculate the derivative of an operation.
For an operation eiˆHϕt, this function returns the matrix representation in the standard basis of its derivative with respect to t, i.e.,
deiˆHϕtdt=iϕˆHeiˆHϕt,where ϕ is a real constant.
- Parameters
operation (Operation) – The operation to be differentiated.
- Returns
the derivative of the operation as a matrix in the standard basis
- Return type
array
- Raises
ValueError – if the operation does not have a generator or is not composed of a single trainable parameter