Dirac notation based quantum mechanics formulae deduction with python

I want to know whether there are some python based toolkits/libraries/projectes which can facilitate me to do the complicated quantum mechanics formulae deduction, say, using Dirac notation.

Any hints will be highly appreciated.


Howdy Hongyi,

have a look into SymPy (which e.g. is bundled in SciPy). SymPy is able to operate with symbols and to solve symbolic equations.

And it seems, that they even have some things in stock for the dirac notation:


Cheers, Dominik

Thank you very much for letting me know this intriguing feature. As a concrete example, I try to use it to validate the following equality given here:

4⟨ϕ, Aχ⟩ = ⟨ϕ + χ, A(ϕ + χ)⟩⟨ϕ − χ, A(ϕ − χ)⟩ − i⟨ϕ + iχ, A(ϕ + iχ)⟩ + i⟨ϕ − iχ, A(ϕ − iχ)⟩.
Am, n *  = ⟨ξm, Aξn⟩ *  = ⟨A † ξm, ξn⟩ *  = ⟨ξn, A † ξm⟩ = An, m † 

Does anyone here have the similar experiences?