# Defining a Grassmann Algebra in Python

I am trying to implement a Grassmann algebra in Python and was wondering if anyone could recommend any packages or suggest how to do so?

I want to define the following multiplication rules over $$\Bbb{C}^{2n}$$ with standard basis vectors $$e_j$$ via $$e_j^2=0 \text{ and the anti-commutation rule } e_ie_j+e_je_i=0$$ I then plan on defining an exponential function of quadratic terms in these basis vectors in a way that respects the relations above, ie $$\exp{(ie_ae_b)}$$, via the power series definition.

I would be very grateful for any suggestions on how to program this!

• This would go better on another of the stackexchanges. The computational science one maybe. Jul 16 '20 at 15:22
• Sympy can handle noncommutative polynomials so you may want to try there. Jul 19 '20 at 9:47
• @Rammus thank you! This is very useful! Jul 20 '20 at 10:40