Author Topic: Multiplying operators (a trap for the unwary)  (Read 2750 times)


  • Administrator
  • Member
  • *****
  • Posts: 109
    • View Profile
Multiplying operators (a trap for the unwary)
« on: December 18, 2012, 02:12:36 PM »
Unexpected behaviour (including getting stuck) has been reported by users who attempt to multiply two operators using Times rather than Dot, i.e.

opI[1,"x"]*opI[2,"z"]  (incorrect)

rather than

opI[1,"x"].opI[2,"z"] (correct)

using Times ("*") for operators is illegal. Always use Dot (".") to multiply operators (and vectors, for that matter).

Times may however be used to multiply operators by numbers, for example

2 Pi * opI[1,"x"] (correct)  or
2 Pi opI[1,"x"].opI[2,"z"] (correct)