Re: How does a quantum computer compare all possible outcomes and collapse to the "best" one?
In much the same way as computing the ground state of an atom.
In this instance with the tankers, you're computing all possible solutions and picking the lowest energy solution. For that is the best solution.