I have a qutip tensor as follows:
psi = constants*tensor(fock(N,0),fock(N,1),fock(N,2))
I need a way to swap the positions of the third state with the second state such that the structure becomes:
psi = (some operation on psi)
psi = constants*tensor(fock(N,0),fock(N,2),fock(N,1))
I need it to maintain the ket nature of psi, any help is appreciated.