Author Topic: ExpressOperator fails with real value zero in diag matrix  (Read 3952 times)

johannes.mckay

  • Member
  • *
  • Posts: 4
    • View Profile
ExpressOperator fails with real value zero in diag matrix
« on: July 09, 2012, 07:12:00 PM »
Code: [Select]
intmat = {
     {-1.1, 0., 0.},
     {0., -1.3, 0.},
     {0., 0., 2.2}
    } ;
intmat // MatrixForm
operatorDint = opI["S1"].intmat.opI["S2"]
ExpressOperator[operatorDint, SphericalTensorOperatorBasis[]]
Fails as the zeros are Real and not integer. A workaround is to use chop but this wasn't too obvious from the error message which is returned on entering the code above.
Although an easier work around is obviously to specify
Code: [Select]
intmat = {
     {-1.1, 0, 0},
     {0, -1.3, 0},
     {0, 0, 2.2}
    } ;
but if I was to multiply this by a real constant then mathematica would make the zero elements real again making chop necessary again.

Hopefully this makes some sense. Cheers,
Johannes

MalcolmHLevitt

  • Administrator
  • Member
  • *****
  • Posts: 103
    • View Profile
Re: ExpressOperator fails with real value zero in diag matrix
« Reply #1 on: July 23, 2012, 05:57:17 PM »
Hi Johannes, I've fixed this in the post-release SDv2.5.1, available here: https://www.dropbox.com/sh/c331l2vdfaf5kex/ACRF020zfU

MalcolmHLevitt

  • Administrator
  • Member
  • *****
  • Posts: 103
    • View Profile
Re: ExpressOperator fails with real value zero in diag matrix
« Reply #2 on: July 26, 2012, 09:15:48 AM »
Hi Johannes, My fix in SDv2.5.1 caused other problems. An updated fix is in SDv2.5.2