示例#1
0
 def __mul__(self, other):
     """BraBase*other"""
     from sympy.physics.quantum.innerproduct import InnerProduct
     if isinstance(other, KetBase):
         return InnerProduct(self, other)
     else:
         return Expr.__mul__(self, other)
示例#2
0
文件: state.py 项目: asmeurer/sympy
 def __mul__(self, other):
     """BraBase*other"""
     from sympy.physics.quantum.innerproduct import InnerProduct
     if isinstance(other, KetBase):
         return InnerProduct(self, other)
     else:
         return Expr.__mul__(self, other)
示例#3
0
 def __mul__(self, other):
     """KetBase*other"""
     from sympy.physics.quantum.operator import OuterProduct
     if isinstance(other, BraBase):
         return OuterProduct(self, other)
     else:
         return Expr.__mul__(self, other)
示例#4
0
文件: state.py 项目: asmeurer/sympy
 def __mul__(self, other):
     """KetBase*other"""
     from sympy.physics.quantum.operator import OuterProduct
     if isinstance(other, BraBase):
         return OuterProduct(self, other)
     else:
         return Expr.__mul__(self, other)