Define commoninds(tensors...)
Do you mean generalize commoninds(::ITensor...) to the case where the "tensors" are tensor networks?
yes, I would like to get all inner indices of a tensor network. Not sure if commoninds is the correct one, but something like that
Maybe we would call it linkinds to match the same concept for MPS. It could be a dictionary that takes a pair of vertex labels corresponding to an edge of the network with ITensors with common indices as keys and outputs the common indices.
It doesn't help you directly just yet, but I've been working on a rewrite of https://github.com/mtfishman/ITensorNetworks.jl which is meant to define operations like this for generic tensor networks (in addition to priming, tagging, getting external indices of a network, etc.). It has a graph interface and is built on top of some graph data structures, so linkinds(tn::ITensorNetwork) outputs a metagraph with vertex labels that match the vertex labels of the input ITensorNetwork, and the metadata of the edges are the indices common between the tensors living on the incident vertices. I think that design leads to a pretty intuitive interface, but it needs more development to make it fully featured for applications.