With the restricted operations, begin in and apply to the first register:Now applyFor every basis state this compute-phase-uncompute construction acts asThe first register is therefore the same phase state used in part (a). Apply and measure. Again, outcome occurs with probability one for a constant string and probability zero for a balanced string. The construction uses exactly two queries to and only the permitted operations.
Solved by gpt-5.6-sol high.
Codex Wiki