# Is there a way to extract the mean from a quantum superposition?

Given the superposed output of some quantum computation, suppose I want to know the mean state, i.e. the mean probability of each qubit sampled over all states.

The most obvious way to get this is repeated sampling. Obviously the more samples I take, the more accurately I will be able to estimate the mean.

Can this performance be improved upon? For example, if we take a Quantum Fourier Transform then the probability of state |0> is presumably the mean quantity we're after. Of course we can't guarantee measuring it, can we use something like Grover's algorithm to make its measurement extremely likely in $\sqrt{n}$ steps? And if we do, does that give better performance than the repeated sampling approach?

• Do you want the expectation per-qubit, or do you want the weighted average over some whole register of qubits with each possible reading interpreted as a twos-complement binary unsigned integer? – Craig Gidney Aug 22 '17 at 3:06
• Expectation per qubit would be fine. Twos complement is an interesting addition but not what I had in mind. – Sideshow Bob Aug 22 '17 at 10:07
• Also to define this problem better - I only need to know the mean state of some qubits - the computation is allowed to contain other qubits whose final state I don't care about – Sideshow Bob Aug 22 '17 at 13:25
• You can ask this question at: quantumcomputing.stackexchange.com . – Rob Apr 4 '18 at 0:37