Quantum Harmonic Oscillator Algebra in Sympy

This is kind of garbage, but it does work.

Need to loop over it because the substitution rules aren’t smart enough to distribute the commutators themselves.

Still, seems to work. Kind of a hack, but seems to work.


Here’s the same thing built out of not much. Not elegantly done particularly




Leave a Reply

Your email address will not be published. Required fields are marked *