My question should be fairly simple, though I did not find an answer to it here or anywhere else.
I have been working on an algorithm which, similarly to the HHL algorithm, provides a state $|x\rangle$ for which I want to extract some global quantity at the end. I now want to build a simple few-qubits implementation of such algorithm and for that I would like to find the $\texttt{Absolute Average}$ given by $\frac{1}{N}\big|\sum_{i=1}^Nx_i\big|$, which is clearly possible according to this tutorial to Qiskit's HHL implementation.
However, I am struggling to understand which observable $M$ I should apply in order to get this quantity from $\langle x|M|x\rangle$.