Operator bases, S-matrices, and their partition functions | Synapse