I am writing a code to apply Wick's theorem to expectation values of products of elements like x[i][t], y[k][t2]...
I would like to find a way to turn such products into lists {x[i][t],y[k][t2], ...}, so that then I can use Subsets to find all pairings between the elements, and then replace them by the corresponding expectation values.
How could I achieve this?
Best,
Stefano