MoMPy: a Python package for SDP relaxations
Moment matrices are a powerful way of turning difficult questions in quantum information into tractable optimisation problems, but building them correctly can be surprisingly complicated: many entries are actually the same because the underlying quantum operators obey mathematical relations such as commutation, orthogonality, and idempotency.
MoMPy is an open-source Python package that automates this bookkeeping. You declare the operators and their relations, choose the products you want to include, and MoMPy constructs the corresponding moment matrix, automatically identifying equivalent terms and producing the variables needed for a semidefinite-programming relaxation. Read here a tutorial introducing the package. You can find all codes here.