The NPA hierarchy arXiv:0803.4290 is a hierarchy of semidefinite programs (SDPs) that are often used to approximate upper bounds on the quantum value of a nonlocal game.
The article arXiv:0803.4290 describes the NPA hierarchy and is a bit opaque in terms of implementation details for how one would generalize these ideas and apply them computationally to the realm of nonlocal games.
This is a non-trivial component to code up from scratch, and while possible, it may be preferable to leverage some existing software that deals with calculating these SDPs. For instance, the ncpol2sdpa package could be used as a dependency. It would still take a bit of thinking as to how one can incorporate this into the nonlocal game setting within toqito. There are also a number of numerical instability issues that exist with ncpol2sdpa, so this might not be the ideal path.
A more direct overview of the NPA hierarchy may be found in the following lecture video by John Watrous:

Indeed, this video serves not only as a good overview of the NPA hierarchy--but as a way in which one may encode some of these concepts more broadly into something that could be implemented:
Furthermore, there have been other software implementations of the NPA hierarchy that could be useful points of reference. One such implementation can be found in the QETLAB MATLAB software suite
The NPA hierarchy arXiv:0803.4290 is a hierarchy of semidefinite programs (SDPs) that are often used to approximate upper bounds on the quantum value of a nonlocal game.
The article arXiv:0803.4290 describes the NPA hierarchy and is a bit opaque in terms of implementation details for how one would generalize these ideas and apply them computationally to the realm of nonlocal games.
This is a non-trivial component to code up from scratch, and while possible, it may be preferable to leverage some existing software that deals with calculating these SDPs. For instance, the ncpol2sdpa package could be used as a dependency. It would still take a bit of thinking as to how one can incorporate this into the nonlocal game setting within
toqito. There are also a number of numerical instability issues that exist with ncpol2sdpa, so this might not be the ideal path.A more direct overview of the NPA hierarchy may be found in the following lecture video by John Watrous:

Indeed, this video serves not only as a good overview of the NPA hierarchy--but as a way in which one may encode some of these concepts more broadly into something that could be implemented:
Furthermore, there have been other software implementations of the NPA hierarchy that could be useful points of reference. One such implementation can be found in the QETLAB MATLAB software suite