Hey Thien,
thanks for letting me know. That is a bug that was introduced by a change in the SymPy package.
I thought I had already fixed it, but I guess not for the super-operator algebra.
I’ll let you know when it’s resolved. Until then, I hope you can use the other features just fine.
BTW. you might already want to upgrade to the latest release by running
pip install —upgrade QNET
Finally, would it be ok if we used the QNET mailing list for questions related to the package? That way other people having similar issues would benefit from the information!
I’ve added the address to the reply-to field of my mail.
Have a nice weekend!
Nikolas
On Aug 22, 2014, at 5:20 PM, Thien Nguyen <
thien....@anu.edu.au> wrote:
> Hi Nikolas,
>
> I am trying to install the QNET program. I am following your instructions on the PRACQSYS tutorial to install the software.
> When running the example “LiouvillianNormalForm.ipynb”, I got error at the 6th command: nslh.symbolic_liouvillian().expand()
> The first 5 commands ran without any errors and I got the results as expected. I include here the error log for you to take a look.
> Could you help suggest me what went wrong with my QNET installation? Thanks a lot!
> ---------------------------------------------------------------------------
> TypeError Traceback (most recent call last)
> <ipython-input-6-82f1df24fa68> in <module>()
> ----> 1 nslh.symbolic_liouvillian().expand()
>
> C:\Anaconda\lib\qnet\algebra\super_operator_algebra.py in expand(self)
> 98 :rtype: SuperOperator
> 99 """
> --> 100 return self._expand()
> 101
> 102 def simplify_scalar(self):
>
> C:\Anaconda\lib\qnet\algebra\super_operator_algebra.py in _expand(self)
> 347
> 348 def _expand(self):
> --> 349 return sum((o.expand() for o in self.operands), ZeroSuperOperator)
> 350
> 351 # def _series_expand(self, param, about, order):
>
> C:\Anaconda\lib\qnet\algebra\super_operator_algebra.py in __add__(self, other)
> 142 return SuperOperatorPlus.create(self, other * IdentitySuperOperator)
> 143 elif isinstance(other, SuperOperator):
> --> 144 return SuperOperatorPlus.create(self, other)
> 145 return NotImplemented
> 146
>
> C:\Anaconda\lib\qnet\algebra\abstract_algebra.pyc in dclsmtd(cls, *args)
> 860 clsmtd = getattr(dcls, "create").im_func
> 861 def dclsmtd(cls, *args):
> --> 862 return method(dcls, clsmtd, cls, *args)
> 863
> 864 dclsmtd.method = method
>
> C:\Anaconda\lib\qnet\algebra\abstract_algebra.pyc in _assoc_mtd(dcls, clsmtd, cls, *ops)
> 898 """
> 899 nops = sum(((o,) if not isinstance(o,cls) else o.operands for o in ops),())
> --> 900 return clsmtd(cls, *nops)
> 901
> 902 assoc = preprocess_create_with(_assoc_mtd)
>
> C:\Anaconda\lib\qnet\algebra\abstract_algebra.pyc in dclsmtd(cls, *args)
> 860 clsmtd = getattr(dcls, "create").im_func
> 861 def dclsmtd(cls, *args):
> --> 862 return method(dcls, clsmtd, cls, *args)
> 863
> 864 dclsmtd.method = method
>
> C:\Anaconda\lib\qnet\algebra\abstract_algebra.pyc in _orderless_mtd(dcls, clsmtd, cls, *ops)
> 931 Times(1,2)
> 932 """
> --> 933 return clsmtd(cls, *sorted(ops, key = cls.order_key))
> 934
> 935 orderby = preprocess_create_with(_orderless_mtd)
>
> C:\Anaconda\lib\site-packages\sympy\core\relational.pyc in __nonzero__(self)
> 109
> 110 def __nonzero__(self):
> --> 111 raise TypeError("symbolic boolean expression has no truth value.")
> 112
> 113 __bool__ = __nonzero__
>
> TypeError: symbolic boolean expression has no truth value.
>
>
> Thien Nguyen
> Research School of Engineering
> The Australian National University
> Canberra, ACT 0200 AUSTRALIA
> Phone:
+61 2 6125 8829
> Mobile: +61 4 7872 8403
> Email:
thien....@anu.edu.au
>
> <image001.jpg>