qiskit.circuit.QuantumCircuit.power¶
- QuantumCircuit.power(power, matrix_power=False)[source]¶
Raise this circuit to the power of
power
.If
power
is a positive integer andmatrix_power
isFalse
, this implementation defaults to callingrepeat
. Otherwise, if the circuit is unitary, the matrix is computed to calculate the matrix power.- প্যারামিটার
power (float) -- The power to raise this circuit to.
matrix_power (bool) -- If True, the circuit is converted to a matrix and then the matrix power is computed. If False, and
power
is a positive integer, the implementation defaults torepeat
.
- রেইজেস
CircuitError -- If the circuit needs to be converted to a gate but it is not unitary.
- রিটার্নস
A circuit implementing this circuit raised to the power of
power
.- রিটার্ন টাইপ