The notion of convolution of two probability vectors, corresponding to a coincidence experiment can be extended to a family of binary operations determined by (tri)stochastic tensors, to describe Markov chains of a higher order. The problem of associativity, commutativity, and the existence of neutral elements and inverses for such operations acting on classical states is analyzed. For a more general setup of multi-stochastic tensors, we present the characterization of their probability eigenvectors. Similar results are obtained for the quantum case: we analyze tristochastic channels, which induce binary operations defined in the space of quantum states. Studying coherifications of tristochastic tensors we propose a quantum analogue of the convolution of probability vectors defined for two arbitrary density matrices of the same size. Possible applications of this notion to construct schemes of error mitigation or building blocks in quantum convolutional neural networks are discussed.