Tag Info

Hot answers tagged

4

You could define a function that constructs the product of Pauli matrices as follows. I use KroneckerProduct here because you are planning to form the matrix product with a $2L\times2L$ matrix, so we have to have the Pauli matrices arranged in a corresponding block matrix: pauliProduct[n_] := Module[{l = Length[n]}, Total@MapIndexed[ KroneckerProduct[ ...


2

Try this: In[1]:= Unprotect[PermutationProduct]; PermutationProduct[left___, sum_Plus, right___] := PermutationProduct[left, #, right] & /@ sum; PermutationProduct[left___, c_ perm_?PermutationCyclesQ, right___] := c PermutationProduct[left, perm, right]; PermutationProduct[left___, 0, right___] := 0; ...



Only top voted, non community-wiki answers of a minimum length are eligible