Layman Interpretation: Quantum Factoring Algorithm

I must firstly express that I know only a little about quantum computing and my knowledge comes largely from popular science texts and the media.

So, I'm hoping that somebody will be able to help me to correct my understanding of quantum computing.

My understanding is as follows:

• a qubit acts as though it is in both states at once (1 and 0)
• a register of n qubits can act as though it is in any of $2^n$ states.

• this has obvious benefits in terms of a factoring algorithm: we can identify whether any of these states is a 'correct' solution to a problem.

• however, I understand that although we can identify whether or not there is a correct state, we can not necessarily observe the state which is correct

So, my assumption up to now has been that we can 'pin' one or more of the qubits by replacing with a classical bit, and observe whether or not the remaining set of states still contain a correct solution. (Simple!)

My problem is that this would seem to lead to a solution to the factoring problem in $O(log n)$ time, by passing down and pinning each of the bits. I haven't proved that out but it feels right, based on my assumptions.

However, Shor's algorithm takes $O((logn)^3)$ and doesn't seem that simple. I'd like to know which of my assumptions are wrong, but Wikipedia's description of Shor's algorithm seems intractable to me.

Can you help identify my misconception? Which of my points of understanding are correct/incorrect? Thanks!

• There's a great blog post by Scott Aaronson explaining Shor's algorithm in non-specialist terms: scottaaronson.com/blog/?p=208 Apr 14, 2012 at 18:07

The most general representation of the quantum state of $n$ qubits is the $2^n \times 2^n$ density matrix $\rho$, where the diagonal entries correspond to the probability of finding the system in a particular classical state, and the off diagonal entries indicate the phase of the superposition (going to 0 for classical probability distributions).
Any quantum algorithm can be seen as a unitary operation followed by some measurement in the computational basis. Given an initial input state $\rho$, it will evolve to $\rho' = U\rho U^\dagger$. The most general set of measurements that can be performed are called positive operator valued measurements(POVMs), where each measurement outcome $i$ is associated with a positive sei-definite Hermitian operator $P_i$ and the probability of outcome $i$ is given by $p_i = \mbox{Tr}(P_i \rho)$ (and hence $\sum_i P_i = \mathbb{I}$).