Adding qudit gates
orodrigoaraizabravo opened this issue · 2 comments
I am working on general VQE problems with qudits. I have code that produces the Pauli operators sigmax(s), etc for spin s particles. I'd like to implement rotations Rotation(sigmax(s), theta) on the qudits, but the function Rotation in Yao relies on the Pauli operator being reflexive which is only true for spin-1/2. What's the best way to implement more general rotations? Also, in the future I'd like to implement gates of the type exp(-imthetaP_iP_j) where P_i, P_j are Pauli operators for spin-s particles. Can we also get support for that?
relies on the Pauli operator being reflexive which is only true for spin-1/2
Rotation gate requires your generator to be reflexive, otherwise the result might be incorrect. For 3-level systems, you can still defined a reflexive gate. But here maybe you want to create a rotation gate for subspace, then use time evolution instead would be a solution. They are only different by a factor of 2.
julia> mat(time_evolve(X, 0.5)) ≈ mat(rot(X, 1.0))
true
I would suppose the above comment resolves the issue?