There are a few problems -
The Operator has been represented in such a way that for it to act on
bra/ket we have to use (*).
Instead we can define Operator as a function where we pass the bra/ket
.This function can store the values (for calculation) and then we can print
the notation too in its symbolic form.
e.g. def Operator( n,m): #pass the states
Next problem is when we cant represent an Operator with a superscript
form( Atleast I havent figured out yet)
e.g right = (Bra('m')*(H**2)*Ket('n'))/(E**n - E**m)
<m|(H)2|n>−Em+En
represents it as (H) to the power 2(actually evaluates) instead of
superscript which a Symbol does( In this case I took 'E' as symbol just for
representation)
If I take 'H' as a symbol, it takes 'H' out of the bra/ket notation(
assumes as constant)
So we can define an Operator as:
def Operator(Name, n, m): #Name as a symbolic notation of Operator, n=
subscript, m = superscript)
We store them for integration of the wavefunction as well as finally print
it out in the actual notation form.
@Brian @Ondrej Sir, please elaborate on how to go forward with this.
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/2421e20f-0134-4412-9f9d-ccecd047499b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.