I am trying to work out how to program a simulation of a quantum computer program. I think I understand all the steps, of implementing a simulation, except the simulation of the measurement. I will use 2 qubit states to illustrate; though the illustration below extends in an obvious way to n qubits. Suppose after we are up to the state just before measurement it is
$a_0|00\rangle+a_1|01\rangle+a_2|10\rangle+a_3|11\rangle$
Suppose there exist a unique maximum from the real numbers $a_0,a_1,a_2,a_3$ let refer to this as m; and that the sum of squares of the 4 amplitudes sum to 1. and we want to know what is the most likely state that will be measured.
A) Is the most likely state to be measured the one with maximum squared amplitude of $a_0,a_1,a_2,a_3$ in other words, the most likely state has a probability $m^2$ of being measured -for example, out of 100 repeated measurements $(100*(m^2))$, to the nearest integer, will be the likely state.
or
B) Is the most likely state to be measured the one that has the highest ratios regarding the amplitudes, compared to every other state, the ratio measures how many times more likely one state is to be measured when compared to another state,suppose that $a_3$ is near to one, and $a_0,a_1,a_3$ are near to zero then computing the absolute values of
$|a_3/a_2|,|a_3/a_1|, |a_3/a_0|$ I assume, not sure but assuming here, will give the largest 3 values when compared to any of the values in the two lists of amplitude ratios
$|a_2/a_3| ,|a_2/a_1|, |a_2/a_0|$
or
$|a_1/a_2|,|a_1/a_0|, |a_1/a_3|$
therefore $a_3$ is most likely to measured and suppose $a_3/a_2, a_3/a_1, a_3/a_0$ are all largest than some integer I then if I is large enough for the simulation then we can ignore how many times, referred to as T, we measure the state because we can conclude $a_3$ is measured every time.
So is the answer A or B?