You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! I want to develop a new C++ project using SymEngine. The project will compute derivatives of an expression of some operators in quantum mechanics, and afterward evaluate the derivatives numerically by using some external numerical functions. So my questions are:
Operators in quantum mechanics usually do not commute, i.e. A*B is not equal to B*A where A and B are two operators, and * is multiplication. Moreover, an operator A can be a "function" of multi-variables, e.g. x, y, z, etc. I notice that there is matrix and multi-argument function in SymEngine, but I do not need numbers of rows and columns, elements and many matrix functions for the operators. I also do not think the multi-argument function has considered commutation. Therefore, is there any class in SymEngine I can use to represent the operators? If not, can I make a derived class for the operators?
Take A*B as an example. When a derivative with respect to a variable x is computed, I want Derivative(A, x)*B + A*Derivative(B, x) to return as a result. Afterwards, I can evaluate this result numerically by replacing Derivative(A, x), B, A and Derivative(B, x) with external numerical function(s). Is it possible and how?
Thank you in advance.
The text was updated successfully, but these errors were encountered:
Hi! I want to develop a new C++ project using SymEngine. The project will compute derivatives of an expression of some operators in quantum mechanics, and afterward evaluate the derivatives numerically by using some external numerical functions. So my questions are:
A*B
is not equal toB*A
whereA
andB
are two operators, and*
is multiplication. Moreover, an operatorA
can be a "function" of multi-variables, e.g.x
,y
,z
, etc. I notice that there is matrix and multi-argument function in SymEngine, but I do not need numbers of rows and columns, elements and many matrix functions for the operators. I also do not think the multi-argument function has considered commutation. Therefore, is there any class in SymEngine I can use to represent the operators? If not, can I make a derived class for the operators?A*B
as an example. When a derivative with respect to a variablex
is computed, I wantDerivative(A, x)*B + A*Derivative(B, x)
to return as a result. Afterwards, I can evaluate this result numerically by replacingDerivative(A, x)
,B
,A
andDerivative(B, x)
with external numerical function(s). Is it possible and how?Thank you in advance.
The text was updated successfully, but these errors were encountered: