# How do we measure the probability of outcomes in a quantum computer if qubits collapse when measured?

I understand the idea behind Quantum Computing being that we superpose all possible states of a system of qubits and amplify the probabilities of whatever it is that we want depending on the circuit we are making. However when using something like Qiskit the output comes as frequency of observations, so for example the 00 state was measured 150 times and the 01 state 300 times. At first I thought that when you measured a system of qubits you would find it's for example in the 00 state but then if you measured it again right after you would be able to find it in another state like 01, so you just have to measure lots of times (like 1000) to more or less get an idea of what the probability of each output is. This is also what would make quantum computing so efficient since you run the circuit once and then you only have to measure repeatedly. However apparently qubits collapse when measured so if you measured the 00 state and you measure again it is always going to be in a 00 state. How do we work out the output of a quantum circuit then? Do we have to repeat the whole process of the circuit 1000 times? Wouldn't that make it as inefficient as classical computing?

Cross-posted on qc.SE

You are correct, once the quantum computer's output has been measured we can't just measure the same output again to get a different result, the circuit needs to be re-run. A superposition is not the same as a random "ignorance mixture" from ordinary probability theory, but it shares a lot of the same properties. If you draw a card from a deck, and get the 7 of clubs, then no matter how many times you look at that same card you drew it will remain the 7 of clubs. To randomise you need to shuffle it back it and draw again. Superposition shares this property with randomness.

So yes, you do need to run the circuit a bunch of times and take an average. When people measure the efficiency of quantum computer algorithms relative to classical ones they take this into account. The headline efficiency gains have already accounted for the number of repeats needed. In some cases repeats might not be needed. In the case of Shor's algorithm, for example, its probably easier to just test the output (see if the numbers it spat out actually multiply up to the required result), and only repeat if it didn't work.

A small side-point, the choice of phrase "amplify the probabilities of whatever it is that we want" is unpalatable to me. Amplification of probabilities is physically impossible. A better mindset is that the quantum computer is designed such that the unwanted outcomes are made less likely by destructive interference.