I would like to do an operation on a matrix acting on a tensor product vector space that is a bit unusual. It is similar to a partial trace, but not quite that. Say I have a tensor product vector space $V \otimes V$. What I would like to be able to do, is a linear map from $L(V \otimes V)$ to $L(V)$ defined through:
$$ A \otimes B \to AB. $$
In other words I want to turn a tensor product into a normal matrix product.
Assuming the usual Kronecker product convention for the tensor products, how can I compute this operation for an arbitrary matrix $T \in L(V \otimes V)$ (so $T$ can not necessarily be written as a simple tensor product)?
I know that in "tensor terminology" this is a contraction of two indices, if $T$ was viewed as a rank four tensor, I'm just not sure how to actually do it given a representation of $T$ as a matrix.