Quantum weight enumerators and tensor networks
We examine the use of weight enumerators for analyzing tensor network constructions, and specifically the quantum lego framework recently introduced. We extend the notion of quantum weight enumerators to so-called tensor enumerators, and prove that the trace operation on tensor networks is compatible with a trace operation on tensor enumerators. This allows us to compute quantum weight enumerators of larger codes such as the ones constructed through tensor network methods more efficiently. We also provide a general framework for quantum MacWilliams identities that includes tensor enumerators as a special case.