Why are the gates a and b in this code not the same?
a = UGate(0,0,0.9*np.pi).power(2)
b = UGate(0,0,0.9*np.pi).repeat(2)
I thought that unitary gates function like matrices and that having them repeated after each other means the same as having them to an exponent.
Turns out the power function is computationally much more expensive and returns very strange results as seen in this decomposed image of the two gates i constructed with this code:
qc = qk.QuantumCircuit(2)
qc.barrier(label="power")
qc.append(a, [0])
qc.barrier(label="repeat")
qc.append(b, [1])
display(qc.decompose().decompose().draw("mpl"))`
Why is there a y-component to gate a on qubit 0?