qiskit.circuit.QuantumCircuit.power¶
- QuantumCircuit.power(power, matrix_power=False)[código fonte]¶
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.- Parâmetros
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
.
- Levanta
CircuitError – If the circuit needs to be converted to a gate but it is not unitary.
- Retorno
A circuit implementing this circuit raised to the power of
power
.- Tipo de retorno