qiskit.opflow.gradients.NaturalGradient.convert¶
- NaturalGradient.convert(operator, params=None)[소스]¶
- 매개변수
operator (OperatorBase) – The operator we are taking the gradient of.
params (Optional[Union[ParameterVector, ParameterExpression, List[ParameterExpression]]]) – The parameters we are taking the gradient with respect to. If not explicitly passed, they are inferred from the operator and sorted by name.
- 반환
An operator whose evaluation yields the NaturalGradient.
- 예외 발생
TypeError – If
operator
does not represent an expectation value or the quantum state is notCircuitStateFn
.ValueError – If
params
contains a parameter not present inoperator
.ValueError – If
operator
is not parameterized.
- 반환 형식