Question: Simplifying a product of sum of products of Bra and Ket

@ecterrab I have a related question. I define a hopping Hamiltonian H := sum(((Ket(e, n)) . (Bra(e, n + 1))) + ((Ket(e, n + 1)) . (Bra(e, n))), n = 1 .. d). Now I compute H.H. Maple is smart enough to write double sums with KroneckerDeltas but I don't manage to make it simplify them to single sums?

Please Wait...