Let denote the specified image of . Its components comprise distinct ordered-pair basis states, each with coefficient , together with with coefficient . Hence .
For distinct indices , only two output basis states occur in both images. Their common contributions have product , while the contributions have product . Thus
The specified map is therefore a linear isometry on the -dimensional input subspace. Complete the input vectors to an orthonormal basis of the -dimensional space, and independently complete their images to another orthonormal basis. Map the first full basis to the second. This is a unitary extension of a finite-dimensional isometry, giving the required . The prescribed columns are orthonormal, so a full unitary extension exists. Its construction depends only on , not on the unknown string, and is permitted by the question's exact-unitary assumption.
Let be the number of ones. The displayed output state assigns the outcome probability
For 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.
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 count
The 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 .

Articles by others on the same topic (0)

There are currently no matching articles.