ScalarOp.power

ScalarOp.power(n)[source]

Return the power of the ScalarOp.

Parameters

n (Number) – the exponent for the scalar op.

Returns

the coeff ** n ScalarOp.

Return type

ScalarOp

Raises

QiskitError – if the input and output dimensions of the operator are not equal, or the power is not a positive integer.