rewrite major sections of part 2, using search instead of Deutchs alg
Fix the bad maths relating to quantum search.