There are already a few prototype-stage proposals about this that
might give you an idea how to proceed:
- Pernici employed abstract tensors for this here
https://github.com/sympy/sympy/pull/1699
It is unmerged. Search for "gamma matrices" in the pull
request description. Only a small part of this pull request
deals with gamma matrices, so do not be scared by the
fact that it is more than 3000 lines.
- I hacked together some simplistic implementation here
https://github.com/sympy/sympy/pull/1635
- There is a GSoC proposal, that if accepted can implement
a lot of the Lie Groups/Algebras theory related to SU(n)
In any case, if this is to be useful for the `quantum` module, it
would have to interface with its methods for determining a base,
evaluating operations, etc. This is almost a whole new CAS within
SymPy.