Operator.power
does not handle non-unitary inputs correctly
#13307
Labels
bug
Something isn't working
mod: quantum info
Related to the Quantum Info module (States & Operators)
Environment
What is happening?
The way
Operator.power
works, it's strongly assuming that the internal matrix is unitary, because it's assuming that it can calculate fractional matrix powers by taking the Schur decomposition taking the matrix power of the Schur form then applying the unitary transformation (ok so far), except it assumes that the matrix power of the Schur form is the power of its diagonal. The Schur form is upper-triangular, but not necessarily diagonal (roughly, I think it's diagonal in the case that the input is a scaled unitary). So ourOperator.power
code fails for non-unitary operators.How can we reproduce the issue?
What should happen?
The two should give (approximately) equal results (though see #13305 for branch-cut problems).
Any suggestions?
The ability to do fractional matrix powers of
Operator
is relatively recent (#11534), and it seems to have pulled the code fromGate.power
, which was empowered to make that assumption.We probably should just use
scipy.linalg.fractional_matrix_power
forOperator.power
, and specialiseGate.power
to use a more explicit eigenvector/eigenvalue form, since it's allowed to assume that its input was unitary.The text was updated successfully, but these errors were encountered: