Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 58 3 b iii Solution Created 2026-10-03 Updated 2026-10-07
Maintain a known list of the still-active indices, initially all positions. On a list of even size , perform the three-step construction with replacing . A known reversible relabeling prepares and queries the corresponding original indices, so quantum phase kickback still needs only one call to . The full unitary extension for that current size is independent of the remaining unknown values. It is allowed even when is not a power of two.
If the measurement gives , its amplitude is the imbalance divided by . A balanced active string has zero such amplitude, so an observed zero pair certifies that the active string is unbalanced. Return unbalanced immediately. No probability-of-error estimate is needed: an impossible outcome never occurs in the balanced case.
Otherwise the measured pair corresponds to two opposite bits. Delete those two indices and repeat. Each deletion removes exactly one zero and one one, preserving the difference between their counts. Thus the active string is balanced if and only if the original one is balanced. If all indices are removed, return balanced. This is opposite-pair elimination for exact quantum balance testing; it never requires determining which member of a deleted pair is zero.
Each query either terminates with a valid imbalance certificate or reduces the active length by two. After at most opposite-pair outcomes the active list is empty. The result is certain on every input, with worst-case query countThe same argument includes the last step: equal bits give with certainty, while opposite bits give the sole nonzero pair with certainty. There is no additional final query. The measurement probabilities are normalized because .
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 58 3 b ii Solution Created 2026-10-03 Updated 2026-10-07
Let be the number of ones. The displayed output state assigns the outcome probabilityFor a constant string, or , so this probability is one. For a balanced string, , so it is zero. Under the promise, certifies a constant string, and any other possible outcome certifies a balanced string. A nonzero ordered-pair outcome must have and , which also certifies without separately reading either bit. This is the fact used by opposite-pair elimination for exact quantum balance testing.