Past exam of the mathematics course of the University of Cambridge 2009 iii Paper 51 2 d Solution Created 2026-10-03 Updated 2026-10-14
List the known distinct strings in as , where , and use an -qubit index quantum ancilla. Apply Hadamard gates to that register to prepareFirst, for each with , apply the available unitary operator that transposes and . The pairs are disjoint because they have distinct index labels. Skip a transposition when the two vectors coincide. This producesSecond, for each , transpose and . These pairs are disjoint because the data strings are distinct. No pair contains the term with , and no later transposition moves an earlier output. The final state is exactlyThis clean subset superposition preparation uses at most of the given transpositions and Hadamard gates. Since , is polynomial in ; multiplying this count by the assumed polynomial size of each transposition gives a polynomial-size quantum circuit. The index quantum ancilla returns to zero, so the data register is a pure uniform superposition state, rather than a mixture obtained by discarding its index. The construction uses an available enumeration of the known subset; a membership oracle alone would not justify that enumeration.